【发布时间】:2016-12-12 18:32:11
【问题描述】:
我正在尝试将其放入我的 pom.xml-
<configuration>
<archive>
<manifest>
<mainClass>com.limetray.helper.App</mainClass>
</manifest>
</archive>
</configuration>
但出现此错误-
Malformed POM /home/rakesh/Desktop/limetray/lt-utils/pom.xml: Unrecognised tag: 'configuration' (position: START_TAG seen ...<url>http://maven.apache.org</url>\n <configuration>... @10:18) @ /home/rakesh/Desktop/limetray/lt-utils/pom.xml, line 10, column 18 -> [Help 2]
我的 pom.xml-
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.limetray.helper</groupId>
<artifactId>maven-jar-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>lt-utils</name>
<url>http://maven.apache.org</url>
<configuration>
<archive>
<manifest>
<mainClass>com.limetray.helper.App</mainClass>
</manifest>
</archive>
</configuration>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
【问题讨论】:
-
好吧,你能发布你的 POM 吗?你读过maven.apache.org/pom.html 和maven.apache.org/ref/3.3.9/maven-model/maven.html 吗?如果我猜的话,这是一个
maven-jar-plugin配置,看看maven.apache.org/plugins/maven-jar-plugin/index.html -
您能否发布有关您的
pom.xml文件的更多详细信息?你把它放在哪里了? -
参考我给你的3个链接...这不是应该放置的地方。
-
这看起来像是 maven archiver plugin 的一部分,而不是根 pom。
-
感谢@Tunaki 意识到错误。