For anyone new to the Netbeans IDE, like myself, you might find yourself perplexed by the fact that you can’t execute any substantially large projects. Netbeans relies heavily on 3rd parties for their integration with other tools, i noticed while setting up a simple SSH tunneled SVN connection. This might be a little confusing to a new developer or someone not very familiar with the two technologies.

Let’s jump into configuring this beast:

SubVersion svn+ssh://

Seeing i’m setting everything up on the new workstation my office gave me, this will be a guide for Windows 7 x64bit users.

Packages

  • SilkSVN (Client Only)
  • TortoiseSVN 1.6.9….

Both are quite easy to install with their standard Microsoft MSI bundles. The need for TortoiseSVN is two fold: 1. It is an awesome SVN client, and 2. It comes with TortoisePlink, which I had better luck with than the PuttyPlink base itself.

Now in the Netbeans IDE follow the menus ‘Team >> Subversion >> Checkout’ this will produce a dialog where you can setup your SVN repository. This example is exclusively for the svn+ssh protocol so the URL will look like: svn+ssh://servername.net/path/to/repo

The external Tunnel command will look like: TortoisePlink -l username -pw password

This assumes you have updated your windows environment variable PATH to include the bin directories of both TortoiseSVN and SilkSVN, which by default get installed to your C:\Program Files\ directory. The really nice thing about TortoisePlink is that it will not continue to ask for your password!!!! Major pain in the a** when working with the standard plink out of the box.

Maven2

This one was a little more confusing to find the solution for, but luckily it has gotten much easier thanks to the Netbeans dev team. The Netbeans team have released an update to the codehaus exec mojo SNAPSHOT that fixes the fun execution problem (https://netbeans.org/bugzilla/show_bug.cgi?id=153644).

After setup of a brand new maven 2.2.3 install, Netbeans will fail to execute any project/file that has a dependency chain over a certain length. To rectify this problem add the codaus snapshot repository to your maven 2 settings.xml as suggested in the bug report above. It will look something like:


<pluginRepositories>
<pluginRepository>
<id>s.r.c.org <name>Codehaus SNAPSHOT repository <url>http://snapshots.repository.codehaus.org <layout>default </pluginRepository>
</pluginRepositories>

Next you will need to setup your project to use the new version, luckily this is rather easy as they define the version in the execution string. Right click on your project and select properties. A dialog with a list of forms on the left should appear, select the 'Actions' button. Here you will need to go through each action that uses the exec plugin and update the Execute Goals changing the '1.1.1' string to '1.1.2-SNAPSHOT'. This data is then saved to an XML file; however, editing the XML file directly did not seem to work properly (probably because i did it while netbeans was running).

Hope this helps save some hair from getting pulled out!

© 2011 Technical Solutions Suffusion theme by Sayontan Sinha