1.Generate the class
xjc -p test.xsd -d C:/workspace/Test/src
2. Compile the project . package-info.class is generated.
3. Then call the clean task to remove .class files and rebuild the project. package-info.class is not generated.
Note on package-info.java from Ant Manual [http://ant.apache.org/manual/CoreTasks/javac.html]
package-info.java files were introduced in Java5 to allow package level annotations. On compilation, if the java file does not contain runtime annotations, there will be no .class file for the java file. Up to Ant 1.7.1, when the
In Ant 1.7.1 the package-info.java will only be compiled if:
1. If a package-info.class file exists and is older than the package-info.java file.
2. If the directory for the package-info.class file does not exist.
3. If the directory for the package-info.class file exists, and has an older modification time than the the package-info.java file. In this case
Related Links
http://ant.apache.org/manual/CoreTasks/javac.html
http://article.gmane.org/gmane.comp.jakarta.ant.devel/52586
http://www.javalinux.it/wordpress/?p=261