Yes that was it *oops* need to be more careful before annoying heads
with such trivialities. Thanks!

 

In case anyone else need something like this here's what I ended up with

 

    <goal name="war:war" prereqs="war:webapp" description="Build a war
file">

      

      <ant:echo>Building WAR ${pom.artifactId}</ant:echo>

  

      <ant:mkdir dir="${maven.war.build.dir}" />

      

      

      <j:forEach var="lib" items="${pom.artifacts}">

      <j:set var="dep" value="${lib.dependency}"/>     

      <j:if test="${dep.getProperty('manifest.classpath') != null}">

         <j:set var="manifestclasspath" value="${lib.name}
${manifestclasspath}" scope="parent"/>

      </j:if>  

      </j:forEach>

      

      <!-- 

            if the Class-Path variable is to be set then it is necessary
to build a new war

          as otherwise it will merely add a new Class-Path variable and
not replace the older one

      -->

      <j:if test="${manifestclasspath == null}">

            

      <j:set var="updatejar" value="true"/>

      <echo>updating ${updatejar}</echo>

      </j:if>

      

      <ant:jar 

           destfile="${maven.war.build.dir}/${maven.war.final.name}"

           basedir="${maven.war.webapp.dir}"         

           update="${updatejar}"

           index="${maven.war.index}">

        <ant:metainf dir="${licenseFile.canonicalFile.parent}">

          <ant:include name="${licenseFile.canonicalFile.name}"/>

        </ant:metainf>

        

                 

  

        <ant:manifest>

          <ant:attribute name="Built-By" value="${user.name}" />

          <ant:section name="${pom.package}">

            <ant:attribute name="Specification-Title"
value="${pom.artifactId}" />

            <ant:attribute name="Specification-Version"

                       value="${pom.currentVersion}" />

            <ant:attribute name="Specification-Vendor"

                       value="${pom.organization.name}" />

            <ant:attribute name="Implementation-Title"

                       value="${pom.package}" />

            <ant:attribute name="Implementation-Version"

                       value="${pom.currentVersion}" />

            <ant:attribute name="Implementation-Vendor"

                       value="${pom.organization.name}" />

            

          </ant:section>

          

          <j:if test="${manifestclasspath != null}">

                  <ant:attribute name="Class-Path"
value="${manifestclasspath}" />

          </j:if>  

        </ant:manifest>

        

  

      </ant:jar>

  

  </goal>

 

------------------------------------

Stephen Gargan, IT Engineer

[EMAIL PROTECTED]

------------------------------------

 

 

-----Original Message-----

From: Gilles Dodinet [mailto:[EMAIL PROTECTED] 

Sent: Tuesday, January 06, 2004 4:08 PM

To: Gargan, Stephen

Subject: Re: Building a list in a variable

 

Gargan, Stephen wrote:

 

>               <j:set var="manifestclasspath" 

>value="${manifestClasspath} ${lib.name}" scope="parent"/>

>

 

Stephen,

 

perhaps it is just a typo in the mail but in the value attribute you put


a 'C' in manifestClasspath whereas all over the place there was a 'c' 

(manifestclasspath). could your problem come from that ?

 

-- gd

  

 

 

 

Reply via email to