Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202276 - dev-java/ant-core-1.10.9-r5, warnings about bad path elements
Summary: dev-java/ant-core-1.10.9-r5, warnings about bad path elements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2007-12-14 17:28 UTC by Martin von Gagern
Modified: 2024-03-10 21:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Demo build file (build.xml,285 bytes, text/plain)
2007-12-14 17:30 UTC, Martin von Gagern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2007-12-14 17:28:45 UTC
When I compile a project with ant passing -Xlint:all to the compiler, even with ANT_TASKS=none I get the following error messages:

    [javac] warning: [path] bad path element
            "/usr/share/ant-core/lib/xml-apis.jar": no such file or directory
    [javac] warning: [path] bad path element
            "/usr/share/ant-core/lib/xercesImpl.jar": no such file or directory
    [javac] warning: [path] bad path element
            "/usr/share/ant-core/lib/xalan.jar": no such file or directory

I guess this is because /usr/share/ant-core/lib/ant-bootstrap.jar contains the following line in its manifest:

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

If I set ANT_TASKS=all, I get even more such warnings. /usr/share/xalan/lib/xalan.jar also references xercesImpl.jar and xml-apis.jar, while /usr/share/javacup/lib/javacup.jar references java-cup-11a-runtime.jar instead of javacup-runtime.jar.

I don't know if there is any easy way to avoid these problems, if maybe simply modifying that manifest is an option. I do know, however, that enabling warnings is a good idea, and seeing warnings for every build is annoying and tends to get you used to ignoring warnings, which I consider a bad thing.
Comment 1 Martin von Gagern 2007-12-14 17:30:18 UTC
Created attachment 138479 [details]
Demo build file

Simple test file demonstrating the issue. Run in an otherwise empty dir, with whatever settings for GENTOO_VM or ANT_TASKS you like.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-12-15 17:18:42 UTC
To solve this I think we need to automatically remove or rewrite the Class-Path entries in our eclasses so might take a while before anything gets implemented.
Comment 3 Jonas Stein gentoo-dev 2018-08-08 12:52:52 UTC
We not have dev-java/ant-core-1.7 in the tree anymore. Is this still in dev-java/ant-core-1.9.2?
Comment 4 Timo Gurr 2022-10-24 07:18:09 UTC
This still appears to be in issue with ant-core-1.10.9-r5, running a tomcat 9 produces the following warning in catalina log:

24-Oct-2022 09:01:39.706 WARNING [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Failed to scan [file:/usr/share/ant-core/lib/xalan.jar] from classloader hierarchy
        java.io.IOException: java.lang.reflect.InvocationTargetException

The MANIFEST.MF of ant-bootstrap.jar still contains xalan.jar

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.10.9
Created-By: 11.0.16.1+1 (Eclipse Adoptium)
Main-Class: org.apache.tools.ant.Main
Class-Path: ant.jar xalan.jar
Comment 5 Larry the Git Cow gentoo-dev 2024-03-10 21:10:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=741d4790f8f688a04715b447481adc57c1d888b1

commit 741d4790f8f688a04715b447481adc57c1d888b1
Author:     Volkmar W. Pogatzki <gentoo@pogatzki.net>
AuthorDate: 2024-02-26 13:59:33 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2024-03-10 21:10:05 +0000

    dev-java/ant-core: drop 1.10.9-r5
    
    Bug: https://bugs.gentoo.org/802165
    Closes: https://bugs.gentoo.org/202276
    Closes: https://bugs.gentoo.org/850430
    Closes: https://bugs.gentoo.org/829815
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 dev-java/ant-core/Manifest                  |   2 -
 dev-java/ant-core/ant-core-1.10.9-r5.ebuild | 159 ----------------------------
 2 files changed, 161 deletions(-)