How to convert an ANT-based NetBeans Module to a Maven-based NetBeans Module?

Apache NetBeans Wiki Index

Note: These pages are being reviewed.

The following list was created while converting a simple plugin with less than 20 classes, so the migration steps of large projects might vary. But you should get the basic idea.

For example use

 <dependency>
   <groupId>org.netbeans.api</groupId>
   <artifactId>org-netbeans-modules-projectapi</artifactId>
   <version>RELEASE73</version>
 </dependency>

for

 <dependency>
   <code-name-base>org.netbeans.modules.projectapi</code-name-base>
   <build-prerequisite/>
   <compile-dependency/>
   <run-dependency>
       <release-version>1</release-version>
       <specification-version>1.46.1</specification-version>
   </run-dependency>
 </dependency>

(!) Note that the dots in the dependency name have to replaced by a dashes

 <dependency>
     <groupId>org.netbeans.api</groupId>
     <artifactId>org-netbeans-libs-junit4</artifactId>
     <version>RELEASE73</version>
     <scope>test</scope>
 </dependency>

for

 <test-dependencies>
     <test-type>
         <name>unit</name>
         <test-dependency>
             <code-name-base>org.netbeans.libs.junit4</code-name-base>
             <compile-dependency/>
         </test-dependency>
     </test-type>
 </test-dependencies>

There is still more to do. Like to configure export packages, signing, homepage and so one. Most of these configuration settings defined in the original project.properties have a counterpart in the plugin configuration of the nbm-maven-plugin. See the detailed goal documentation at http://mojo.codehaus.org/nbm-maven/nbm-maven-plugin/nbm-mojo.html

Copied from http://benkiew.wordpress.com/2013/10/21/how-convert-an-ant-based-netbeans-module-to-a-maven-based-netbeans-module/. Tested with NB7.4