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.

Bug 162215 - EJB project change breaks command line build for JBI (CompApp) projects
Summary: EJB project change breaks command line build for JBI (CompApp) projects
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: Composite Application (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jun Qian
URL:
Keywords:
: 160283 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-08 13:27 UTC by ian_chalmers
Modified: 2009-04-27 18:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase (87.36 KB, application/x-compressed)
2009-04-08 15:42 UTC, ian_chalmers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ian_chalmers 2009-04-08 13:27:23 UTC
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
Comment 1 Petr Jiricka 2009-04-08 14:07:16 UTC
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
Comment 2 ian_chalmers 2009-04-08 15:42:12 UTC
Created attachment 79749 [details]
testcase
Comment 3 ian_chalmers 2009-04-08 15:49:57 UTC
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
Comment 4 Jun Qian 2009-04-09 23:25:01 UTC
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).
Comment 5 David Konecny 2009-04-13 23:31:15 UTC
*** Issue 160283 has been marked as a duplicate of this issue. ***
Comment 6 David Konecny 2009-04-13 23:36:57 UTC
Great! Thanks.
Comment 7 dhuang 2009-04-27 18:44:36 UTC
Verified with build 20090427-0726.