Created
January 17, 2010 18:56
-
-
Save kares/279504 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.kares</groupId> | |
<artifactId>webapp</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<name>webapp</name> | |
<dependencies> | |
<dependency> | |
<groupId>javax.servlet</groupId> | |
<artifactId>servlet-api</artifactId> | |
<version>2.5</version> | |
<scope>provided</scope> | |
</dependency> | |
<!-- ... --> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-war-plugin</artifactId> | |
<version>2.1-beta-1</version> | |
<configuration> | |
<warSourceDirectory> | |
${basedir}/src/main/webapp | |
</warSourceDirectory> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
<properties> | |
<!-- will be used as a web resource (@see overrides.groovy) : --> | |
<override.resources.dir> | |
${project.build.directory}/override-resources | |
</override.resources.dir> | |
</properties> | |
<profiles> | |
<profile> | |
<id>production</id> | |
<build> | |
<plugins> | |
<!-- replace env settings in config files --> | |
<plugin> | |
<groupId>org.codehaus.groovy.maven</groupId> | |
<artifactId>gmaven-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>generate-resources</phase> | |
<goals> | |
<goal>execute</goal> | |
</goals> | |
<configuration> | |
<source>${basedir}/overrides.groovy</source> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-war-plugin</artifactId> | |
<configuration> | |
<webResources> | |
<!-- @see overrides.groovy --> | |
<resource> | |
<directory>${override.resources.dir}</directory> | |
<filtering>false</filtering> | |
</resource> | |
</webResources> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
<properties> | |
<!-- read in overrides.groovy --> | |
<SOME_PORT>80</SOME_PORT> | |
</properties> | |
</profile> | |
</profiles> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment