1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
<project
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
default="java:jar">
<preGoal name="java:compile">
<ant:filter token="VERSION" value="${pom.currentVersion}"/>
<ant:filter token="JAR" value="${maven.final.name}-full.jar"/>
<copy toDir="target/src" filtering="true" overwrite="true">
<fileset dir="${pom.build.sourceDirectory}">
<includes name="**/*"/>
</fileset>
</copy>
<path id="maven.compile.src.set" location="target/src"/>
</preGoal>
<postGoal name="uberjar">
<ant:move file="${maven.build.dir}/${maven.final.name}-uber.jar" toFile="${maven.build.dir}/${maven.final.name}-full.jar" overwrite="true"/>
</postGoal>
<postGoal name="dist:build">
<attainGoal name="uberjar"/>
<j:set var="distdir"
value="${pom.getPluginContext('maven-dist-plugin').getVariable('maven.dist.dir')}"/>
<!-- Copy UberJars -->
<ant:copy todir="${distdir}">
<ant:fileset dir="${maven.build.dir}">
<ant:include name="${maven.final.name}-full.jar"/>
</ant:fileset>
</ant:copy>
</postGoal>
<goal name="dist:snapshot"
description="Create a snapshot distribution">
<maven:snapshot project="${pom}"/>
<j:set var="maven.final.name" value="${snapshotSignature}"/>
<ant:echo>Building snapshot JAR: ${maven.final.name}</ant:echo>
<attainGoal name="dist"/>
</goal>
</project>
|