Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chonton/dependency-check-maven-plugin
Strict maven dependency checks
https://github.com/chonton/dependency-check-maven-plugin
dependency maven-plugin
Last synced: 3 months ago
JSON representation
Strict maven dependency checks
- Host: GitHub
- URL: https://github.com/chonton/dependency-check-maven-plugin
- Owner: chonton
- License: apache-2.0
- Created: 2022-06-15T16:58:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T17:19:29.000Z (7 months ago)
- Last Synced: 2024-10-02T10:08:11.108Z (3 months ago)
- Topics: dependency, maven-plugin
- Language: Java
- Homepage:
- Size: 115 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dependency-check-maven-plugin
Strictly check that dependencies were properly declared in a maven project. The project target
classes are examined at the byte code level to determine which classes are required to compile the
project. From the class dependencies, the jar level dependencies are found. This plugin detects
"declared but unused" and "used but undeclared" dependencies.## Goals
There are two goals: [main](https://chonton.github.io/dependency-check-maven-plugin/main-mojo.html)
checks the main target classes; and
[test](https://chonton.github.io/dependency-check-maven-plugin/test-mojo.html) checks the test
target classes.Mojo details
at [plugin info](https://chonton.github.io/dependency-check-maven-plugin/plugin-info.html)## Parameters
The followings parameters can be set with a maven property **dependency-check.**__.
e.g. skip parameter can be set from command line -D dependency-check.skip=true| Parameter | Default | Description |
|---------------------|---------|-----------------------------------------------------|
| fail | true | Fail build when incorrect declarations found |
| skip | false | Skip execution of plugin |The following parameters are sets of dependencies which are to be ignored in various ways. Each of
these parameters are filters.| Parameter | Description |
|----------------------------------|-----------------------------------------------------|
| ignoreDependencies | Ignore incorrect declarations of these dependencies |
| ignoreUnusedDeclaredDependencies | Ignore dependencies if they are declared but unused |
| ignoreUsedUndeclaredDependencies | Ignore dependencies if they are used but undeclared |## Filter Syntax
Dependency filters have multiple segments: `[groupId]:[artifactId]:[type]:[version]`. Each filter
segment is optional and supports full and partial `*` wildcards. An empty pattern segment is treated
as an implicit wildcard.## Requirements
- Maven 3.5 or later
- Java 11 or later## Typical Maven Use
```xml
org.honton.chas
dependency-check-maven-plugin
1.0.1
check-main-dependencies
main
org.slf4j:slf4j-api
check-test-dependencies
test
io.quarkus:quarkus-junit5*
org.awaitility:awaitility
org.junit.jupiter
org.mockito:mockito-*
org.mock-server:mockserver-*
```
## Typical command line use
```shell
mvn org.honton.chas:dependency-check-maven-plugin:1.0.1:main
```