diff --git a/pom.xml b/pom.xml
index 5d83c1203..6b3b4f371 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
com.jcabi
parent
- 0.57.2
+ 0.59.0
com.qulice
qulice
@@ -96,6 +96,11 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ org.antlr
+ antlr4-runtime
+ 4.9.2
+
org.projectlombok
lombok
diff --git a/qulice-checkstyle/pom.xml b/qulice-checkstyle/pom.xml
index f14f78a17..af5585c00 100644
--- a/qulice-checkstyle/pom.xml
+++ b/qulice-checkstyle/pom.xml
@@ -152,6 +152,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
checkstyle:/src/test/resources/com/qulice/checkstyle/.*
pmd:.*/src/test/resources/.*
+ dependencies:org.antlr
xml:/src/main/resources/com/qulice/checkstyle/checks.xml
xml:/src/test/resources/com/qulice/checkstyle/ChecksTest/.*
diff --git a/qulice-maven-plugin/src/main/java/com/qulice/maven/DependenciesValidator.java b/qulice-maven-plugin/src/main/java/com/qulice/maven/DependenciesValidator.java
index 90b5df608..86c2f9b96 100644
--- a/qulice-maven-plugin/src/main/java/com/qulice/maven/DependenciesValidator.java
+++ b/qulice-maven-plugin/src/main/java/com/qulice/maven/DependenciesValidator.java
@@ -50,6 +50,7 @@
* Validator of dependencies.
*
* @since 0.3
+ * @checkstyle ReturnCountCheck (100 line)
*/
final class DependenciesValidator implements MavenValidator {
@@ -62,13 +63,14 @@ final class DependenciesValidator implements MavenValidator {
public void validate(final MavenEnvironment env)
throws ValidationException {
final Collection excludes = env.excludes("dependencies");
- if (!env.outdir().exists()
- || "pom".equals(env.project().getPackaging())
- || excludes.contains(".*")
- ) {
+ if (!env.outdir().exists() || "pom".equals(env.project().getPackaging())) {
Logger.info(this, "No dependency analysis in this project");
return;
}
+ if (excludes.contains(".*")) {
+ Logger.info(this, "Dependency analysis suppressed in the project via pom.xml");
+ return;
+ }
final Collection unused = Collections2.filter(
DependenciesValidator.unused(env),
Predicates.not(new DependenciesValidator.ExcludePredicate(excludes))
@@ -93,6 +95,13 @@ public void validate(final MavenEnvironment env)
StringUtils.join(used, DependenciesValidator.SEP)
);
}
+ if (!used.isEmpty() || !unused.isEmpty()) {
+ Logger.info(
+ this,
+ // @checkstyle LineLength (1 line)
+ "You can suppress this message by dependencies:... in pom.xml, where <...> is what the dependency name starts with (not a regular expression!)"
+ );
+ }
final int failures = used.size() + unused.size();
if (failures > 0) {
throw new ValidationException(