I'm having a POM file which is currently copying the compiled EAR file to a linux directory.
I mean to do the same for my Windows developers, without having them to manually adapt the output directory. Thus, the maven resource plugin should determine the path (/projects/shared_ears for Linux and D:\projects_bin\shared_ears for Windows) by the operating system. Can it be done with the maven-resources-plugin? Saying, without using the maven ant run plugin?
Below the existing copy command applicable for linux OS only.
Thanks for any smart idea.
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>/projects/shared_ears</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<includes>
<include>project-${project.version}.ear</include>
</includes>
</resource>
</resources>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>