...
Info | ||
---|---|---|
| ||
Make sure you have You must use a Java 1.5.0 JDK, because org.lcsim requires it. |
I will also briefly describe how to import and build a Maven-based project within Netbeans.
Warning | ||
---|---|---|
| ||
These linux specific instructions are not up-to-date. You should just follow the generic instructions. |
Downloads
Java
Java 1.5.0 can be downloaded at http://java.sun.com/j2se/1.5.0/download.jsp.Make sure to set
Info | ||
---|---|---|
| ||
Set the JAVA_HOME variable to your JDK root area. Otherwise, Maven may not pick up the correct Java compiler. |
At SLAC, you can setup the shared Java 1.5.0 JDK on Linux by executing this command.
No Format |
---|
export JAVAVER=1.5 |
Netbeans Installer
Get the install files for Netbeans from http://www.netbeans.org/index.html.
...
No Format |
---|
wget http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-1.0.2.tar.gz |
Maven NBM
Mevenide provides Maven support in the Netbeans IDE. You need to get the "nbm" files for Maven support within Netbeansfrom the Mevenide Downloads Area .
download
No Format |
---|
wget http://mevenide.codehaus.org/download/mevenide-netbeans-autoupdate-1.0.nbm wget http://mevenide.codehaus.org/download/mevenide-netbeans-grammar-0.6.1.nbm |
Note | ||
---|---|---|
| ||
As of now, if you want to install the most recent Netbeans, 4.1beta, you will need the special NBM file for XML grammar listed above. If, instead, you choose to use 4.0, you may not need to install the grammar pack separately. Thus, the instructions throughout this guide about this special setup should be ignored if you are using Netbeans 4.0 and not 4.1beta. |
Summary
You should now have the following files for the installation.
No Format |
---|
mevenide-netbeans-autoupdate-1.0.nbm mevenide-netbeans-grammar-0.6.1.nbm netbeans-4_1-beta-linux.bin maven-1.0.2.tar.gz |
...
Warning | ||
---|---|---|
| ||
"maven" has been mispelled as "meven" |
...
throughout the Maven IDE installation kit. |
Obviously, the exact versions will change as Netbeans and Maven are updated.
...
Make sure to select a Java 1.5.0 JDK.
For instance, this is shows the shared install when using Linux used at SLAC.
You can set it up by executing this command.
...
When finished, startup Netbeans.
...
Warning | ||
---|---|---|
| ||
I noticed that if the module installation steps were performed incorrectly, Netbeans would often complain once at restart about missing dependencies and then not allow reinstallation of the modules using the Update Manager, at least not in an obvious way. So be careful and make sure you try to do it correctly the first time, or Netbeans may need to be reinstalled entirely. (Probably, there is a way to have it rescan modulesfor module updates, but I have not found it.) |
Now you need to install Maven grammar support. This is a version The one you downloaded is especially for Netbeans 4.1beta.
...
To build the project using Maven, simply right click on the project in the lefthand pane and click Build.
Alternately, you can select the menu item Build -> Build Main Project or press F11.
You should see the Maven splash screen in the console and scrolling messages as the project is built.
Congratulations, you now have Maven support in Netbeans.