aboutsummaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-12-29 14:14:08 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2012-12-29 14:14:08 +1300
commit65913d45863159b9652865bc4f23eb62120d9b62 (patch)
treece9f48f3ee8716ee93ad359f3acc4c71be0741fd /pom.xml
parent9c2ed26b25a0454c2e90943386050d6c05e7ae5d (diff)
downloadtrackermap-web-65913d45863159b9652865bc4f23eb62120d9b62.tar.gz
trackermap-web-65913d45863159b9652865bc4f23eb62120d9b62.tar.bz2
trackermap-web-65913d45863159b9652865bc4f23eb62120d9b62.zip
Add debug and release database config
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml41
1 files changed, 41 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 96cda183..e38c500f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,6 +144,7 @@
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -153,6 +154,46 @@
<target>1.6</target>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>debug</id>
+ <phase>process-resources</phase>
+ <configuration>
+ <target>
+ <delete
+ file="${webappDirectory}/WEB-INF/classes/META-INF/persistence.xml" />
+ <copy
+ file="${webappDirectory}/WEB-INF/classes/META-INF/persistence_debug.xml"
+ tofile="${webappDirectory}/WEB-INF/classes/META-INF/persistence.xml" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>release</id>
+ <phase>prepare-package</phase>
+ <configuration>
+ <target>
+ <delete
+ file="${webappDirectory}/WEB-INF/classes/META-INF/persistence.xml" />
+ <copy
+ file="${webappDirectory}/WEB-INF/classes/META-INF/persistence_release.xml"
+ tofile="${webappDirectory}/WEB-INF/classes/META-INF/persistence.xml" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>