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.
Created attachment 104862 [details] Test case. Extract and try and run "ant" from the commandline. If you then modify private.properties to point to your build.properties file, it will then build successfully. When a new Web Application is created, along with a new web service, the METRO libraries are copied to the project directory (usually under ProjectName\lib\metro or similar). This enables the project to be built outside of NetBeans (indeed, in an environment that doesn't have NetBeans installed on it at all) via ant. When a new Java Project is created, along with a new web service client, the JAXB libraries are copied to ProjectName\lib\JAX-WS-ENDORSED. However, the libraries that are needed to build the project via the wsimport task (the Metro libraries) are linked only by reference to the NetBeans installation directory as follows: from jaxws-build.xml: <target name="wsimport-init" depends="init"> <mkdir dir="${build.generated.sources.dir}/jax-ws"/> <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport"> <classpath path="${libs.jaxws21.classpath}"/> </taskdef> </target> ${libs.jaxws21.classpath} is defined in build.properties and the location of build.properties is defined in \nbproject\private\private.properties. The value of this parameter points to (in my case): libs.jaxws21.classpath=C:\\Program Files\\NetBeans 6.9\\ide\\modules\\ext\\jaxb\\jaxb-impl.jar;C:\\Program Files\\NetBeans 6.9\\ide\\modules\\ext\\jaxb\\jaxb-xjc.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\FastInfoset.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\gmbal-api-only.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\http.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\jaxws-rt.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\jaxws-tools.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\management-api.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\mimepull.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\policy.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\saaj-impl.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\stax-ex.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\streambuffer.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\woodstox.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\api\\jaxws-api.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\api\\jsr181-api.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\api\\jsr250-api.jar;C:\\Program Files\\NetBeans 6.9\\java\\modules\\ext\\jaxws22\\api\\saaj-api.jar;C:\\Program Files\\NetBeans 6.9\\ide\\modules\\ext\\jaxb\\activation.jar;C:\\Program Files\\NetBeans 6.9\\ide\\modules\\ext\\jaxb\\api\\jaxb-api.jar;C:\\Program Files\\NetBeans 6.9\\ide\\modules\\ext\\jaxb\\api\\jsr173_api.jar Given: * That the value of the user.properties.file parameter in nbproject\private\private.properties differs for each user; and * That the above means that a NetBeans Java Project with a web service client reference but not a web service in it is unable to be built outside of the original developer's machine from the ant commandline. I would propose that these libraries should be copied into the ProjectName\lib directory, in a similar way to the behaviour for projects containing Web Services.
Metro libraries and jars inside lib directory are packages as result into the war/car ( or client jar file ). As result they are available at runtime ( because they are really required for execution ) . libs.jaxws21.classpath is required ONLY on build time. So it is not correct to compare two different cases. You are right about problem with BUILD portability. But this problem is similar to setting JAVA_HOME for any java app execution. ( Yes it is easer to set one path instead of number for property libs.jaxws21.classpath but the essence is the same ). There is no problem for single box so I change it to RFE.
People have been asking via email if I found a work-around so I'll put what I did in here so it's centralised in one place: 1.) Copy the files mentioned in the libs.jaxws21.classpath to the project lib directory (I copied them to lib\jaxws21) 2.) Open jaxws-build.xml and copy the wsimport-init target to your build.xml file. I then changed the classpath attribute of the wsimport-init target to the following: <classpath> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </classpath>