thulab / iotdb

This repository is ReadOnly now. please go to https://github.com/apache/incubator-iotdb
Apache License 2.0
19 stars 0 forks source link

Failed to lookup component: ComponentReportAssistant: java.util.NoSuchElementException #551

Open MyXOF opened 5 years ago

MyXOF commented 5 years ago

In some machines, mvn clean package will fail and has following hint

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (vulnerability-checks) on project root: Execution vulnerability-checks of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce failed: Failed to lookup component: ComponentReportAssistant: java.util.NoSuchElementException
[ERROR] role: org.sonatype.ossindex.maven.common.ComponentReportAssistant
[ERROR] roleHint:
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

I have checked local maven repository,there is ossindex-maven-common-1.0.0.jar and ComponentReportAssistant.class within it.

$ ls -l
-rw-rw-r-- 1 fit fit   208 12月 26 17:56 _maven.repositories
-rw-rw-r-- 1 fit fit 13300 12月 26 17:56 ossindex-maven-common-1.0.0.jar
-rw-rw-r-- 1 fit fit    40 12月 26 17:56 ossindex-maven-common-1.0.0.jar.sha1
-rw-rw-r-- 1 fit fit  2047 12月 26 17:56 ossindex-maven-common-1.0.0.pom
-rw-rw-r-- 1 fit fit    40 12月 26 17:56 ossindex-maven-common-1.0.0.pom.sha1
MyXOF commented 5 years ago

A temporary solution is to remove

\<banVulnerable implementation="org.sonatype.ossindex.maven.enforcer.BanVulnerableDependencies"/>

in root/pom.xml