Today I want show what is possible with Maven 2.0.9 in NetBeans 6.5 and what makes me nervous.
First of all you have to download NetBeans and then the Maven plugin: Click Tools->Plugins->Available Plugins.
I recommend to install the command line of maven and then set the ‘connection’ to the local repository in NetBeans: Tools->Options->Miscellaneous->Maven->Local Repository should be sth. like /home/user/.m2/repository
- Add a new jar to the project via right click or directly in the pom.xml: there you will have code completion! I.e. you can always choose the latest version of a library or easily switch versions.
- Add javadoc or sources (download all source)
- You can search unknown class in repository
after adding the JodaTime library with this dialog and adding the sources with the first dialog – all is fine:
- Set different goal to F6: right click the project->properties->actions->run project and then clear all the fields and set the ‘execute goal’ e.g. to
- In the same dialog you can set skip test to true if this is necessary or if you want to speed up compilation
- Profiling and debugging of a maven project works now, although I had some problems under vista with profiling, but under linux were no issues
So I am nearly happen with maven under NetBeans, but what really sucks is maven while compiling. A small native NetBeans project takes under 2 seconds to clean and compile. And with maven? Nearly 10 seconds!
How could one change this? I only found a workaround to use the same project as native NetBeans project, but nothing more. Any ideas how to make ‘maven install’ or ‘mvn compile’ faster??
(BTW: Today wordpress does not want that I make clickable images … if you want to see the images in better quality you have to right click them->view->remove the stuff after ‘?’. Example: http://karussell.files.wordpress.com/2009/02/add-sources-and-javadoc.jpg)