Will Holcomb <[EMAIL PROTECTED]> writes:
>I was just wondering if anyone had any suggestions that would let me stick
>with a pure maven build.
I use this in my maven.xml
--- cut ---
<patternset id="template.files.include">
<exclude name="screens/Index.vm"/>
</patternset>
<patternset id="template.files.exclude">
<include name="screens/Index.vm"/>
</patternset>
<postGoal name="jar:install">
<echo>Copying ${template.jar.name}.jar into local repository
${maven.repo.local}</echo>
<copy todir="${maven.repo.local}/${pom.groupId}/jars/">
<fileset dir="${maven.build.dir}">
<include name="${template.jar.name}.jar"/>
</fileset>
</copy>
</postGoal>
<postGoal name="java:jar">
<attainGoal name="build-template-jar"/>
</postGoal>
<goal name="build-template-jar" description="Erzeugt das Template Jar fuer die
Applikation">
<j:set var="template.jar.name"
value="${pom.artifactId}-templates-${pom.currentVersion}"/>
<uptodate
property="haveTemplateJar"
targetfile="${maven.build.dir}/${template.jar.name}.jar">
<srcfiles dir="${maven.src.dir}/templates">
<patternset refid="template.files.include"/>
</srcfiles>
</uptodate>
<j:if test="${haveTemplateJar != 'true'}">
<echo>Building Templates Jar: ${template.jar.name}.jar</echo>
<mkdir dir="${maven.build.dir}"/>
<jar jarfile="${maven.build.dir}/${template.jar.name}.jar">
<metainf dir="${basedir}">
<include name="LICENSE.txt"/>
</metainf>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<!-- name should be '/' separated, not '.' -->
<section name="${maven.package}">
<attribute name="Specification-Title" value="${pom.artefactId}"/>
<attribute name="Specification-Version" value="${pom.currentVersion}"/>
<attribute name="Specification-Vendor" value="${pom.organization}"/>
<attribute name="Implementation-Title" value="${pom.package}"/>
<attribute name="Implementation-Version" value="${pom.currentVersion}"/>
<attribute name="Implementation-Vendor" value="${pom.organization}"/>
</section>
</manifest>
<fileset dir="${maven.src.dir}/templates">
<patternset refid="template.files.include"/>
</fileset>
</jar>
</j:if>
</goal>
--- cut ---
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
[EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/
Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development -- hero for hire
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]