This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build of whole IDE fails while building schema2beans/rt/anttask because ant.core.lib is not set. To reproduce: cd nbbuild ant -Dbuild.compiler.debug=true -Dbuild.compiler.deprecation=false -Dcluster.config=j2ee -Dsigtest.skip.check=true build-nozip The following works well: cd nbbuild ant init all-schema2beans/rt
Created attachment 54587 [details] Possible hotfix
I tried the patch and it works with it. /cvs/nbbuild/build.xml,v <-- build.xml new revision: 1.864; previous revision: 1.863
I am unable to reproduce the problem without the patch. The patch looks at worst harmless, since a proper Ant 1.7.0 installation should already define ant.core.lib so both the added tasks should have no effect. If you can continue to reproduce a scenario in which Ant 1.7.0 fails to define ant.core.lib as it is documented to, please try to come up with a minimal reproducible test case and file on ant.apache.org, or if the problem is that the property is initially defined but then removed or somehow masked in the course of running some NB build scripts, please fix that place.
The problem is ant.core.lib is not propagated when inheritall="false" is used (try minimal test case below). IMO ant.core.lib is ant's internal property and it is not intended to be used in ant scripts at all (at least I haven't found it documented anywhere). So, the patch must be in nbbuild/build.xml. I think this issue can be closed as fixed, if you don't have different opinion. <project name="changeme" default="all" basedir="."> <target name="all"> <echo> ant.core.lib}=${ant.core.lib} ant.home=${ant.home} </echo> <antcall target="a" inheritall="false"/> </target> <target name="a"> <echo> ant.core.lib}=${ant.core.lib} ant.home=${ant.home} </echo> </target> </project>
If you set inheritall=false then Ant will do what you requested and not pass anything to the sub-build. That is why you should pass <property name="ant.core.lib" value="${ant.core.lib}"/> to the sub-build. I think this applies to any property but I would need to delve into sources to see exactly where different properties are initialized for the <ant> task. ant.core.lib is not an Ant-internal property. It was added in Ant 1.7.0 for use in build scripts. Whether it's properly documented yet, I don't know, but it's definitely there intentionally.
AFAIK, system properties like ant.home are passed to the sub-build even if inheritall=false is set. The ant.core.lib is probably treated a different way than ant.home. The following line in nbbuid/build.xml caused the original failure: <antcall target="build-one-cluster-dependencies" inheritAll="false">
ant.home is not a system property, but yes ant.core.lib ought to be treated the same way. I will look into whether a patch to Ant is necessary.
AFAIK no visible problem in NB at the moment.
https://issues.apache.org/bugzilla/show_bug.cgi?id=42263
http://hg.netbeans.org/main/rev/c4aa17a430f5