Search code examples
javanetbeans-platform

Missing manifest tag OpenIDE-Module


In a newly generated project I started getting this error when trying to compile the branding module:

--- nbm-maven-plugin:4.1:nbm (default-nbm) @ QualityTrends-branding --- Copying module JAR to /home/javier/Desktop/QualityTrends/branding/target/nbm/netbeans/qualitytrends/modules Cannot generate config file.

Later this is further expanded:

Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:4.1:nbm (default-nbm) on project QualityTrends-branding: Missing manifest tag OpenIDE-Module; /home/javier/Desktop/QualityTrends/branding/target/nbm/netbeans/qualitytrends/modules/net-sourceforge-javydreamercsw-QualityTrends-branding.jar is not a module -> [Help 1]

Inspecting the module's manifest file shows that entry missing, but it's missing as well in all other modules, so I'm not sure what's wrong.

This are the file's contents:

Manifest-Version: 1.0
OpenIDE-Module-Localizing-Bundle: net/sourceforge/javydreamercsw/quality/trends/branding/Bundle.properties
AutoUpdate-Essential-Module: true

Any idea?


Solution

  • I guess you miss maven-jar-plugin in your pom.xml. Check your pom and add the following section if missed in <plugins> section.

    <plugin> <!-- required since nbm-plugin 3.0-->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
            <useDefaultManifestFile>true</useDefaultManifestFile>
        </configuration>
    </plugin>
    

    Compare your pom file with: http://www.mojohaus.org/nbm-maven-plugin/