Problems configuring wagon-webdav-jackrabbit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems configuring wagon-webdav-jackrabbit

Svensson, Lars
Greetings,

This is my first post to this list so please bear with me if I'm ignoring something obvious...

I'm trying to deploy a set of files to a webdav server using Maven Wagon, but the plugin does not pick up the configuration specified in my POM. If I specify the URL parameter on the command line (using -Dwagon.url etc.) it works fine.

I could not find any specific examples on how to configure wagon for webdav, so I looked at the standard plugin configuration [1] and came up with the following:

<project>
...
  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>3.0.0</version>
      </extension>
    </extensions>
    ...
    <plugins>
      <plugin>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>3.0.0</version>
          <executions>
            <execution>
              <id>upload-artefacts-to-webdav</id>
              <phase>deploy</phase>
              <configuration>
                <fromDir>target/path/to/files</fromDir>
                <includes>*</includes>
                <url>dav://my.webdav.server/</url>
                <toDir>standards</toDir>
              </configuration>
              <goals>
                <goal>upload</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
   </build>
</project>

When I execute mvn wagon:upload, it first issues a warning

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0: Failed to parse plugin descriptor for org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0 (D:\Workspace\m2repo\org\apache\maven\wagon\wagon-webdav-jackrabbit\3.0.0\wagon-webdav-jackrabbit-3.0.0.jar): No plugin descriptor found at META-INF/maven/plugin.xml

And then goes on to say

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload (default-cli) on project myProject: The parameters 'url' for goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid -> [Help 1]

Any help on the correct configuration would be very helpful.

[1] https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Configuring_Build_Plugins

Thanks,

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems configuring wagon-webdav-jackrabbit

olamy
Hi,
webdav is not a plugin but a protocol supported by wagon
you're right using extension tag
If you want to deploy your artifacts just configure distributionManagement
to use dav protocol: <url>dav:https://thewebdavurl/</url>
Otherwise have a look at this plugin:
http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I think you
want to achieve)
HTH
Olivier

On 27 February 2018 at 20:34, Svensson, Lars <[hidden email]> wrote:

> Greetings,
>
> This is my first post to this list so please bear with me if I'm ignoring
> something obvious...
>
> I'm trying to deploy a set of files to a webdav server using Maven Wagon,
> but the plugin does not pick up the configuration specified in my POM. If I
> specify the URL parameter on the command line (using -Dwagon.url etc.) it
> works fine.
>
> I could not find any specific examples on how to configure wagon for
> webdav, so I looked at the standard plugin configuration [1] and came up
> with the following:
>
> <project>
> ...
>   <build>
>     <extensions>
>       <extension>
>         <groupId>org.apache.maven.wagon</groupId>
>         <artifactId>wagon-webdav-jackrabbit</artifactId>
>         <version>3.0.0</version>
>       </extension>
>     </extensions>
>     ...
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.wagon</groupId>
>         <artifactId>wagon-webdav-jackrabbit</artifactId>
>         <version>3.0.0</version>
>           <executions>
>             <execution>
>               <id>upload-artefacts-to-webdav</id>
>               <phase>deploy</phase>
>               <configuration>
>                 <fromDir>target/path/to/files</fromDir>
>                 <includes>*</includes>
>                 <url>dav://my.webdav.server/</url>
>                 <toDir>standards</toDir>
>               </configuration>
>               <goals>
>                 <goal>upload</goal>
>               </goals>
>             </execution>
>           </executions>
>         </plugin>
>       </plugins>
>    </build>
> </project>
>
> When I execute mvn wagon:upload, it first issues a warning
>
> [WARNING] Failed to retrieve plugin descriptor for
> org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0: Failed to parse
> plugin descriptor for org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0
> (D:\Workspace\m2repo\org\apache\maven\wagon\wagon-
> webdav-jackrabbit\3.0.0\wagon-webdav-jackrabbit-3.0.0.jar): No plugin
> descriptor found at META-INF/maven/plugin.xml
>
> And then goes on to say
>
> [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> (default-cli) on project myProject: The parameters 'url' for goal
> org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid ->
> [Help 1]
>
> Any help on the correct configuration would be very helpful.
>
> [1] https://maven.apache.org/guides/mini/guide-configuring-
> plugins.html#Configuring_Build_Plugins
>
> Thanks,
>
> Lars
>
>


--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Reply | Threaded
Open this post in threaded view
|

RE: Problems configuring wagon-webdav-jackrabbit

Svensson, Lars
Hi Olivier and thanks for your quick reply!

On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:[hidden email]] wrote:

