Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MyXOF opened this issue Dec 26, 2018 · 1 comment
Labels

Comments

@MyXOF
Copy link
Collaborator

MyXOF commented Dec 26, 2018

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
Copy link
Collaborator Author

MyXOF commented Dec 26, 2018

A temporary solution is to remove

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

in root/pom.xml

@MyXOF MyXOF added the bug label Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant