最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

maven-war-plugin not creating manifest file - Stack Overflow

programmeradmin0浏览0评论

In a new directory, execute the following command to generate a default webapp:

mvn archetype:generate -DgroupId=com.xyz -DartifactId=wheres-my-manifest-file -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.5 -DinteractiveMode=false

Open the pom.xml and add the configuration section below, save:

<plugin>
  <artifactId>maven-war-plugin</artifactId>
  <version>3.4.0</version>
    <configuration>
        <archive>
            <manifestEntries>
              <Project-Name>wheres-my-manifest-file</Project-Name>
              <Build-Number>1.0</Build-Number>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>

In a shell, in the directory above, containing your pom.xml, execute mvn package. The target folder is created. Look in /target/wheres-my-manifest-file/META-INF. There is no manifest.mf file.

I've tried many things to get this file to generate, with no luck. Does anyone know how to get Maven to create this file? It has no problem creating the META-INF folder.

发布评论

评论列表(0)

  1. 暂无评论