inline manifest for build.xml

Discussion in 'XML' started by hawat.thufir@gmail.com, Mar 17, 2005.

  1. Guest

    an ant build.xml file:

    <project name="XHTML" default="package2">

    <import file="properties.xml" />

    <target name="clean">
    <delete dir="${outputDir}" />
    </target>

    <target name="prepare" depends="clean">
    <mkdir dir="${outputDir}" />
    </target>

    <target name="compile" depends="prepare">
    <javac srcdir="${sourceDir}"
    destdir="${outputDir}"
    classpath="${jarPath}"
    />
    </target>

    <target name="manifest1" depends="compile">
    <manifest file="${outputDir}/MANIFEST.MF">
    <attribute name="Main-Class" value="${pkgPath}${mainClass1}" />
    </manifest>
    </target>

    <target name="manifest2" depends="manifest1">
    <manifest file="${outputDir}/MANIFEST.MF">
    <attribute name="Main-Class" value="${pkgPath}${mainClass2}" />
    </manifest>
    </target>

    <target name="package1" depends="manifest2">
    <jar
    destfile="${outputDir}/${mainClass1}.jar"
    basedir="${outputDir}">
    </jar>
    </target>

    <target name="package2" depends="package1">
    <jar
    destfile="${outputDir}/${mainClass2}.jar"
    basedir="${outputDir}"
    manifest="${outputDir}/MANIFEST.MF"
    />
    </target>
    </project>

    I'm trying follow the inline manifest example:

    <jar destfile="test.jar" basedir=".">
    <include name="build"/>
    <manifest>
    <attribute name="Built-By" value="${user.name}"/>
    <section name="common/class1.class">
    <attribute name="Sealed" value="false"/>
    </section>
    </manifest>
    </jar>

    from <http://ant.apache.org/manual/CoreTasks/jar.html>,
    so that package1 uses manifest1, though.


    thanks,

    Thufir
    , Mar 17, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abhi
    Replies:
    2
    Views:
    719
    E. Robert Tisdale
    Jul 3, 2003
  2. Alvin
    Replies:
    7
    Views:
    458
    E. Robert Tisdale
    May 6, 2005
  3. Replies:
    3
    Views:
    440
  4. Daniel Vallstrom
    Replies:
    2
    Views:
    1,807
    Kevin Bracey
    Nov 21, 2003
  5. Dzikus
    Replies:
    0
    Views:
    379
    Dzikus
    May 6, 2008
Loading...

Share This Page