• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ANT - MANIFEST.MF

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone im working with ant to create some ear files and well im having an issue, to create the manifest.mf file this is what happens i create the manifest file with ant and it work fine but when i created the ear file it overrides it, this is part of my buil where i think the ploblem is


<target name="buildnumber" depends="buildWar">
<!-- Create the MANIFEST.MF file -->
<property name="application.id" value="${DSTAMP}_${TSTAMP}_v${build.number}" />
<manifest file="${dirs.base}/${project.ear}/META-INF/MANIFEST.MF">
<attribute name="Built-By" value="Me" />
<attribute name="Specification-Title" value="${app.name}" />
<attribute name="Specification-Version" value="${build.number}" />
<attribute name="Specification-Vendor" value="vendor name" />
<attribute name="Implementation-Title" value="${app.name}" />
<attribute name="Implementation-Version" value="${application.id}" />
<attribute name="Implementation-Vendor" value="vendor name" />
</manifest>
</target>

<target name="buildEar" depends="buildnumber">
<!-- Create ear file and place in ear directory -->
<property name="application.id" value="${DSTAMP}_${TSTAMP}_v${build.number}" />
<jar jarfile="${dirs.base}/${application.id}_${app.name}.ear" basedir="${project.ear}" />
</target>


any suggestions?

i know maybe i did not explain myself very good this is what im trying to explain, if i check ${dirs.base}/${project.ear}/META-INF/MANIFEST.MF the data its ok

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_22-b04 (Sun Microsystems Inc.)
Built-By: Me
Specification-Title: Please Help
Specification-Version: 1.0.1
Specification-Vendor: vendor name
Implementation-Title: Title_App
Implementation-Version: 20110504_1724_v1.0.1
Implementation-Vendor: vendor name


but if a check the manifest file inside the .ear file i just got

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_22-b04 (Sun Microsystems Inc.)


what happend with all the other info?

thansk in advance
 
Ranch Hand
Posts: 781
Netbeans IDE Ubuntu Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your 'jar' task in your "buildEar" target does not specify which manifest file to use so it creates a default one. Your 'jar' task needs an attribute
manifest="${dirs.base}/${project.ear}/META-INF/MANIFEST.MF"

 
Max Hernandez
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
excellent thanks James Sabre you got it right...!!!
reply
    Bookmark Topic Watch Topic
  • New Topic