> webdav is not a plugin but a protocol supported by wagon
> you're right using extension tag
> If you want to deploy your artifacts just configure distributionManagement
> to use dav protocol: <url>dav:https://thewebdavurl/</url>
> Otherwise have a look at this plugin:
> http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I think you
> want to achieve)

distributionManagement is not quite what I need since my use case is to copy some generated files to a remote location.

I had been looking at the wagon-maven-plugin but didn't get it to work since the jars are not available.

Now my pom looks like this (as specified in [1]):

<project>
  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>2.8</version>
      </extension>
    </extensions>
...
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
         <version>1.0</version>
         <executions>
           <execution>
             <id> upload-artefacts-to-webdav</id>
             <phase>deploy</phase>
             <configuration>
               <fromDir> target/path/to/files</fromDir>
               <includes>*</includes>
               <url>dav://my.webdav.server/</url>
               <toDir>standards</toDir>
             </configuration>
             <goals>
               <goal>upload</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
     </plugins>
  </build>
</project>

And maven claims that it cannot find wagon-webdav:jar:2.8 (and it's darn right, since the most recent version in apache maven repo is 1.0-beta-2 [2])

[ERROR]     Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav:2.8 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.wagon:wagon-webdav:jar:2.8 in central (https://repo.maven.apache.org/maven2) -> [Help 2]

[1] http://www.mojohaus.org/wagon-maven-plugin/usage.html
[2] https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-webdav/

Best,

Lars

> On 27 February 2018 at 20:34, Svensson, Lars <[hidden email]> wrote:
>
> > Greetings,
> >
> > This is my first post to this list so please bear with me if I'm ignoring
> > something obvious...
> >
> > I'm trying to deploy a set of files to a webdav server using Maven Wagon,
> > but the plugin does not pick up the configuration specified in my POM. If I
> > specify the URL parameter on the command line (using -Dwagon.url etc.) it
> > works fine.
> >
> > I could not find any specific examples on how to configure wagon for
> > webdav, so I looked at the standard plugin configuration [1] and came up
> > with the following:
> >
> > <project>
> > ...
> >   <build>
> >     <extensions>
> >       <extension>
> >         <groupId>org.apache.maven.wagon</groupId>
> >         <artifactId>wagon-webdav-jackrabbit</artifactId>
> >         <version>3.0.0</version>
> >       </extension>
> >     </extensions>
> >     ...
> >     <plugins>
> >       <plugin>
> >         <groupId>org.apache.maven.wagon</groupId>
> >         <artifactId>wagon-webdav-jackrabbit</artifactId>
> >         <version>3.0.0</version>
> >           <executions>
> >             <execution>
> >               <id>upload-artefacts-to-webdav</id>
> >               <phase>deploy</phase>
> >               <configuration>
> >                 <fromDir>target/path/to/files</fromDir>
> >                 <includes>*</includes>
> >                 <url>dav://my.webdav.server/</url>
> >                 <toDir>standards</toDir>
> >               </configuration>
> >               <goals>
> >                 <goal>upload</goal>
> >               </goals>
> >             </execution>
> >           </executions>
> >         </plugin>
> >       </plugins>
> >    </build>
> > </project>
> >
> > When I execute mvn wagon:upload, it first issues a warning
> >
> > [WARNING] Failed to retrieve plugin descriptor for
> > org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0: Failed to parse
> > plugin descriptor for org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0
> > (D:\Workspace\m2repo\org\apache\maven\wagon\wagon-
> > webdav-jackrabbit\3.0.0\wagon-webdav-jackrabbit-3.0.0.jar): No plugin
> > descriptor found at META-INF/maven/plugin.xml
> >
> > And then goes on to say
> >
> > [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> > (default-cli) on project myProject: The parameters 'url' for goal
> > org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid ->
> > [Help 1]
> >
> > Any help on the correct configuration would be very helpful.
> >
> > [1] https://maven.apache.org/guides/mini/guide-configuring-
> > plugins.html#Configuring_Build_Plugins
> >
> > Thanks,
> >
> > Lars
> >
> >
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems configuring wagon-webdav-jackrabbit

olamy
On 27 February 2018 at 21:29, Svensson, Lars <[hidden email]> wrote:

> Hi Olivier and thanks for your quick reply!
>
> On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> [hidden email]] wrote:
>
> > webdav is not a plugin but a protocol supported by wagon
> > you're right using extension tag
> > If you want to deploy your artifacts just configure
> distributionManagement
> > to use dav protocol: <url>dav:https://thewebdavurl/</url>
> > Otherwise have a look at this plugin:
> > http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I think you
> > want to achieve)
>
> distributionManagement is not quite what I need since my use case is to
> copy some generated files to a remote location.
>
> I had been looking at the wagon-maven-plugin but didn't get it to work
> since the jars are not available.
>
> Now my pom looks like this (as specified in [1]):
>
> <project>
>   <build>
>     <extensions>
>       <extension>
>         <groupId>org.apache.maven.wagon</groupId>
>         <artifactId>wagon-webdav</artifactId>
>         <version>2.8</version>
>       </extension>
>     </extensions>
>


change to <artifactId>wagon-webdav-jackrabbit</artifactId>



> ...
>     <plugins>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>wagon-maven-plugin</artifactId>
>          <version>1.0</version>
>          <executions>
>            <execution>
>              <id> upload-artefacts-to-webdav</id>
>              <phase>deploy</phase>
>              <configuration>
>                <fromDir> target/path/to/files</fromDir>
>                <includes>*</includes>
>                <url>dav://my.webdav.server/</url>
>                <toDir>standards</toDir>
>              </configuration>
>              <goals>
>                <goal>upload</goal>
>              </goals>
>            </execution>
>          </executions>
>        </plugin>
>      </plugins>
>   </build>
> </project>
>
> And maven claims that it cannot find wagon-webdav:jar:2.8 (and it's darn
> right, since the most recent version in apache maven repo is 1.0-beta-2 [2])
>
> [ERROR]     Unresolveable build extension: Plugin
> org.apache.maven.wagon:wagon-webdav:2.8 or one of its dependencies could
> not be resolved: Could not find artifact org.apache.maven.wagon:wagon-webdav:jar:2.8
> in central (https://repo.maven.apache.org/maven2) -> [Help 2]
>
> [1] http://www.mojohaus.org/wagon-maven-plugin/usage.html
> [2] https://repo.maven.apache.org/maven2/org/apache/maven/wagon/
> wagon-webdav/
>
> Best,
>
> Lars
>
> > On 27 February 2018 at 20:34, Svensson, Lars <[hidden email]> wrote:
> >
> > > Greetings,
> > >
> > > This is my first post to this list so please bear with me if I'm
> ignoring
> > > something obvious...
> > >
> > > I'm trying to deploy a set of files to a webdav server using Maven
> Wagon,
> > > but the plugin does not pick up the configuration specified in my POM.
> If I
> > > specify the URL parameter on the command line (using -Dwagon.url etc.)
> it
> > > works fine.
> > >
> > > I could not find any specific examples on how to configure wagon for
> > > webdav, so I looked at the standard plugin configuration [1] and came
> up
> > > with the following:
> > >
> > > <project>
> > > ...
> > >   <build>
> > >     <extensions>
> > >       <extension>
> > >         <groupId>org.apache.maven.wagon</groupId>
> > >         <artifactId>wagon-webdav-jackrabbit</artifactId>
> > >         <version>3.0.0</version>
> > >       </extension>
> > >     </extensions>
> > >     ...
> > >     <plugins>
> > >       <plugin>
> > >         <groupId>org.apache.maven.wagon</groupId>
> > >         <artifactId>wagon-webdav-jackrabbit</artifactId>
> > >         <version>3.0.0</version>
> > >           <executions>
> > >             <execution>
> > >               <id>upload-artefacts-to-webdav</id>
> > >               <phase>deploy</phase>
> > >               <configuration>
> > >                 <fromDir>target/path/to/files</fromDir>
> > >                 <includes>*</includes>
> > >                 <url>dav://my.webdav.server/</url>
> > >                 <toDir>standards</toDir>
> > >               </configuration>
> > >               <goals>
> > >                 <goal>upload</goal>
> > >               </goals>
> > >             </execution>
> > >           </executions>
> > >         </plugin>
> > >       </plugins>
> > >    </build>
> > > </project>
> > >
> > > When I execute mvn wagon:upload, it first issues a warning
> > >
> > > [WARNING] Failed to retrieve plugin descriptor for
> > > org.apache.maven.wagon:wagon-webdav-jackrabbit:3.0.0: Failed to parse
> > > plugin descriptor for org.apache.maven.wagon:wagon-
> webdav-jackrabbit:3.0.0
> > > (D:\Workspace\m2repo\org\apache\maven\wagon\wagon-
> > > webdav-jackrabbit\3.0.0\wagon-webdav-jackrabbit-3.0.0.jar): No plugin
> > > descriptor found at META-INF/maven/plugin.xml
> > >
> > > And then goes on to say
> > >
> > > [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-
> plugin:1.0:upload
> > > (default-cli) on project myProject: The parameters 'url' for goal
> > > org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or
> invalid ->
> > > [Help 1]
> > >
> > > Any help on the correct configuration would be very helpful.
> > >
> > > [1] https://maven.apache.org/guides/mini/guide-configuring-
> > > plugins.html#Configuring_Build_Plugins
> > >
> > > Thanks,
> > >
> > > Lars
> > >
> > >
> >
> >
> > --
> > Olivier Lamy
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>



--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Reply | Threaded
Open this post in threaded view
|

RE: Problems configuring wagon-webdav-jackrabbit

Svensson, Lars
On Tuesday, February 27, 2018 12:34 PM, Olivier Lamy [mailto:[hidden email]] wrote:

> On 27 February 2018 at 21:29, Svensson, Lars <[hidden email]> wrote:
>
> > Hi Olivier and thanks for your quick reply!
> >
> > On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> > [hidden email]] wrote:
> >
> > > webdav is not a plugin but a protocol supported by wagon
> > > you're right using extension tag
> > > If you want to deploy your artifacts just configure
> > distributionManagement
> > > to use dav protocol: <url>dav:https://thewebdavurl/</url>
> > > Otherwise have a look at this plugin:
> > > http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I think you
> > > want to achieve)
> >
> > distributionManagement is not quite what I need since my use case is to
> > copy some generated files to a remote location.
> >
> > I had been looking at the wagon-maven-plugin but didn't get it to work
> > since the jars are not available.
> >
> > Now my pom looks like this (as specified in [1]):
> >
> > <project>
> >   <build>
> >     <extensions>
> >       <extension>
> >         <groupId>org.apache.maven.wagon</groupId>
> >         <artifactId>wagon-webdav</artifactId>
> >         <version>2.8</version>
> >       </extension>
> >     </extensions>
> >
>
>
> change to <artifactId>wagon-webdav-jackrabbit</artifactId>

OK. It loads the jar but brings us back where we started:

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload (default-cli) on project rdf: The parameters 'url' for goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid -> [Help 1]

> >     <plugins>
> >       <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>wagon-maven-plugin</artifactId>
> >          <version>1.0</version>
> >          <executions>
> >            <execution>
> >              <id> upload-artefacts-to-webdav</id>
> >              <phase>deploy</phase>
> >              <configuration>
> >                <fromDir> target/path/to/files</fromDir>
> >                <includes>*</includes>
> >                <url>dav://my.webdav.server/</url>
> >                <toDir>standards</toDir>
> >              </configuration>
> >              <goals>
> >                <goal>upload</goal>
> >              </goals>
> >            </execution>
> >          </executions>
> >        </plugin>
> >      </plugins>
> >   </build>
> > </project>

/Lars

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems configuring wagon-webdav-jackrabbit

olamy
try a dav url such
<url>dav:http(s)://my.webdav.server/</url>

On 27 February 2018 at 21:52, Svensson, Lars <[hidden email]> wrote:

> On Tuesday, February 27, 2018 12:34 PM, Olivier Lamy [mailto:
> [hidden email]] wrote:
>
> > On 27 February 2018 at 21:29, Svensson, Lars <[hidden email]> wrote:
> >
> > > Hi Olivier and thanks for your quick reply!
> > >
> > > On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> > > [hidden email]] wrote:
> > >
> > > > webdav is not a plugin but a protocol supported by wagon
> > > > you're right using extension tag
> > > > If you want to deploy your artifacts just configure
> > > distributionManagement
> > > > to use dav protocol: <url>dav:https://thewebdavurl/</url>
> > > > Otherwise have a look at this plugin:
> > > > http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I
> think you
> > > > want to achieve)
> > >
> > > distributionManagement is not quite what I need since my use case is to
> > > copy some generated files to a remote location.
> > >
> > > I had been looking at the wagon-maven-plugin but didn't get it to work
> > > since the jars are not available.
> > >
> > > Now my pom looks like this (as specified in [1]):
> > >
> > > <project>
> > >   <build>
> > >     <extensions>
> > >       <extension>
> > >         <groupId>org.apache.maven.wagon</groupId>
> > >         <artifactId>wagon-webdav</artifactId>
> > >         <version>2.8</version>
> > >       </extension>
> > >     </extensions>
> > >
> >
> >
> > change to <artifactId>wagon-webdav-jackrabbit</artifactId>
>
> OK. It loads the jar but brings us back where we started:
>
> [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> (default-cli) on project rdf: The parameters 'url' for goal
> org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid ->
> [Help 1]
>
> > >     <plugins>
> > >       <plugin>
> > >         <groupId>org.codehaus.mojo</groupId>
> > >         <artifactId>wagon-maven-plugin</artifactId>
> > >          <version>1.0</version>
> > >          <executions>
> > >            <execution>
> > >              <id> upload-artefacts-to-webdav</id>
> > >              <phase>deploy</phase>
> > >              <configuration>
> > >                <fromDir> target/path/to/files</fromDir>
> > >                <includes>*</includes>
> > >                <url>dav://my.webdav.server/</url>
> > >                <toDir>standards</toDir>
> > >              </configuration>
> > >              <goals>
> > >                <goal>upload</goal>
> > >              </goals>
> > >            </execution>
> > >          </executions>
> > >        </plugin>
> > >      </plugins>
> > >   </build>
> > > </project>
>
> /Lars
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Reply | Threaded
Open this post in threaded view
|

RE: Problems configuring wagon-webdav-jackrabbit

Svensson, Lars
On Tuesday, February 27, 2018 12:55 PM, Olivier Lamy [mailto:[hidden email]] wrote:

> try a dav url such
> <url>dav:http(s)://my.webdav.server/</url>

It already has that syntax <url>dav:http://my.server/</url>. What vexes me is that the plugin claims it cannot find the configuration. If I run

mvn -X wagon:upload

The console says

...
[DEBUG] Goal:          org.codehaus.mojo:wagon-maven-plugin:1.0:upload (default-cli)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <excludes>${wagon.excludes}</excludes>
  <followSymLink default-value="false">${wagon.followSymLink}</followSymLink>
  <fromDir default-value="${project.basedir}">${wagon.fromDir}</fromDir>
  <includes>${wagon.includes}</includes>
  <optimize default-value="false">${wagon.optimize}</optimize>
  <project default-value="${project}"/>
  <serverId default-value="serverId">${wagon.serverId}</serverId>
  <settings default-value="${settings}"/>
  <skip default-value="false">${wagon.skip}</skip>
  <toDir default-value="">${wagon.toDir}</toDir>
  <url>${wagon.url}</url>
  <useDefaultExcludes default-value="true">${wagon.useDefaultExcludes}</useDefaultExcludes>
</configuration>
...
[DEBUG] Configuring mojo org.codehaus.mojo:wagon-maven-plugin:1.0:upload from plugin realm ClassRealm[plugin>org.codehaus.mojo:wagon-maven-plugin:1.0, parent: sun.misc.Launcher$AppClassLoader@55f96302]
[DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0:upload' with basic configurator -->
[DEBUG]   (f) followSymLink = false
[DEBUG]   (f) fromDir = /path/to/project/home/not/to/fromDir
[DEBUG]   (f) optimize = false
[DEBUG]   (f) project = <projectInfo>
[DEBUG]   (f) serverId = serverId
[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@5c84624f
[DEBUG]   (f) skip = false
[DEBUG]   (f) useDefaultExcludes = true
[DEBUG] -- end configuration --

The fromDir used by the configurator obviously is not the one specified in the pom, and also the includes, the url and the toDir are missing:

> > > >              <configuration>
> > > >                <fromDir> target/path/to/files</fromDir>
> > > >                <includes>*</includes>
> > > >                <url>dav://my.webdav.server/</url>
> > > >                <toDir>standards</toDir>
> > > >              </configuration>

So it seems that something is seriously wrong with my pom and I cannot figure out what...

/Lars

> On 27 February 2018 at 21:52, Svensson, Lars <[hidden email]> wrote:
>
> > On Tuesday, February 27, 2018 12:34 PM, Olivier Lamy [mailto:
> > [hidden email]] wrote:
> >
> > > On 27 February 2018 at 21:29, Svensson, Lars <[hidden email]> wrote:
> > >
> > > > Hi Olivier and thanks for your quick reply!
> > > >
> > > > On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> > > > [hidden email]] wrote:
> > > >
> > > > > webdav is not a plugin but a protocol supported by wagon
> > > > > you're right using extension tag
> > > > > If you want to deploy your artifacts just configure
> > > > distributionManagement
> > > > > to use dav protocol: <url>dav:https://thewebdavurl/</url>
> > > > > Otherwise have a look at this plugin:
> > > > > http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I
> > think you
> > > > > want to achieve)
> > > >
> > > > distributionManagement is not quite what I need since my use case is to
> > > > copy some generated files to a remote location.
> > > >
> > > > I had been looking at the wagon-maven-plugin but didn't get it to work
> > > > since the jars are not available.
> > > >
> > > > Now my pom looks like this (as specified in [1]):
> > > >
> > > > <project>
> > > >   <build>
> > > >     <extensions>
> > > >       <extension>
> > > >         <groupId>org.apache.maven.wagon</groupId>
> > > >         <artifactId>wagon-webdav</artifactId>
> > > >         <version>2.8</version>
> > > >       </extension>
> > > >     </extensions>
> > > >
> > >
> > >
> > > change to <artifactId>wagon-webdav-jackrabbit</artifactId>
> >
> > OK. It loads the jar but brings us back where we started:
> >
> > [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> > (default-cli) on project rdf: The parameters 'url' for goal
> > org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or invalid ->
> > [Help 1]
> >
> > > >     <plugins>
> > > >       <plugin>
> > > >         <groupId>org.codehaus.mojo</groupId>
> > > >         <artifactId>wagon-maven-plugin</artifactId>
> > > >          <version>1.0</version>
> > > >          <executions>
> > > >            <execution>
> > > >              <id> upload-artefacts-to-webdav</id>
> > > >              <phase>deploy</phase>
> > > >              <configuration>
> > > >                <fromDir> target/path/to/files</fromDir>
> > > >                <includes>*</includes>
> > > >                <url>dav://my.webdav.server/</url>
> > > >                <toDir>standards</toDir>
> > > >              </configuration>
> > > >              <goals>
> > > >                <goal>upload</goal>
> > > >              </goals>
> > > >            </execution>
> > > >          </executions>
> > > >        </plugin>
> > > >      </plugins>
> > > >   </build>
> > > > </project>
> >
> > /Lars
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
>
> --
> Olivier Lamy
> http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Problems configuring wagon-webdav-jackrabbit

Anders Hammar
The problem is that you have specified the configuration for a specific
execution. An execution bound to the deploy phase.
If you want to execute from command line by specifying wagon:upload you
should remove the executions sectio nand move the configuration out to
plugin level. Also, from an aesthetic Maven perspective, you should have
this in pluginManagement.

Follow this example for maven-compiler-plugin:
https://maven.apache.org/plugins/maven-compiler-plugin/usage.html

/Anders

On Tue, Feb 27, 2018 at 1:27 PM, Svensson, Lars <[hidden email]> wrote:

> On Tuesday, February 27, 2018 12:55 PM, Olivier Lamy [mailto:
> [hidden email]] wrote:
>
> > try a dav url such
> > <url>dav:http(s)://my.webdav.server/</url>
>
> It already has that syntax <url>dav:http://my.server/</url>. What vexes
> me is that the plugin claims it cannot find the configuration. If I run
>
> mvn -X wagon:upload
>
> The console says
>
> ...
> [DEBUG] Goal:          org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> (default-cli)
> [DEBUG] Style:         Regular
> [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
>   <excludes>${wagon.excludes}</excludes>
>   <followSymLink default-value="false">${wagon.
> followSymLink}</followSymLink>
>   <fromDir default-value="${project.basedir}">${wagon.fromDir}</fromDir>
>   <includes>${wagon.includes}</includes>
>   <optimize default-value="false">${wagon.optimize}</optimize>
>   <project default-value="${project}"/>
>   <serverId default-value="serverId">${wagon.serverId}</serverId>
>   <settings default-value="${settings}"/>
>   <skip default-value="false">${wagon.skip}</skip>
>   <toDir default-value="">${wagon.toDir}</toDir>
>   <url>${wagon.url}</url>
>   <useDefaultExcludes default-value="true">${wagon.useDefaultExcludes}</
> useDefaultExcludes>
> </configuration>
> ...
> [DEBUG] Configuring mojo org.codehaus.mojo:wagon-maven-plugin:1.0:upload
> from plugin realm ClassRealm[plugin>org.codehaus.mojo:wagon-maven-plugin:1.0,
> parent: sun.misc.Launcher$AppClassLoader@55f96302]
> [DEBUG] Configuring mojo 'org.codehaus.mojo:wagon-maven-plugin:1.0:upload'
> with basic configurator -->
> [DEBUG]   (f) followSymLink = false
> [DEBUG]   (f) fromDir = /path/to/project/home/not/to/fromDir
> [DEBUG]   (f) optimize = false
> [DEBUG]   (f) project = <projectInfo>
> [DEBUG]   (f) serverId = serverId
> [DEBUG]   (f) settings = org.apache.maven.execution.
> SettingsAdapter@5c84624f
> [DEBUG]   (f) skip = false
> [DEBUG]   (f) useDefaultExcludes = true
> [DEBUG] -- end configuration --
>
> The fromDir used by the configurator obviously is not the one specified in
> the pom, and also the includes, the url and the toDir are missing:
>
> > > > >              <configuration>
> > > > >                <fromDir> target/path/to/files</fromDir>
> > > > >                <includes>*</includes>
> > > > >                <url>dav://my.webdav.server/</url>
> > > > >                <toDir>standards</toDir>
> > > > >              </configuration>
>
> So it seems that something is seriously wrong with my pom and I cannot
> figure out what...
>
> /Lars
>
> > On 27 February 2018 at 21:52, Svensson, Lars <[hidden email]> wrote:
> >
> > > On Tuesday, February 27, 2018 12:34 PM, Olivier Lamy [mailto:
> > > [hidden email]] wrote:
> > >
> > > > On 27 February 2018 at 21:29, Svensson, Lars <[hidden email]>
> wrote:
> > > >
> > > > > Hi Olivier and thanks for your quick reply!
> > > > >
> > > > > On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> > > > > [hidden email]] wrote:
> > > > >
> > > > > > webdav is not a plugin but a protocol supported by wagon
> > > > > > you're right using extension tag
> > > > > > If you want to deploy your artifacts just configure
> > > > > distributionManagement
> > > > > > to use dav protocol: <url>dav:https://thewebdavurl/</url>
> > > > > > Otherwise have a look at this plugin:
> > > > > > http://www.mojohaus.org/wagon-maven-plugin/usage.html (which I
> > > think you
> > > > > > want to achieve)
> > > > >
> > > > > distributionManagement is not quite what I need since my use case
> is to
> > > > > copy some generated files to a remote location.
> > > > >
> > > > > I had been looking at the wagon-maven-plugin but didn't get it to
> work
> > > > > since the jars are not available.
> > > > >
> > > > > Now my pom looks like this (as specified in [1]):
> > > > >
> > > > > <project>
> > > > >   <build>
> > > > >     <extensions>
> > > > >       <extension>
> > > > >         <groupId>org.apache.maven.wagon</groupId>
> > > > >         <artifactId>wagon-webdav</artifactId>
> > > > >         <version>2.8</version>
> > > > >       </extension>
> > > > >     </extensions>
> > > > >
> > > >
> > > >
> > > > change to <artifactId>wagon-webdav-jackrabbit</artifactId>
> > >
> > > OK. It loads the jar but brings us back where we started:
> > >
> > > [ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-
> plugin:1.0:upload
> > > (default-cli) on project rdf: The parameters 'url' for goal
> > > org.codehaus.mojo:wagon-maven-plugin:1.0:upload are missing or
> invalid ->
> > > [Help 1]
> > >
> > > > >     <plugins>
> > > > >       <plugin>
> > > > >         <groupId>org.codehaus.mojo</groupId>
> > > > >         <artifactId>wagon-maven-plugin</artifactId>
> > > > >          <version>1.0</version>
> > > > >          <executions>
> > > > >            <execution>
> > > > >              <id> upload-artefacts-to-webdav</id>
> > > > >              <phase>deploy</phase>
> > > > >              <configuration>
> > > > >                <fromDir> target/path/to/files</fromDir>
> > > > >                <includes>*</includes>
> > > > >                <url>dav://my.webdav.server/</url>
> > > > >                <toDir>standards</toDir>
> > > > >              </configuration>
> > > > >              <goals>
> > > > >                <goal>upload</goal>
> > > > >              </goals>
> > > > >            </execution>
> > > > >          </executions>
> > > > >        </plugin>
> > > > >      </plugins>
> > > > >   </build>
> > > > > </project>
> > >
> > > /Lars
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> >
> >
> > --
> > Olivier Lamy
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>
Reply | Threaded
Open this post in threaded view
|

RE: Problems configuring wagon-webdav-jackrabbit

Svensson, Lars
On Tuesday, February 27, 2018 2:53 PM, [hidden email] [mailto:[hidden email]] On Behalf wrote:

> The problem is that you have specified the configuration for a specific
> execution. An execution bound to the deploy phase.
> If you want to execute from command line by specifying wagon:upload you
> should remove the executions sectio nand move the configuration out to
> plugin level. Also, from an aesthetic Maven perspective, you should have
> this in pluginManagement.
>
> Follow this example for maven-compiler-plugin:
> https://maven.apache.org/plugins/maven-compiler-plugin/usage.html

Ah, now it works. Thank you!

Best,

Lars

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]