简体   繁体   English

缺少清单标签OpenIDE-Module

[英]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. --- nbm-maven-plugin:4.1:nbm(default-nbm)@ QualityTrends-branding ---将模块JAR复制到/ home / javier / Desktop / QualityTrends / branding / target / nbm / netbeans / qualitytrends / modules无法生成配置文件。

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; 无法在项目QualityTrends-branding上执行目标org.codehaus.mojo:nbm-maven-plugin:4.1:nbm(default-nbm):缺少清单标记OpenIDE-Module; /home/javier/Desktop/QualityTrends/branding/target/nbm/netbeans/qualitytrends/modules/net-sourceforge-javydreamercsw-QualityTrends-branding.jar is not a module -> [Help 1] /home/javier/Desktop/QualityTrends/branding/target/nbm/netbeans/qualitytrends/modules/net-sourceforge-javydreamercsw-QualityTrends-branding.jar不是模块 - > [帮助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? 任何想法?

If using a the maven-jar-plugin that is recent (3.0.0 or higher), Usual Java's answer will no longer work because the useDefaultManifestFile parameter was removed as per this jira task . 如果使用最近的maven-jar-plugin(3.0.0或更高版本),Usual Java的答案将不再有效,因为根据此jira任务删除了useDefaultManifestFile参数。

The following will replicate what "useDefaultManifestFile=true" was doing: 以下将复制“useDefaultManifestFile = true”正在执行的操作:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>3.0.2</version>
  <configuration>
    <archive>
      <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
    </archive>
  </configuration>
</plugin>

I guess you miss maven-jar-plugin in your pom.xml. 我猜你错过了你的pom.xml中的maven-jar-plugin。 Check your pom and add the following section if missed in <plugins> section. 如果在<plugins>部分中遗漏了,请检查您的pom并添加以下部分。

<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/ 将您的pom文件与以下内容进行比较: http//www.mojohaus.org/nbm-maven-plugin/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM