Thứ Năm, 27 tháng 2, 2014

Issue:

if I run some specific maven task for example mvn clean install findbugs:findbugs (If I run only mvn clean install then there is no such message)
I know that the problem is that this POM does not exists, because it is only defined to hold the mapping information. (m2e lifecycle-mapping not found)
Anyway, I want to keep my build clean, without any warnings, so how can I get rid of this specific one? (My CI server checks that there is no warning.)
[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
which is confusing. When you run a CI server, people will come and ask what these warnings mean. So I created a dummy nonsense plugin, just to provide a valid plugin which will do nothing.

Solution:

The easiest way is to checkout the repository and run mvn install or mvn deploy -DaltDeploymentRepository=REPOID::default::PLUGIN_REPO_URL.
Otherwise you may download the pom and the binary jar and run:
  • mvn install:install-file -DpomFile=pom.xml -Dfile=lifecycle-mapping-1.0.0.jar or
  • mvn deploy:deploy-file -DpomFile=pom.xml -Dfile=lifecycle-mapping-1.0.0.jar -DrepositoryId=REPO_ID -Durl=PLUGIN_REPO

Không có nhận xét nào:

Đăng nhận xét