Skip to content

Instantly share code, notes, and snippets.

@polster
Created April 20, 2015 15:24
Show Gist options
  • Save polster/7ae8e0e9477feeeaca1c to your computer and use it in GitHub Desktop.
Save polster/7ae8e0e9477feeeaca1c to your computer and use it in GitHub Desktop.
Multiple config profiles with Maven
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/config/local</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>dev</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/config/dev</directory>
</resource>
</resources>
</build>
</profile>
</profiles>
src/main/resources
|
+- local
| |
| `- specific.properties
+- dev
|
`- specific.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment