Skip to content

Instantly share code, notes, and snippets.

@wataru420
Created June 14, 2012 11:53
Show Gist options
  • Select an option

  • Save wataru420/2929844 to your computer and use it in GitHub Desktop.

Select an option

Save wataru420/2929844 to your computer and use it in GitHub Desktop.
maven-war-plugin
<build>
<finalName>myapp</finalName>
<resources>
<resource>
<directory>${resources.directory}</directory>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals><goal>war</goal></goals>
</execution>
</executions>
<configuration>
<webXml>${webxml.path}</webXml>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<webxml.path>src/main/webapp/WEB-INF/web.xml</webxml.path>
</properties>
</profile>
<profile>
<id>pc</id>
<properties>
<resources.directory>${basedir}/src/pc/resources/</resources.directory>
<webxml.path>src/main/webapp/WEB-INF/web.xml</webxml.path>
</properties>
</profile>
<profile>
<id>mobile</id>
<properties>
<resources.directory>${basedir}/src/mobile/resources/</resources.directory>
<webxml.path>${basedir}/src/mobile/WEB-INF/web.xml</webxml.path>
</properties>
</profile>
</profiles>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment