Hi Pascal,

Looks like you left the filename out in the first manifest task ... this 
is required:

        http://ant.apache.org/manual/CoreTasks/manifest.html

        <manifest file="MANIFEST.MF">
        <attribute name="Built-By" value="${user.name}"/>
        <section name="common">
          <attribute name="Specification-Title" value="Example"/>
          <attribute name="Specification-Version" value="${version}"/>
        <attribute name="Specification-Vendor" value="Example 
Organization"/>
        <attribute name="Implementation-Title" value="common"/>
        <attribute name="Implementation-Version" value="${version} 
${TODAY}"/> 
        <attribute name="Implementation-Vendor" value="Example Corp."/>
        </section>
        <section name="common/class1.class">
        <attribute name="Sealed" value="false"/>
        </section>
     </manifest>

Hope this helps ....

Ray Harper, Jr. 
Software Engineer II 
Wachovia Corporation 
1525 West WT Harris Blvd. Charlotte, NC, 28270 
Tel: 704-427-1717 ? Fax: 704-427-3234 ? Mailcode: NC1077 
 
CONFIDENTIALITY NOTICE:
The information accompanying this email transmission may contain 
confidential or legally privileged information that is intended only for 
the use of the individual or entity named in this message. If you are not 
the intended recipient, you are hereby notified that any disclosure, 
copying, distribution or reliance upon the contents of this email is 
strictly prohibited. If you receive this email in error, please notify the 
sender immediately.




Pascal Lalonde <[EMAIL PROTECTED]> 
10/28/2008 11:55 AM
Please respond to
"Ant Users List" <user@ant.apache.org>


To
"user@ant.apache.org" <user@ant.apache.org>
cc

Subject
Update Manifest






I am attempting to update two manifest files from existing jar and war.

The goal of my ant task is to update their manifest file and jar the 
parent folder.
This is what my task looks like:

<target name="copy-files">
<echo>********************************************************************</echo>
                <echo>Copying the binaries to configured 
destination.</echo>
                <copy todir="${env.deploy.path}-${env.repos.revision}">
                                <fileset 
dir="${env.source.path}/Optimizer/deploy"/>
                </copy>
                <tstamp/>
                <jar 
destfile="${env.repos.username}-${DSTAMP}${TSTAMP}-${env.repos.revision}.zip" 
basedir="${env.deploy.path}-${env.repos.revision}">
                                <manifest>
                                                <attribute name="Built-By" 
value="${env.repos.username}"/>
                                                <attribute 
name="Built-Date" value="${DSTAMP}${TSTAMP}"/>
                                                <attribute 
name="Repository" value="${env.repos.url}"/>
                                                <attribute name="Revision" 
value="${env.repos.revision}"/>
                                </manifest>
                                <manifest 
file="${env.deploy.path}-${env.repos.revision}/local/comact_Optimizer_main.jar 
" mode="update">
                                                <attribute name="Built-By" 
value="${env.repos.username}"/>
                                                <attribute 
name="Built-Date" value="${DSTAMP}${TSTAMP}"/>
                                                <attribute 
name="Repository" value="${env.repos.url}"/>
                                                <attribute name="Revision" 
value="${env.repos.revision}"/>
                                </manifest>
                                <!--manifest 
file="${env.deploy.path}-${env.repos.revision}/web/EdgExpert.war" 
mode="update">
                                                <attribute name="Built-By" 
value="${env.repos.username}"/>
                                                <attribute 
name="Built-Date" value="${DSTAMP}${TSTAMP}"/>
                                                <attribute 
name="Repository" value="${env.repos.url}"/>
                                                <attribute name="Revision" 
value="${env.repos.revision}"/>
                                </manifest-->
                </jar>
                <echo>[DONE]</echo>
 
<echo>********************************************************************</echo>
</target>

The copy is executed without any problem, right after the copy. The build 
quits without any error, and manifest aren't updated. If I comment the two 
last manifest call, everything gets executed without any problem.

I tried reading the doc to find "update" samples, but didn't find any.
Or maybe the manifest calls aren't done at the right place ?
Something important to know is that this script is not the one building 
the jar and war files.

Thanks for your help,
Pascal

Reply via email to