我想启用 m2e v 1.0 中不可用的旧插件
我已将此添加到 POM,但如果有多个项目,它就不起作用。
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>[0.0.0,)</version>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>[0.0.0,)</version>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
我还尝试了以下变体。
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<lifecycleMappings>
<lifecycleMapping>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>[0.0.0,)</version>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMapping>
<lifecycleMapping>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>[0.0.0,)</version>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMapping>
</lifecycleMappings>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
我得到的错误信息是:
无法解析 maven 项目 MavenProject 的生命周期映射元数据:com.sakriom:drools-context:0.0.1-SNAPSHOT @ D:\Documents and Settings.....\Workspaces\Eclipse 3.6 - Scala\DroolsContext\pom.xml 原因:无法识别的标签:“版本”(位置:已看到 START_TAG ...\r\n ...@10:22)
这个错误信息是如何解码的?