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.
In NB 6.5, the nbundeploy task was added to the undeploy-clean target for EJB projects. Consequently, when an EJB project is used with a JBI (CompApp) project, the build target (for the JBI project) now fails with the following error: BUILD FAILED /Volumes/Work/qe/jdev/paths/jbidev/jbi/shasta/engines/javaeese/nb/BpelRpcInOnlyJbi/nbproject/build-impl.xml:267: The following error occurred while executing this line: /Volumes/Work/qe/jdev/paths/jbidev/jbi/shasta/engines/javaeese/nb/BpelRPCInOnlyEJB/nbproject/build-impl.xml:567: Problem: failed to create task or type nbundeploy Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. The reason for this error is that the CompApp projects require the netbeans.home to be set when building from the command line. The EJB project now requires this property *not* to be set when using the command line. This is best illustrated by an example. Building the CompApp project using netbeans.home as required by the CompApp project: -> ant -Dnetbeans.home=$NETBEANS_HOME/platform9 -Dfrom.commandline=true jbi-clean-build Buildfile: build.xml -check-netbeans-home: ... -init-taskdefs: init: undeploy-clean: BUILD FAILED /Volumes/Work/qe/jdev/paths/jbidev/jbi/shasta/engines/javaeese/nb/BpelRpcInOnlyJbi/nbproject/build-impl.xml:267: The following error occurred while executing this line: /Volumes/Work/qe/jdev/paths/jbidev/jbi/shasta/engines/javaeese/nb/BpelRPCInOnlyEJB/nbproject/build-impl.xml:567: Problem: failed to create task or type nbundeploy Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. Building the CompApp project *NOT* using netbeans.home as required by the EJB project: -> ant -Dfrom.commandline=true jbi-clean-build Buildfile: build.xml -check-netbeans-home: ... -init-taskdefs: BUILD FAILED /Volumes/Work/qe/jdev/paths/jbidev/jbi/shasta/engines/javaeese/nb/BpelRpcInOnlyJbi/nbproject/build-impl.xml:103: taskdef A class needed by class org.netbeans.modules.compapp.projects.jbi.anttasks.BuildServiceAssembly cannot be found: org/openide/filesystems/FileObject This is a catch-22 situation - one project type requires netbeans.home the other mandates it not to be used. There is no workaround that I can see
So what are the instructions/steps the user has to follow to encounter this bug? See the "Provide steps to reproduce" rule on this page: http://wiki.netbeans.org/IssuezillaRules
Created attachment 79749 [details] testcase
to reproduce problem: 1. start IDE 2. import projects in attached zip file: projects FileOneWayOut_EJB FileOneWayOut_JBI 3. start command line shell 4. define variable NETBEANS_HOME referencing NetBeans 6.5.x installation used in step 1 5. cd to FileOneWayOut_JBI directory 6. run following command: ant -Dnetbeans.home=$NETBEANS_HOME/platform9 -Dfrom.commandline=true jbi-clean-build 7. you should see following output: -> ant -Dnetbeans.home=$NETBEANS_HOME/platform9 -Dfrom.commandline=true jbi-clean-build Buildfile: build.xml -check-netbeans-home: -init-caps: -check-catd-context: -init-catd: pre-init: init-private: init-userdir: init-user: init-project: do-init: post-init: init-check: -init-taskdefs: init: init-deploy: deps-clean: -pre-init: -init-private: -init-userdir: -init-user: -init-project: -init-macrodef-property: -do-init: -post-init: -init-check: -init-macrodef-javac: -init-macrodef-junit: -init-macrodef-java: -init-debug-args: -init-macrodef-nbjpda: -init-macrodef-debug: -init-taskdefs: init: undeploy-clean: BUILD FAILED /Shared/issue162215/FileOneWayOut_JBI/nbproject/build-impl.xml:250: The following error occurred while executing this line: /Shared/issue162215/FileOneWayOut_EJB/nbproject/build-impl.xml:568: Problem: failed to create task or type nbundeploy Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. Total time: 0 seconds
Based on offline discussion, corrected 'netbeans.home' usage in BPEL/XSLT/IEP/CompApp project build script. For command-line build, 'netbeans.home' should not be used. Use 'esb.netbeans.home' instead of the old 'caps.netbeans.home'. Also, as long as 'esb.netbeans.home' is defined, the 'from.commandline' doesn't need to be specified. An example of the command line usage is: ant -Desb.netbeans.home=<path-to-netbeans-root-dir> jbi-clean-build http://hg.netbeans.org/soa-dev65/rev/1a5a74ddc59d http://hg.netbeans.org/soa-dev65/rev/645ddda77b9e Note that all existing ATS projects (both build.xml and build-impl.xml) need to be force-updated (-force and -force2).
*** Issue 160283 has been marked as a duplicate of this issue. ***
Great! Thanks.
Verified with build 20090427-0726.