Bug#353586: ant-bootstrap.jar failure

2008-04-19 Thread Michael Koch
On Mon, Mar 05, 2007 at 10:13:42PM +, Paul Cager wrote:
> EspeonEefi wrote:
> > reopen 353586
> > severity 353586 minor
> > thanks
> > 
> > I can reproduce this error using the attached very simple build.xml and
> > HelloWorld java program. Indeed, ant by default still automatically
> > adds /usr/share/ant/lib/ant-bootstrap.jar to the classpath. Note, though
> > that the warning occurs only when the -Xlint compilerarg is passed to
> > javac, and the warnings don't make anything fail, so I've downgraded the
> > severity of this bug to minor.
> > 
> > Just as a refresher, the output that ant build gives is
> > 
> > 
> > Buildfile: build.xml
> > 
> > build:
> > [javac] Compiling 1 source file
> > [javac] warning: [path] bad path element 
> > "/usr/share/ant/lib/xml-apis.jar": no such file or directory
> > [javac] warning: [path] bad path element 
> > "/usr/share/ant/lib/xercesImpl.jar": no such file or directory
> > [javac] warning: [path] bad path element 
> > "/usr/share/ant/lib/xalan.jar": no such file or directory
> > [javac] 3 warnings
> > 
> > BUILD SUCCESSFUL
> > Total time: 2 seconds
> > 
> > 
> > Some Googling turns up that the above warnings may be a result of
> > extraneous things in the Class-Path attribute in the
> > META-INF/MANIFEST.MF file of a JAR. Indeed, when I
> > unjar /usr/share/ant/lib/ant-bootstrap.jar, I find in
> > META-INF/MANIFEST.MF the line
> > 
> > Class-Path: ant.jar xml-apis.jar xercesImpl.jar xalan.jar
> > 
> > Now, according to the documentation for the JAR file format [1], the
> > Class-Path attribute "specifies the relative URLs of the extensions or
> > libraries that this application or extension needs." This is why javac
> > is looking for xml-apis.jar, xercesImpl.jar, and xalan.jar
> > in /usr/share/ant/lib/ (the same directory as ant-bootstrap.jar) and not
> > in /usr/share/java/, where at least xercesImpl.jar lives. (Given that
> > ant now uses Xerces and not Xalan, it's interesting that xml-apis.jar
> > and xalan.jar still show up in this Class-Path line.)
> > 
> > [1] http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Main%20Attributes
> > 
> > Thus, this is indeed a bug in ant that the Class-Path attribute in
> > MANIFEST.MF in ant-bootstrap.jar is referencing non-existent jars.
> > 
> > 
> > 
> > 
> > public class HelloWorld {
> > public static void main(String[] args) {
> > System.out.println("Hello, world!");
> > }
> > }
> 
> Thank you for investigating this further. Yes, you are quite right -
> bootstrap.jar is in /usr/share/ant/lib/ and *will* be included in the
> class path.
> 
> Looking at the Apache binary download (of 1.7), I see that the bootstrap
> Jar is normally in the "etc" directory, and the Debian packaging moves
> it to /usr/share/ant/lib/. I am not sure this is the correct place for
> the bootstrap Jar to live (but I agree that "etc" isn't the correct
> place either). In fact, do we need to deliver it at all in the binary
> deb package?
> 
> Maybe this bug can be fixed when the next upstream version is packaged?

This can be fixed easily now. I checked for the explicite usage of
ant-bootstrap.jar and it seems to be not used. I looked at all obvious
places. The only class in ant-bootstrap.jar is also in ant.jar (same
bytesize). I think its safe now to move that jar.


Cheers
Michael



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#353586: ant-bootstrap.jar failure

