Mark St. Godard 9b898e84c4 Added Java 5 Annotations version of Contacts sample (contacts-tiger).
Note: I have added a pre goal to add the source dir of  the original Contacts example.

I also added an exclude on the main project.properties for the attributes sample, as the Commons Attributes plugin causes issues with Java 5 source compilation.

The Annotations version will eventually replace the Commons Attributes approach, for now those users will need to manually build the attributes example.
2005-09-25 05:58:49 +00:00

58 lines
1.8 KiB
XML

<project
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:artifact="artifact"
xmlns:maven="jelly:maven">
<preGoal name="java:compile">
<path id="additional.src.path">
<pathelement location="../contacts/src/main/java"/>
</path>
<maven:addPath id="maven.compile.src.set" refid="additional.src.path"/>
</preGoal>
<goal name="war">
<echo>The "war" goal is deprecated. Use "multiwar:multiwar" instead.</echo>
</goal>
<goal name="multiwar:multiwar">
<!-- needed otherwise first custom artifact (cas) doesn't get built) -->
<attainGoal name="acegisecurity:war"/>
<!-- filter war -->
<j:set var="webapp" value="filter"/>
<attainGoal name="acegisecurity:war"/>
<!-- delete generic artifact (we only want our three custom WARs) -->
<ant:delete file="${maven.war.build.dir}/${pom.artifactId}.war"/>
</goal>
<goal name="acegisecurity:war">
<maven:set plugin="maven-war-plugin"
property="maven.war.webapp.dir"
value="${maven.war.build.dir}/${pom.artifactId}-${webapp}"/>
<maven:set plugin="maven-war-plugin"
property="maven.war.final.name"
value="${pom.artifactId}-${webapp}.war"/>
<attainGoal name="war:war"/>
</goal>
<goal name="multiwar:install">
<attainGoal name="multiwar:multiwar"/>
<echo>multiproject:install doesn't install Contacts Samples WARs to local repo</echo>
</goal>
<postGoal name="war:war-resources">
<maven:get plugin="maven-war-plugin"
property="maven.war.webapp.dir"
var="maven.war.webapp.dir"/>
<ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
<ant:fileset dir="${maven.war.src}/../${webapp}"/>
</ant:copy>
</postGoal>
</project>