[ 
https://issues.apache.org/jira/browse/NETBEANS-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16343362#comment-16343362
 ] 

Peter Hull commented on NETBEANS-239:
-------------------------------------

I've looked into this a bit more and I think the problem comes from running the 
'xjc' task. By cutting bits out of the Netbeans build.xml I created a minimal 
example:
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<project name="fail" default="fail">
  <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
    <classpath>
      <fileset dir="./external" includes="*.jar" />
    </classpath>
  </taskdef>
  <target name="fail">
    <xjc schema="test.xsd" />
    <uptodate srcfile="nothing" targetfile="nothing" property="nothing" />
  </target>
</project>
{code}
where 'test.xsd' is just because the task requires a 'schema' attribute
{code:java}
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  
</xsd:schema>
{code}
and into the 'external' directory I copied the jars from 
netbeans/libs.jaxb/external/

This runs OK on Windows (not been able to verify on Debian or Macos) but on 
Fedora (FC27, 64-bit) I get
{noformat}
Buildfile: .../build.xml

fail:
      [xjc] Consider using <depends>/<produces> so that XJC won't do 
unnecessary compilation
      [xjc] Compiling file:/media/sf_Share/tru/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:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more
{noformat}
This is not the same error as reported above, I admit, but I believe it is the 
same cause, ie. ant failing to find something that ought to be on its classpath.

The provided jaxb jars are quite old (2.2.5 is from 2013, current version is 
2.3.0) - maybe these are built in a way which is not compatible with Fedora's 
ant? 

> Build failure: org-netbeans-modules-websvc-saas-api.jar is not a module with 
> Fedora Ant package
> -----------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-239
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-239
>             Project: NetBeans
>          Issue Type: Bug
>         Environment: - Environment 1: Fedora release 25 (Twenty Five), javac 
> 1.8.0_151, Apache Ant(TM) version 1.9.6 compiled on February 3 2016 (Expected 
> failure as Ant 1.9.9 or above required): fails
> - Environment 2: Fedora release 26 (Twenty Six), javac 1.8.0_151, Apache 
> Ant(TM) version 1.10.1 compiled on March 1 2017: Fails
> - Environment 3: Fedora release 26 (Twenty Six), javac 1.8.0_151, Apache 
> Ant(TM) version 1.10.1 compiled on February 2 2017 (downloaded from 
> ant.apache.org): works
> - Environment 4: Debian 9.3 (Stretch), javac 1.8.0_151, Apache Ant(TM) 
> version 1.9.9 compiled on March 1 2017: works
>            Reporter: Markus Kilås
>            Priority: Minor
>         Attachments: ant-output-environment-2.txt, ant-output.txt
>
>
> I just cloned the [incubator-netbeans git 
> repo|https://github.com/apache/incubator-netbeans] and tried running {{ant}} 
> to build NetBeans. However the build fails complaining on no manifest for the 
> all-websvc.saas.api. Am I missing something that needs to be configured for 
> the build to succeed?
> {noformat}
> [user@dev-disp incubator-netbeans]$ git pull
> Already up-to-date.
> [user@dev-disp incubator-netbeans]$ git rev-parse HEAD
> f8b6323b690b5edafe91bae750f79db4247dd23c
> [user@dev-disp incubator-netbeans]$ ant
> Buildfile: 
> /home/user/VersionControlled/github/apache/incubator-netbeans/build.xml
> ... snip ...
> projectized-common.release:
>      [copy] Copying 1 file to 
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/netbeans/websvccommon
> release:
> -init-startlevel:
> module-xml-regular:
>   [nbmerge] Failed to build target: all-websvc.saas.api
> BUILD FAILED
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/build.xml:469:
>  The following error occurred while executing this line:
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/build.xml:464:
>  The following error occurred while executing this line:
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/build.xml:511:
>  The following error occurred while executing this line:
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/templates/common.xml:267:
>  Missing manifest tag OpenIDE-Module; 
> /home/user/VersionControlled/github/apache/incubator-netbeans/nbbuild/netbeans/websvccommon/modules/org-netbeans-modules-websvc-saas-api.jar
>  is not a module
> Total time: 1 minute 12 seconds
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to