Downloading a problem using maven-wagon-plugin

I have a strange problem when I try to load plug-in files for a car during the site-deploy life cycle when I call the release:perform target. It seems the car loads the files correctly when im calls mvn site-deploy , but it just answers

Do not upload anything

when calling mvn release:perform , which should call the site site-deploy phases, as indicated in the documentation.

This is the plugin configuration for the station wagon.

  <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> <version>1.0-beta-3</version> <executions> <execution> <id>upload-jars</id> <phase>deploy site-deploy</phase> <goals> <goal>upload</goal> </goals> <configuration> <fromDir>target/checkout/target</fromDir> <includes>*.jar</includes> <url>scpexe://nohost.com</url> <toDir>/var/www/projects/test</toDir> <serverId>server - projects</serverId> </configuration> </execution> </executions> </plugin> 

maven tells me that the correct goals have begun:

 [INFO] Executing goals 'deploy site-deploy'... [INFO] [INFO] Scanning for projects... 

but the car doesn’t load anything:

 [INFO] [INFO] --- wagon-maven-plugin:1.0-beta-3:upload (default) @ exp4j --- [INFO] [INFO] Nothing to upload. [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD SUCCESS 

Does anyone see my problem that makes maven work as expected when calling site-deploy , but when doing release:perform ?

+4
source share
2 answers

This plugin does not do what you think. Believe me, I was there.

The base carriage protocol is intended only for communication with Maven repositories, and not with arbitrary directories. If the material you click does not have files and directories in the repo template, the plugin will decide that it has nothing to do.

I spent hours and hours on it, read the code and came to the conclusion that this plugin is not intended to be useful for pushing arbitrary files to arbitrary places and actually does not work for this purpose.

+4
source

I had the same problem until I found that the "includes" tag must contain "/ *" in order to include files and subdirectories recursively. See the comments on this blog post.

 <includes>*/**</includes> 
+2
source

Source: https://habr.com/ru/post/1345960/


All Articles