ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32187] - Error in package versionning when generate manifest in <jar> task.
Date Thu, 11 Nov 2004 17:28:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32187>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32187

Error in package versionning when generate manifest in <jar> task.

peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From peterreilly@apache.org  2004-11-11 17:28 -------
I see the problem.
You need to place a "/" at the end of the name.
For exampple:
Hello.java
package me;

public class Hello {
    public static void main(String[] args) {
        Package p = Hello.class.getPackage();
        System.out.println("vendor is " + p.getImplementationVendor());
    }
}

build.xml
<project default="m">
  <target name="m">
    <mkdir dir="classes"/>
    <javac srcdir="src" destdir="classes"/>
    <jar jarfile="x0.jar" basedir="classes">
      <manifest>
        <attribute name="Built-By" value="peter"/>
        <section name="me/">
          <attribute name="Implementation-Vendor" value="Peter"/>
        </section>
      </manifest>
    </jar>
    <jar jarfile="x1.jar" basedir="classes">
      <manifest>
        <attribute name="Built-By" value="peter"/>
        <section name="me">
          <attribute name="Implementation-Vendor" value="Peter"/>
        </section>
      </manifest>
    </jar>
    <java classpath="x0.jar" classname="me.Hello"/>
    <java classpath="x1.jar" classname="me.Hello"/>
  </target>
</project>

outputs:
m:
Building jar: /home/preilly/learning/a/manifest/x0.jar
Building jar: /home/preilly/learning/a/manifest/x1.jar
vendor is Peter
vendor is null

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message