我在这个插件上收到格式错误的POM,无法识别的标签清单,
文档支持实现,所以我不明白如何解决这个问题。
感谢。
标题
<?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.
答案 0 :(得分:1)
<manifest>
元素应 in <archive>
元素。
如, https://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html