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

In my project i have custom and missing dependencies, that means i am unable to build the project. Can i somehow run maven dependency check plugin and obtain info only about the working dependencies #6904

Open
manoelacmn opened this issue Aug 18, 2024 · 2 comments
Labels

Comments

@manoelacmn
Copy link

manoelacmn commented Aug 18, 2024

For example let's say this is a fragment of my pom file:

(...)
<dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version> <!-- check latest version for GSON -->
        </dependency>
           <dependency>
            <groupId>com.googffele.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version> 
        </dependency>
  (...)

As it's possible to see the last dependency is invalid and it can not be checked, the example above is just a example of a missing depedency.

If i run "mvn org.owasp:dependency-check-maven:check -DskipTests=true", it resuts in error and don't get the scan.

My goal is to get the result only for valid ones

@manoelacmn manoelacmn changed the title In my project i hace custom and missing dependencies, that means i' m unable to build the project. Can i somehow run maven dependency check plugin and obtain info only about the working dependencies In my project i have custom and missing dependencies, that means i am unable to build the project. Can i somehow run maven dependency check plugin and obtain info only about the working dependencies Aug 18, 2024
@jeremylong
Copy link
Owner

You might be able to configure failOnError to false. As this would be a standard maven build error - I'm not 100% sure if that would work.

See https://jeremylong.github.io/DependencyCheck/dependency-check-maven/configuration.html

@aikebah
Copy link
Collaborator

aikebah commented Aug 24, 2024

The only solution is to comment out the invalid ones. Maven will simply refuse to run anything when one of your dependencies is not resolvable.

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

3 participants