On 27 February 2018 at 21:29, Svensson, Lars <l.svens...@dnb.de> wrote:

> Hi Olivier and thanks for your quick reply!
>
> On Tuesday, February 27, 2018 11:54 AM, Olivier Lamy [mailto:
> ol...@apache.org] 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 <l.svens...@dnb.de> 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 via email to