org.eclipse.m2e : lifecycle-mapping에 대한 POM을 찾을 수 없음 경고 제거
m2e 1.0이 올바르게 작동하도록하려면 수명주기 매핑을 지정해야했습니다.
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<versionRange>[2.0.2,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
그러나 다음 경고가 표시됩니다.
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0
예를 들어 특정 maven 작업을 mvn clean install findbugs:findbugs
실행하면 (만 실행하면 해당 mvn clean install
메시지가 없습니다)
문제는 매핑 정보를 보유하도록 정의되어 있기 때문에이 POM이 존재하지 않는다는 것입니다. ( m2e 수명주기 매핑을 찾을 수 없음 )
어쨌든 경고없이 내 빌드를 깨끗하게 유지하고 싶습니다.이 특정 빌드를 어떻게 제거 할 수 있습니까? ( 내 CI 서버가 경고가 없는지 확인합니다. )
Maven 3.0.2를 사용하고 Maven 3.0.3도 시도했지만 결과는 같습니다.
우리 팀은 관련 구성을 프로필에 래핑하여이 문제를 해결합니다.
<profile>
<id>only-eclipse</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
...
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
This a known bug with WONTFIX resolution. The suggested solution is the simplest in my opinion:
mvn archetype:generate -DgroupId=org.eclipse.m2e -DartifactId=lifecycle-mapping \
-Dversion=1.0.0 -DarchetypeArtifactId=maven-archetype-mojo
and install
this project.
This solution is now deprecated, I would recommend using the "profile" solution by @ctrueden which is the accepted answer!
While not the most clean solution, when you use a repository manager in your company or are on your own, in the mean time you may do this: - Checkout https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin. - Run mvn install
when you are on your own - Run mvn deploy -DaltDeploymentRepository=REPO_ID::default::YOUR_THIRDPARTY_REPO_URL
when you have a repository manager like Nexus or Artifactory. - See https://github.com/mfriedenhagen/dummy-lifecycle-mapping-plugin/blob/master/README.creole as well.
Regards Mirko
m2eclipse 1.7.0 introduced an alternative, namely an XML processing instruction.
In the original example, you would simply “annotate” every <execution>
of the maven-processor-plugin
’s process
goal with
<?m2e execute?>
See the release notes for more details on the syntax and further options.
Now there's now better solution (for the error messages in Eclipse only).
Press CTR+1 on the error Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:buildnumber-maven-plugin:1.1:create-timestamp (execution: default-create-timestamp, phase: validate) and then select this option:
This works with org.eclipse.m2e.editor.xml_1.2.0.20120903-1050.jar
plugin (maybe earlier also)
ReferenceURL : https://stackoverflow.com/questions/7905501/get-rid-of-pom-not-found-warning-for-org-eclipse-m2elifecycle-mapping
'IT story' 카테고리의 다른 글
"네임 스페이스에 정의 된 요소는 비공개, 보호 또는 보호 내부로 명시 적으로 선언 할 수 없습니다."오류 (0) | 2020.12.30 |
---|---|
파이썬은 다중 코어에서 실행할 수 있습니까? (0) | 2020.12.30 |
C 프로그램에서 fclose ()를 호출하지 않으면 어떻게됩니까? (0) | 2020.12.30 |
인증이 필요한 리소스에 대한 올바른 http 상태 코드 (0) | 2020.12.30 |
Visual Studio 2012 또는 2013의 Emacs 키 바인딩 (0) | 2020.12.30 |