Discussion:
Netbeans Maven Plugin
davisford
16 years ago
Permalink
Hi, I downloaded NB 6.5.1 for the mac, and installed the maven plugin. Then I created a new project of type Maven -> Netbeans Platform Application. I filled in the information, and it created the project.



The pom parent project appears fine in the IDE, but all the maven sub-project modules indicate: Badly formed Maven Project. If I click show problems I get:



Error reading project model



Cannot resolve pre-scanned plugin artifact (for use as an extension): org.codehaus.mojo:nbm-maven-plugin: Failed to resolve extension plugin: org.codehaus.mojo:nbm-maven-plugin:maven-plugin:RELEASE



This is a bit strange, b/c if I go to the command line and run mvn install on the top level, it builds successfully.



Is there a workaround for this?



On the command line I'm using:

zeno-mbp:$ mvn -version

Maven version: 2.0.9

Java version: 1.6.0_07

OS name: "mac os x" version: "10.5.6" arch: "x86_64" Family: "mac"
davisford
16 years ago
Permalink
Figured out a fix. The archetype generates the following plugin dependency in all pom.xml files:



<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>nbm-maven-plugin</artifactId>

</plugin>



...but it does not specify a version. For whatever reason, maven on the command line has no issues with this, but the IDE does. Checking my local repo, I have version 3.0 installed, so I just put that in the pom.xml, and the IDE fixed itself.
mkleint
16 years ago
Permalink
...
http://www.netbeans.org/issues/show_bug.cgi?id=135043


the workaround is sometimes to build it with the command line version to
populate the local repoitory.

But I'm wondering what version of the archetype have you run? AFAIK all
the archetypes I've created have the version declared in the parent
pom's pluginManagement section. Therefore you should not end up with
RELEASE.. but it could be yet another issue with the embedded maven *sigh*

Milos
Post by davisford
Is there a workaround for this?
zeno-mbp:$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "mac os x" version: "10.5.6" arch: "x86_64" Family: "mac"
Loading...