ant netbeans from the command line to populate your working copy with the configuration files Netbeans needs to be able to compile, test, and debug Lucene and Solr.
You can then open the project in Netbeans; select the top-level directory where you ran
ant clean-netbeans from the command line removes all Netbeans configuration files and compilation/test output. If you already have an existing configuration, but want to replace it with the one provided by
ant netbeans, it's a good idea to run
ant clean-netbeans first.