Reputation: 3850
sorry for lamer question, but I really could not found subject. I have a external to the pom.xml file, say backup.properties, and would like it load by next mvn run.
Any direction would be greatly appreciated
Oleg
Upvotes: 0
Views: 812
Reputation: 298898
Take a look at the Properties Maven Plugin:
The Properties Maven Plugin is here to make life a little easier when dealing with properties. It provides goals to read and write properties from and to files, and also to set system properties.
It's main use-case is loading properties from files instead of declaring them in pom.xml, something that comes in handy when dealing with different environments.
Usage:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>etc/config/dev.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
Upvotes: 2