20051014 Friday October 14, 2005

Maven 2 NetBeans Plugin Installation Howto

This howto provides several options for installing the Maven 2 NetBeans module.

Prerequisites

  • Make sure that you have NetBeans 5.0 Beta installed (or some NetBeans 5.0 development version).
  • Make sure that you have the latest version of Maven 2 installed. (Probably beta-3.)

Installation Option #1

The first way to get it done is by adding a "mirror" of the central Maven 2 repository to your settings.xml file:

<mirror>
  <id>agilejava-mirror</id>
  <name>Agilejava Mirror</name>
  <url>http://agilejava.com/maven/</url>
  <mirrorOf>central</mirrorOf>
</mirror>

If you now go to a directory containing a project for which you need NetBeans support, you simply type m2 netbeans:netbeans. This will at least download the meta files and poms of the NetBeans plugin. You may however discover that it fails to resolve all depedencies. That's because agilejava.com is not really a mirror of the central Maven 2 repository. So you may for example discover that it attempts to download stringtemplate-2.2.jar, which doesn't exist in the agilejava repository.

The only way that I can think of to solve this is to go back and forth between a version of the settings.xml that does contain the mirror definition and a version that does not contain the mirror information. But I would be happy to hear about other solutions.

Installation Option #2

An alternative approach is to create a mirror yourself, using maven-proxy. Maven-proxy allows you to create a mirror yourself, which is nothing but a thin virtualization layer on top of existing Maven repositories. The cool thing about is that you can set your mirror properties in your settings.xml file. If you add your own local maven-proxy instance as a mirror, and configure it to use both the agilejava repository as well as the central repository, then it will correctly download all of the missing files.

The big disadvantage is of course that you would need to install maven-proxy.

Installation Option #3

Download the files manually from agilejava.com. Not sure if this works. I haven't actualy given it a try, but I don't see why you wouldn't be able to make all of the required modifications to your local repository yourself.

( Oct 14 2005, 11:52:32 AM CEST ) Permalink Comments [1]
Trackback URL: http://blogs.sun.com/wilfred/entry/maven_2_netbeans_plugin_installation1
Comments:

Rather than configuring Agilejava as a mirror, tell m2 it's a Plugin Repository:
   <pluginRepositories>
      <pluginRepository>
         <id>agilejava</id>
         <name>Agilejava</name>
         <url>http://agilejava.com/maven</url>
      </pluginRepository>
   </pluginRepositories>
(Thanks to Dan on users@maven for this tip!)

Posted by Wendy Smoak on November 18, 2005 at 08:02 PM CET #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed