Maven NetBeans Module Plugin

PopulateRepositoryMojo incapable of processing sources & Javadoc

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 3.2
  • Fix Version/s: 3.3
  • Component/s: None
  • Labels:
    None
  • Environment:
    Ubuntu Lucid, JDK 6u21, Maven 2.2.1
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

With the diagnostic patch from http://jira.codehaus.org/browse/MNG-4731 applied, mvn nbm:populate-repository on NetBeans 6.9.1 with netbeansJavadocDirectory and netbeansSourcesDirectory defined yields this error:

...
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An invalid artifact was detected.

This artifact might be in your project's POM, or it might have been included transitively
during the resolution process. Here is the information we do have for this artifact:

    o GroupID:     org.netbeans.modules
    o ArtifactID:  org-netbeans-modules-profiler-freeform
    o Version:     RELEASE691
    o Type:        <<< MISSING >>>

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.netbeans.modules:
org-netbeans-modules-profiler-freeform:RELEASE691:null}: The type cannot be empty.
	at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:141)
	at org.apache.maven.project.artifact.AttachedArtifact.validateIdentity(AttachedArtifact.java:63)
	at org.apache.maven.project.artifact.AttachedArtifact.<init>(AttachedArtifact.java:53)
	at org.codehaus.mojo.nbm.PopulateRepositoryMojo.createAttachedArtifact(PopulateRepositoryMojo.java:617)
	at org.codehaus.mojo.nbm.PopulateRepositoryMojo.execute(PopulateRepositoryMojo.java:424)
...

A simple patch (attached) seems to correct the problem and permit the repository to be generated. For convenience I am also attaching the 3.2 plugin rebuilt with this patch (may be placed in ~/.m2/repository/org/codehaus/mojo/nbm-maven-plugin/3.2/nbm-maven-plugin-3.2.jar as a hotfix).

  1. PopulateRepositoryMojo.diff
    14/Jul/10 2:01 PM
    1 kB
    Jesse Glick

Activity

Hide
Milos Kleint added a comment -

this used to work for me for ages. I suppose it's related to use of 2.2.1 maven.

Show
Milos Kleint added a comment - this used to work for me for ages. I suppose it's related to use of 2.2.1 maven.
Hide
Milos Kleint added a comment -

I've applied the patch

Show
Milos Kleint added a comment - I've applied the patch

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: