question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

One or more exceptions occurred during analysis: Could not find artifact

See original GitHub issue

On version 1.4.4.1 maven plugin

[ERROR] Failed to execute goal org.owasp:dependency-check-maven:1.4.4.1:check (default) on project mymodule: One or more exceptions occurred during dependency-check analysis: One or more exceptions occurred during analysis: [ERROR] Could not find artifact org.hyperic:sigar-dist:zip:1.6.4.129 in sonatype-public-repository (https://oss.sonatype.org/content/groups/public)

<dependency>
            <groupId>org.hyperic</groupId>
            <artifactId>sigar</artifactId>
           <version>1.6.5.132-6</version>
        </dependency>
        <dependency>
            <groupId>org.hyperic</groupId>
            <artifactId>sigar-dist</artifactId>
            <version>1.6.5.132-6</version>
            <type>zip</type>
        </dependency>

Running the build with -X for debug yields this

[ERROR] Could not find artifact org.hyperic:sigar-dist:zip:1.6.4.129 in sonatype-public-repository (https://oss.sonatype.org/content/groups/public)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.owasp:dependency-check-maven:1.4.4.1:check (default) on project mymodule: One or more exceptions occurred during dependency-check analysis
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: One or more exceptions occurred during dependency-check analysis
        at org.owasp.dependencycheck.maven.CheckMojo.runCheck(CheckMojo.java:120)
        at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.execute(BaseDependencyCheckMojo.java:466)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: org.owasp.dependencycheck.exception.ExceptionCollection: One or more exceptions occurred during analysis:
        Could not find artifact org.hyperic:sigar-dist:zip:1.6.4.129 in sonatype-public-repository (https://oss.sonatype.org/content/groups/public)
        at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.collectDependencies(BaseDependencyCheckMojo.java:708)
        at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.scanArtifacts(BaseDependencyCheckMojo.java:633)
        at org.owasp.dependencycheck.maven.CheckMojo.runCheck(CheckMojo.java:92)
        ... 23 more
[ERROR]
[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/MojoExecutionException
[DEBUG] Entering finalize
[DEBUG] Entering finalize
[DEBUG] Entering finalize

If i remove the owasp check, the build runs just fine. Maven has no trouble resolving the artifact, but it’s not in the sonatype. It may be possible that the plugin is only selecting the first repository listed in the pom and not all of them.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jeremylongcommented, Oct 18, 2017

Sorry about the delay in responding to this. The code around retrieving artifacts in the Maven plugin has been completely refactored and now uses ${project.remoteArtifactRepositories}. I believe this resolves the issue.

0reactions
lock[bot]commented, Sep 27, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven: Could Not find Artifact when trying to include a project ...
I tried all of the above solutions to no avail, running clean install both in eclipse and from command line. I was able...
Read more >
org.owasp.dependencycheck.maven ...
The plugin will generate a report listing the dependency, any identified Common Platform Enumeration (CPE) identifiers, and the associated Common Vulnerability ...
Read more >
Apache Maven Dependency Plugin – Usage
Multiple artifacts can be defined in a single execution. ... If not set, the plugin will attempt to resolve it from the project...
Read more >
dependency-check – Tasks
The following properties can be configured in the dependencyCheck task. However, they are less frequently changed. One exception may be the cve Url...
Read more >
Maven Resolve Missing Artifact Error Example
Check if the correct repository is specified in the pom.xml from which the package was downloaded originally. It might happen that the url...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found