TaT UseExternalMavenWithCocoon22InNetBeans

Using External Maven with Cocoon 2.2 in NetBeans

Contributed By; Hubert A Klein Ikkink


Reposted from this blog entry- http://mrhaki.blogspot.com/2008/09/use-external-maven-to-work-with-cocoon.html

Tips and Tricks

Update: since NetBeans 6.5 we don't have to use the external Maven. We can use the internal Maven from NetBeans! So if you use NetBeans 6.1 you must apply what is described in this article, otherwise you are already to go.

For previous versions:

Working with Cocoon 2.2 is a blessing compared to the previous versions. Cocoon 2.2 is now based on the Spring framework and uses Maven for the build process. Especially the dependency mechanism of Maven makes creating a new Cocoon application a lot easier. And if there is one IDE out there with superb Maven support than it is NetBeans.

NetBeans already has the Cocoon Maven archetypes available. To create a new Cocoon block for example is as easy as clicking on several menu options. The only thing we need to consider is that the Cocoon Maven plugin doesn't (yet) support the Maven 2.1-SNAPSHOT version, which is used by the NetBeans. Luckily we can define an external Maven in NetBeans to be used.

Make sure we have installed Maven 2.0.9 on our computer. Then in NetBeans we go to Tools > Options > Miscellaneous > Maven 2. Here we can define the path to our Maven 2.0.9 in the field External Maven Home. File:netbeans-external-maven1_TaT_UseExternalMavenWithCocoon22InNetBeans.png After we have defined the path to Maven we can select a project and go to Project Properties. In the Actions section we can select the checkbox Use external Maven for build execution. File:netbeans-external-maven2_TaT_UseExternalMavenWithCocoon22InNetBeans.png

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo