Skip to content

Instantly share code, notes, and snippets.

@geowarin
Created January 23, 2013 18:29
Show Gist options
  • Save geowarin/4611314 to your computer and use it in GitHub Desktop.
Save geowarin/4611314 to your computer and use it in GitHub Desktop.
maven : property-management. Here is how I manage my properties in a multi-module project with maven. See http://geowarin.wordpress.com/2013/01/23/a-proposition-for-managing-centralized-resources-with-maven
<build>
<resources>
<resource>
<directory>../modular-parent/dev-resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>../modular-parent/test-resources</directory>
</testResource>
</testResources>
</build>
<profiles>
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-prod-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<overwrite>true</overwrite>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>../modular-parent/prod-resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment