This is all experimental so far.
This is a project type which tries to infer IDE information (mainly about the Java classpath) automatically from running Ant builds or from other passive sources.
It is not a modified freeform project type; it is completely independent of the existing freeform project type. It is also not intended to be functionally complete for what you would want out of a project type; you get the basic edit/test/debug cycle using "Compile on Save", i.e. Run/Debug/Profile File on a main class or unit test should work without needing to run an Ant build.
For now, it exists mainly to determine whether it is possible to pick up reasonably accurate information about user source code without intervention. "Reasonably accurate" means that few or no error badges appear (for sources which in fact compile), code completion appears where appropriate, Find Usages and cross-source Rename work, etc.
There is some minimal support for Java EE development: web application source structures may be recognized, enabling IDE features to help edit JSPs and deployment descriptors.
Everything the module writes to disk is in $userdir/var/cache/autoprojects.properties which you can inspect to see what it "knows".
Please file bugs in the autoproject component in Issuezilla. (Bugs relevant to automatic projects but actually caused by other modules should be in the appropriate component with autoproject in the Status Whiteboard.) You can add autoprojects.properties as an attachment if it does not contain any confidential information.
You can also get the NetBeans Project Metadata Inspector module, available on development update centers, or as a direct NBM download. After installing, right-click a project node and select Inspect Project Metadata. You will see a dump in the Output Window of all kinds of relevant information. Pay attention to classpaths and associated sources in particular.
Miscellaneous bug fixes and internal changes not listed.
In contrib repo, in modules autoproject.*.
Some test cases: OSProjectsEvaluation
AutomaticProjectsBrainstorming
A complete rethinking of the freeform project type might yield something of more value to a smaller number of people. (The expectation is that most users should be driven toward a more IDE-friendly project type, such as Maven.)
Stored configuration should be much slimmer, perhaps just a single netbeans.properties at top level with a few properties. Even that could be optional, the project being recognized solely by having a build.xml - so there would be no need for a New Project wizard whatsoever (you would just open the directory containing the build script and begin work). Or by default project configuration could be kept in the userdir, with a simple GUI option to move to netbeans.properties if you wanted to share the project setup.
Simple IDE action to Ant target bindings should be made lazily when the action is first run, prompting with
likely target names. Special actions (compile single, debug, ...) should normally be run directly from IDE code without Ant, and even routine Java compilation during editing might be better done this way (with project-wide Build continuing to run the Ant script to pick up any special processing stages). For special bindings, you could have a choice of Ant or scripting language, e.g.:
action.run=ant:build.xml:run-demo
# implicit param 'selection' is list of filename
action.run.single=script:ruby:selection.each |f| {load f}
All information about Java source roots, classpaths, and binary outputs should be gathered dynamically whenever targets are run successfully from the IDE (by tracing the Ant process), and cached in the user directory for future IDE sessions, but the user should never be made aware of this process. Similarly, information about web modules etc. should be inferred, never asked for explicitly. If the IDE cannot figure something out, it should give up silently and try to fall back to some harmless default behavior.
Source and Javadoc associations can probably be guessed with good accuracy if these files are physically located in the project; otherwise a simple context menu item would suffice to declare them, or even a hyperlink displayed in code completion when Javadoc is unavailable, or a dialog displayed when Go to Source fails prompting you to select the source location (would need a new small API).
The Projects tab display should normally be computed on the fly based on a quick runtime scan for source roots, web app docroots, files named README, etc.
For power users who want to set up a project for widespread use in a very particular way (e.g. Open JDK), an optional scripting binding could permit a small JavaScript or JRuby file to be associated with the project which would supply additional behaviors or customize its appearance. This would almost amount to a singleton project type accessible to developers willing to read a tutorial and do some experimentation, but without the need to understand any formal NetBeans APIs.
No Properties dialog is likely to be necessary. Whatever GUI is associated with the project type (ideally very little) should make it clear that all changes in the project's actual behavior are entirely up to the developer to make in Ant scripts and associated files.
Ideally should try to (better!) handle everything in NetbeansReady.
Partially works. Lots and lots of source roots with terribly complex interrelationships.
Some generated. Some roots compiled piecemeal with a different classpath each time. Everything appears in Projects and mostly works, but still various error badges depending on which targets you ran, sometimes disappearing after files are opened. Perhaps impossible to fully support with current Java infrastructure.
Doesn't really work. Samples use project dir as source root, whereas main sources use a subdir. Impossible to properly support in any project type.
Fairly simple. Seemed to work reasonably well. (build.xml has a bug - replace build.class.path with test.class.path in tests. Also need to add junit.jar to third_party/junit/.)
Worked pretty well, except for problem displaying JUnit results (mentioned above). Also had up-to-date Eclipse metadata. Quick Run on unit tests does not take into account new modifications to tests, because build/JSPWiki-test.jar is added to the test CP, and BuildSniffer does not yet grok that this is an output of tests.
Forget now, but some problems.
(Has IDEA metadata, build.xml, and a nonfunctional pom.xml.) One genuine compiler error and two genuine test failures. Running single tests (and test methods) works. Detected all source roots. Most look fine. spring/test etc. show error marks after doing a clean build since build/dist/guice-snapshot.jar was deleted, and the IDE does not realize this is a build product of src. Would be tricky for IDE to realize this, since build uses com.tonicsystems.jarjar.JarJarTask to create it. Some examples show error marks, but it does not seem possible to build them either.
File antFile = new File(System.getProperty("root"), filename);
which fortuitously works (the system property is unset but the CWD is in fact the project root).
Some error badges, but just on optional tasks which in fact cannot be compiled
without downloading some additional JAR. (Ideally these would be in their own source roots.)
Running single test methods does not work, probably because this needs a patched version of Ant.
(Note: when running on JDK 6, compilation from Ant and from editor is broken because BSH appears to ship with an obsolete version of JSR 223 with a different signature for Invocable.)
Does not work well, due to unnecessary build script hacks: