gpt4 book ai didi

java - Maven war 插件出现格式错误的 pom 错误

转载 作者:行者123 更新时间:2023-12-01 11:15:31 26 4
gpt4 key购买 nike

我在此插件上收到格式错误的 POM、无法识别的标记 list ,

文档支持实现,所以我不明白如何解决这个问题。

谢谢。

标题:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

插件:

<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<archive>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
<Release-Version>${release.version}</Release-Version>
<Release-Type>${RELEASE_TYPE}</Release-Type>
<Build-Number>${BUILD_NUMBER}</Build-Number>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>


[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.X.server:X:0.0.1-SNAPSHOT (...pom.xml) has 1 error
[ERROR] Malformed POM ...pom.xml: Unrecognised tag: 'manifest' (position: START_TAG seen ...</artifactId>\n <manifest>... @220:31) @ ...pom.xml, line 220, column 31 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

最佳答案

<manifest>元素应位于 <archive>元素。

例如, https://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

关于java - Maven war 插件出现格式错误的 pom 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31878504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com