With reference to the changes that were made by #63287: A [necessary] copy of xml-apis.jar (which used to be made available as a result of the xerces-2 build) is now showing up in both xerces-2 and xml-commons /usr/share/xerces-2/lib/xml-apis.jar /usr/share/xml-commons/lib/xml-apis.jar The origin is xml-commons, so it should probably be removed from xerces-2. AfC
Yes indeed. We are working towards removing xml-apis from xerces, but it is a long road because many ebuilds depend on the xml-apis.jar in xerces.
One approach to fixing this would be for everything that depends on xerces should depend on xml-commons-external. Additionally, any wrapper scripts that use xerces should also use xml-commons-external.
(In reply to comment #2) > One approach to fixing this would be for everything that depends on xerces > should depend on xml-commons-external. Additionally, any wrapper scripts that > use xerces should also use xml-commons-external. Yes this is the way to go, but let's take it slow and go on a package by package basis everytime testing that everything works. This is not high priority for users so we should be careful not to break anything.
We've recently added xml-commons-external, which is the real package that should be providing xml-apis.jar.
(In reply to comment #4) > We've recently added xml-commons-external, which is the real package that > should be providing xml-apis.jar. > Well xml-commons-external is a version bump of the xml-apis.jar in xml-commons.
Perhaps a step in the right direction would be to make xerces-2, instead of installing xml-apis.jar, install a symlink to xml-commons-exeternals, and then call regjar on it. This way at least, it'll always be using the most recent xml-apis.jar.
I added a patch to bug 131141 that (hopefully) solves that bug and changes xml-apis.jar to a symlink. Now that /usr/share/xerces-2/lib/xml-apis.jar is a symlink, xml-commons-external-1.3 now needs to be added to the LOCALCLASSPATH in /usr/bin/ant. dojar doesn't add symlinks to the package's classpath in package.env. LOCALCLASSPATH="${LOCALCLASSPATH}:`java-config --classpath=log4j,xml-commons-external-1.3,xerces-2,xalan,junit,antlr,bcel,bsh,commons-beanutils-1.6,commons-collections,commons-logging,commons-net,jakarta-oro-2.0,jdepend,jsch,jakarta-regexp-1.3,rhino-1.5,jython,jta,sun-jaf-bin,sun-javamail-bin 2> /dev/null`"
Hm, I was thinking that the DEPEND in package.env is used so when you ask for CLASSPATH of given package, the CLASSPATH of dependency is pulled as well and added to it... if not, what is it for?
> Hm, I was thinking that the DEPEND in package.env is used so when you ask for > CLASSPATH of given package, the CLASSPATH of dependency is pulled as well and > added to it... if not, what is it for? I checked with nichoj, and apparently that's not the case. 22:06 <andrewy> nichoj: what is the depend in package.env for? 22:08 <@nichoj> andrewy: it's the jars/packages that are used to build/run it 22:09 <andrewy> nichoj: ok, so it doesn't include the dependency's classpath? 22:09 <@nichoj> no
We stopped using xerces about 15 months ago (perhaps 3 months after we reported this bug), so I can't offer direct confirmation about this bug anymore. However, I would be remiss if I didn't comment that I appreciate the efforts of Gentoo developers to continuously improve the quality and consistency of the Portage tree. Regards, AfC
(In reply to comment #6) > Perhaps a step in the right direction would be to make xerces-2, instead of > installing xml-apis.jar, install a symlink to xml-commons-exeternals, and then > call regjar on it. This way at least, it'll always be using the most recent > xml-apis.jar. > Done that in 2.8.0-r1 in migrated-java-experimental-overlay. Additionally introduces noxmlapis useflag that will install xerces completely without xml-apis.jar nor symlink to it. Devs can build with this to catch missing deps in other packages. I will see about ant-core as that's the most apparent one :)
Recent cleanup of xerces-2.7.1-r1 unintentionally changed the ant target from 'jars' to 'jar' which resulted in xml-apis.jar no longer bundled with xerces. The only reports of breakage we got so far were for ant-core and ant-tasks with blackdown-jdk-1.4 missing the APIs, which were bumped to use the jar from xml-commons-external. So we decided to keep this accidental change and revbumped xerces to 2.7.1-r2 so that everyone gets the fix.