我想啓用舊插件在m2e v 1.0中不可用使用生命週期映射包含更老的m2e插件與m2e 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的上下文:0.0.1-SNAPSHOT @ d:\ Documents和Settings ..... \ Workspaces \ Eclipse 3.6 - Scala \ DroolsContext \ pom.xml 原因:無法識別的標記:'version'(position:START_TAG seen ... \ r \ n ... @ 10:22)
這個錯誤信息是如何解碼的?
你可以發佈'START_TAG'所在的'pom.xml'部分嗎? –
您是否認真地期望我們知道沒有代碼的第8行?顯然,標籤 不允許放置它的位置。 –
carlspring
這是一個重複的http://stackoverflow.com/questions/6663642/cannot-parse-lifecycle-mapping-metadata-for-maven-project-mavenproject –