I am looking through the Maven Wagon Plugin to try to upload some artifacts to remote UNC servers ( \\servername\share\directory\to\put\to), and I have got it configured to work in POM:
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-3</version>
<executions>
<execution>
<id>upload-jar-to-folder</id>
<phase>deploy</phase>
<goals>
<goal>upload</goal>
</goals>
</execution>
</executions>
<configuration>
<fromDir>${project.build.directory}</fromDir>
<includes>*</includes>
<url>file://localhost///${servername}/${sharename}</url>
<toDir>directory/to/put/artifact</toDir>
</configuration>
</plugin>
...
</build>
This works fine for a single server in transit -Dservername=x -Dsharename=y, but how can I scale it so that I can run the deployment for QA or Prod, where I have multiple servers for deployment?
( ) script mvn wagon:upload -Penvironment# - , . script , script . ( Maven)...
<executions> ? , wagon:upload mvn deploy -Pqa?