Very handy; this is doing just what I needed pretty much. One note 
though... The ${pom.artifactId} comes up empty for me (using maven 
1.0-beta-7). ${pom.id} works though.

(Also, artifactId is spelt artefactId down in the jar tag; just in case
that something that needs fixing in your source.)

Thanks
Will

On Thu, 6 Mar 2003, Henning P. Schmiedehausen wrote:

> <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>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to