我对maven很陌生,无法弄清楚。maven插件从本地pom插件中被忽略
我在我的pom.xml文件中有这个插件配置,但它看起来像mvn不使用我的配置。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<packaging>jar</packaging>
<artifactId>${project.artifactId}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<file>
${project.build.directory}/${project.artifactId}-${project.version}.jar
</file>
</configuration>
</execution>
</executions>
</plugin>
我在注释掉这个插件时遇到同样的错误。在博客上有很多讨论,maven忽略了执行中的配置。这仍然是一个问题吗?我如何让maven阅读我的插件声明而不是其他内容?当我的依赖被注释掉时它运行什么?
错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install- plugin:2.3.1:install-file (default-cli) on project core: The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file are missing or invalid -> [Help 1]
显然,maven-jar-plugin和maven-deploy-plugin是一样的。 Maven忽略我的配置。 – vlr 2012-02-08 01:40:05
我甚至都读不懂;你不缩进? – 2012-02-08 01:52:26
你有哪些部分? pluginManagement?建立?更多信息将在这里帮助。 – Michael 2012-02-08 03:06:25