pom.xml
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>delete-dependency-library</id>
<phase>clean</phase>
<goals><goal>run</goal></goals>
<configuration>
<tasks>
<delete><fileset dir="${basedir}/webapps/WEB-INF/lib" /></delete>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
pom.xml
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete file="${project.build.outputDirectory}/log4j.xml"/>
<copy file="src/main/resources-local/log4j-local.xml"
tofile="${project.build.outputDirectory}/log4j.xml"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
.jsp
...
<link rel="stylesheet" type="text/css" href="/mashup/yahoo/css/skin.css?@buildVersion@" />
<link rel="stylesheet" type="text/css" href="/mashup/yahoo/css/YUIEditor-min.css?@buildVersion@" />
<script type="text/javascript" src="/common/js/Common.js?@buildVersion@"></script>
...
pom.xml
<modelVersion>4.0.0</modelVersion>
<groupId>com.gurubee.service</groupId>
<artifactId>gurubee-project</artifactId>
<packaging>jar</packaging>
<version>4.1.0.3</version>
<name>gurubee Project</name>
<url>/</url>
<profile>
<id>release</id>
<properties>
<env>release</env>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>set-version-resource-file</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="##### Setting product version in source code" />
<replace dir="${project.basedir}/webapps/WEB-INF/pages"
includes="**/*.jsp"
token="@buildVersion@"
value="${project.version}"
encoding="UTF-8" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
pom.xml
<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/maven-v4_0_0.xsd">
...
<build>
...
<plugins>
...
<!-- yuicompressor:compress -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<jswarn>false</jswarn>
<sourceDirectory>${project.basedir}/webapps/common</sourceDirectory>
<outputDirectory>${project.basedir}/webapps/common</outputDirectory>
<encoding>${project.build.sourceEncoding}</encoding>
<excludes>
<exclude>**/*min.js</exclude>
<exclude>**/*min.css</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</configuration>
</plugin>
...
</plugins>
</build>
</project>