简体   繁体   中英

Prevent compiling a package from amongst several packages in a netbeans project

How to prevent compiling a package from amongst several packages in a netbeans based web app project?

Actually there are certain classes within that package that are uncompilable & they actually are responsible for not any of the other packages in project, making it to ../target/classes/ folder. While building the project I saw that the packages were compiled however there are no class files in the ../target/classes/ folder. However if I remove the uncompilable package, all the other packages successfully make it to ../target/classes/ folder.

This is covered in the NetBeans FAQ in the question: " Can I exclude some classes or packages from compilation "

  • Goto Project Properties
  • Select the "Sources" node in the left hand tree
  • Click on Include/Excludes in the lower left corner
  • Specify which files to exclude in the lower input field.

I dont about netbeans.. but in eclipse you an add an exclusion filter on the src directory. I am pretty sure you could do the same in netbeans too. And I think netbeans creates ant build file for the project, you could try modifying that file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM