Phenomenon:
I developed a JAXB application using JAXB Wizard on Netbeans 6.7.1. I submitted the program to SVN and then checkout into another computer. When I tried to compile the program, I met an error as:
D:\......\xml_binding_build.xml:8: typedef class com.sun.tools.xjc.XJCTask cannot be found
Reason:
Netbeans projects uses nbproject/private directory to contain some system dependent attributes. I usual ignore this directory when I submit my application to a version control system. However, Netbeans puts the JAXB path information in this directory, which cause my the compilation problem.
jaxws.endorsed.dir=D:\\Program Files\\NetBeans 6.7.1\\java2\\modules\\ext\\jaxws21\\api:D:\\Program Files\\NetBeans 6.7.1\\ide11\\modules\\ext\\jaxb\\api
Due to my understanding, I think this must be a bug of JAXB Wizard in Netbeans.
Solution:
Create another project in the current Netbeans environment and run JAXB Wizard once. Look at the nbproject/private/private.properties file, copy the corresponding line into your target JAXB application, clean and build the application.
No comments:
Post a Comment