没有来自Maven构建的清单文件

问题描述 投票:4回答:2

我正在使用Maven生成战争文件。我试图让它在战争中生成清单文件。现在这没有发生。我在pom.xml中添加了以下内容,但无法输出包含该信息的清单文件。任何人有任何想法或指示吗?没有MANIFEST.mf被投入战争。

<project>
   <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        ...
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
        ...
      </plugin>
    </plugins>
  </build>
  ...
</project>
maven war
2个回答
7
投票

您应该将此添加到您的插件配置中:

<executions>
    <execution>
        <phase>package</phase>
        <goals>
            <goal>manifest</goal>
        </goals>
    </execution>
</executions>

0
投票

在插件org.apache.maven.plugins:maven-war-plugin中找不到目标'清单'

© www.soinside.com 2019 - 2024. All rights reserved.