2007-03-05 Thread Paul Cager
EspeonEefi wrote:
> reopen 353586
> severity 353586 minor
> thanks
> 
> I can reproduce this error using the attached very simple build.xml and
> HelloWorld java program. Indeed, ant by default still automatically
> adds /usr/share/ant/lib/ant-bootstrap.jar to the classpath. Note, though
> that the warning occurs only when the -Xlint compilerarg is passed to
> javac, and the warnings don't make anything fail, so I've downgraded the
> severity of this bug to minor.
> 
> Just as a refresher, the output that ant build gives is
> 
> 
> Buildfile: build.xml
> 
> build:
> [javac] Compiling 1 source file
> [javac] warning: [path] bad path element 
> "/usr/share/ant/lib/xml-apis.jar": no such file or directory
> [javac] warning: [path] bad path element 
> "/usr/share/ant/lib/xercesImpl.jar": no such file or directory
> [javac] warning: [path] bad path element "/usr/share/ant/lib/xalan.jar": 
> no such file or directory
> [javac] 3 warnings
> 
> BUILD SUCCESSFUL
> Total time: 2 seconds
> 
> 
> Some Googling turns up that the above warnings may be a result of
> extraneous things in the Class-Path attribute in the
> META-INF/MANIFEST.MF file of a JAR. Indeed, when I
> unjar /usr/share/ant/lib/ant-bootstrap.jar, I find in
> META-INF/MANIFEST.MF the line
> 
> Class-Path: ant.jar xml-apis.jar xercesImpl.jar xalan.jar
> 
> Now, according to the documentation for the JAR file format [1], the
> Class-Path attribute "specifies the relative URLs of the extensions or
> libraries that this application or extension needs." This is why javac
> is looking for xml-apis.jar, xercesImpl.jar, and xalan.jar
> in /usr/share/ant/lib/ (the same directory as ant-bootstrap.jar) and not
> in /usr/share/java/, where at least xercesImpl.jar lives. (Given that
> ant now uses Xerces and not Xalan, it's interesting that xml-apis.jar
> and xalan.jar still show up in this Class-Path line.)
> 
> [1] http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Main%20Attributes
> 
> Thus, this is indeed a bug in ant that the Class-Path attribute in
> MANIFEST.MF in ant-bootstrap.jar is referencing non-existent jars.
> 
> 
> 
> 
> public class HelloWorld {
> public static void main(String[] args) {
> System.out.println("Hello, world!");
> }
> }

Thank you for investigating this further. Yes, you are quite right -
bootstrap.jar is in /usr/share/ant/lib/ and *will* be included in the
class path.

Looking at the Apache binary download (of 1.7), I see that the bootstrap
Jar is normally in the "etc" directory, and the Debian packaging moves
it to /usr/share/ant/lib/. I am not sure this is the correct place for
the bootstrap Jar to live (but I agree that "etc" isn't the correct
place either). In fact, do we need to deliver it at all in the binary
deb package?

Maybe this bug can be fixed when the next upstream version is packaged?

Thanks,
Paul


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#353586: ant-bootstrap.jar failure

2007-03-05 Thread EspeonEefi
reopen 353586
severity 353586 minor
thanks

I can reproduce this error using the attached very simple build.xml and
HelloWorld java program. Indeed, ant by default still automatically
adds /usr/share/ant/lib/ant-bootstrap.jar to the classpath. Note, though
that the warning occurs only when the -Xlint compilerarg is passed to
javac, and the warnings don't make anything fail, so I've downgraded the
severity of this bug to minor.

Just as a refresher, the output that ant build gives is


Buildfile: build.xml

build:
[javac] Compiling 1 source file
[javac] warning: [path] bad path element "/usr/share/ant/lib/xml-apis.jar": 
no such file or directory
[javac] warning: [path] bad path element 
"/usr/share/ant/lib/xercesImpl.jar": no such file or directory
[javac] warning: [path] bad path element "/usr/share/ant/lib/xalan.jar": no 
such file or directory
[javac] 3 warnings

BUILD SUCCESSFUL
Total time: 2 seconds


Some Googling turns up that the above warnings may be a result of
extraneous things in the Class-Path attribute in the
META-INF/MANIFEST.MF file of a JAR. Indeed, when I
unjar /usr/share/ant/lib/ant-bootstrap.jar, I find in
META-INF/MANIFEST.MF the line

Class-Path: ant.jar xml-apis.jar xercesImpl.jar xalan.jar

Now, according to the documentation for the JAR file format [1], the
Class-Path attribute "specifies the relative URLs of the extensions or
libraries that this application or extension needs." This is why javac
is looking for xml-apis.jar, xercesImpl.jar, and xalan.jar
in /usr/share/ant/lib/ (the same directory as ant-bootstrap.jar) and not
in /usr/share/java/, where at least xercesImpl.jar lives. (Given that
ant now uses Xerces and not Xalan, it's interesting that xml-apis.jar
and xalan.jar still show up in this Class-Path line.)

[1] http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Main%20Attributes

Thus, this is indeed a bug in ant that the Class-Path attribute in
MANIFEST.MF in ant-bootstrap.jar is referencing non-existent jars.


build.xml
Description: application/xml
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}