Skip to content

Instantly share code, notes, and snippets.

@eddumelendez
Created September 18, 2012 05:37
Show Gist options
  • Save eddumelendez/3741455 to your computer and use it in GitHub Desktop.
Save eddumelendez/3741455 to your computer and use it in GitHub Desktop.
maven-antrun-plugin
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<profiles>
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="config/prod/quartz.properties"
tofile="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/quartz.properties" />
<copy file="config/prod/mail.properties"
tofile="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/mail.properties" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="config/dev/quartz.properties"
tofile="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/quartz.properties" />
<copy file="config/dev/mail.properties"
tofile="${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/mail.properties" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment