https://bugzilla.redhat.com/show_bug.cgi?id=1542899
Bug ID: 1542899
Summary: Task failure with ant and JAXB's xjc
Product: Fedora
Version: 27
Component: ant
Assignee: msimacek(a)redhat.com
Reporter: peterhull90(a)gmail.com
QA Contact: extras-qa(a)fedoraproject.org
CC: akurtako(a)redhat.com, jaromir.capik(a)email.cz,
java-sig-commits(a)lists.fedoraproject.org,
krzysztof.daniel(a)gmail.com, mizdebsk(a)redhat.com,
msimacek(a)redhat.com, msrb(a)redhat.com
Created attachment 1392587
-->
https://bugzilla.redhat.com/attachment.cgi?id=1392587&action=edit
Ant build script
Description of problem:
Running the JAXB xjc task in ant appears to make ant fail at a later stage with
classpath problems. The xjc task itself seems to finish correctly.
The background to this is trying to build Netbeans on Fedora 27 fails and I
have done some work to narrow down Netbeans build script (which is very
large/complicated) to this aspect.
See
https://issues.apache.org/jira/browse/NETBEANS-239 and
http://mail-archives.apache.org/mod_mbox/incubator-netbeans-dev/201801.mb...
However setting the ANT_HOME explicitly makes this bug disappear.
I believe I have set up the xjc task correctly to run with Fedora's
glassfish-jaxb packages.
Version-Release number of selected component (if applicable):
ant.noarch 1.10.1-7.fc27 @fedora
ant-lib.noarch 1.10.1-7.fc27 @fedora
glassfish-jaxb.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-api.noarch 2.2.12-7.fc27 @fedora
glassfish-jaxb-bom.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-bom-ext.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-codemodel.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-codemodel-annotation-compiler.noarch
glassfish-jaxb-codemodel-parent.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-core.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-external-parent.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-jxc.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-parent.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-rngom.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-runtime.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-runtime-parent.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-txw-parent.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-txw2.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-txwc2.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb-xjc.noarch 2.2.11-6.fc27 @fedora
glassfish-jaxb1-impl.noarch 2.2.11-6.fc27 @fedora
java-1.8.0-openjdk.x86_64 1:1.8.0.161-0.b14.fc27
@updates
java-1.8.0-openjdk-devel.x86_64 1:1.8.0.161-0.b14.fc27
@updates
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.fc27
@updates
How reproducible:
Always
Steps to Reproduce:
1. Use attached build.xml and test.xsd
2. Run ant
3. See error message
Note this is a minimal build.xml and test.xsd to cause the problem to appear.
Actual results:
build succeeds
Expected results:
Build fails,
$ ant
Buildfile: .../build.xml
fail:
[xjc] Consider using <depends>/<produces> so that XJC won't do
unnecessary compilation
[xjc] Compiling file:.../test.xsd
[xjc] Writing output to .
Caught an exception while logging the end of the build. Exception was:
java.lang.NoClassDefFoundError: org/apache/tools/ant/util/DateUtils
at
org.apache.tools.ant.DefaultLogger.formatTime(DefaultLogger.java:328)
at
org.apache.tools.ant.DefaultLogger.buildFinished(DefaultLogger.java:177)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:2110)
at org.apache.tools.ant.Main.runBuild(Main.java:878)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)
Caused by: java.lang.ClassNotFoundException:
org.apache.tools.ant.util.DateUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Additional info:
This succeeds:
$ ANT_HOME=/usr/share/ant/ ant
Buildfile: .../build.xml
fail:
[xjc] Consider using <depends>/<produces> so that XJC won't do
unnecessary compilation
[xjc] Compiling file:.../test.xsd
[xjc] Writing output to .
BUILD SUCCESSFUL
Total time: 1 second
--
You are receiving this mail because:
You are on the CC list for the bug.