michael-o commented on PR #287:
URL:
https://github.com/apache/maven-plugin-tools/pull/287#issuecomment-2133785830
> > > @michael-o I still have a bunch of warnings when running
`dependency:3.6.1:analyze`:
> > > ```
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-api ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.opentest4j:opentest4j:jar:1.3.0:test
> > > [WARNING] org.apache.maven.doxia:doxia-site-renderer:jar:1.11.1:test
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > > [WARNING] org.slf4j:slf4j-simple:jar:1.7.36:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-generators ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > > [WARNING] org.slf4j:slf4j-simple:jar:1.7.36:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-java ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-annotations ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > > [WARNING] org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
> > > [WARNING] org.slf4j:slf4j-simple:jar:1.7.36:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-model ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING]
org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:compile
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-ant ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] javax.inject:javax.inject:jar:1:compile
> > > [WARNING] org.apache.maven:maven-plugin-api:jar:3.9.6:compile
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] org.apache.maven:maven-core:jar:3.9.6:compile
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > > [WARNING] org.codehaus.plexus:plexus-utils:jar:4.0.1:compile
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @ maven-script-ant
---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.apache.maven:maven-artifact:jar:3.9.6:compile
> > > [WARNING] org.apache.maven:maven-model:jar:3.9.6:compile
> > > [WARNING] org.apache.maven:maven-settings:jar:3.9.6:compile
> > > [WARNING] org.codehaus.plexus:plexus-classworlds:jar:2.7.0:compile
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] org.codehaus.plexus:plexus-utils:jar:4.0.1:compile
> > > [WARNING]
org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:compile
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.apache.ant:ant-launcher:jar:1.10.14:compile
> > > [WARNING] org.codehaus.plexus:plexus-xml:jar:3.0.0:compile
> > > [WARNING] org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
> > > [WARNING] Non-test scoped test only dependencies found:
> > > [WARNING] org.apache.maven:maven-settings:jar:3.9.6:compile
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-beanshell ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] javax.inject:javax.inject:jar:1:compile
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-script-beanshell ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] bsh:bsh:jar:1.3.0:compile
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING] org.apache-extras.beanshell:bsh:jar:2.0b6:compile
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-plugin ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING] org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
> > > [WARNING] org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-java:jar:3.13.1-SNAPSHOT:runtime
> > > [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-annotations:jar:3.13.1-SNAPSHOT:runtime
> > > [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-ant:jar:3.13.1-SNAPSHOT:runtime
> > > [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-beanshell:jar:3.13.1-SNAPSHOT:runtime
> > > [WARNING] org.junit.jupiter:junit-jupiter:jar:5.10.2:test
> > > [WARNING]
org.apache.maven.plugin-tools:maven-script-beanshell:jar:3.13.1-SNAPSHOT:test
> > > [WARNING]
org.apache.maven.plugin-tools:maven-script-ant:jar:3.13.1-SNAPSHOT:test
> > >
> > > [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-report-plugin ---
> > > [WARNING] Used undeclared dependencies found:
> > > [WARNING]
org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:compile
> > > [WARNING] Unused declared dependencies found:
> > > [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-generators:jar:3.13.1-SNAPSHOT:compile
> > > [WARNING] org.junit.jupiter:junit-jupiter:jar:5.10.2:test
> > > [WARNING]
org.apache.maven.plugins:maven-plugin-plugin:jar:3.13.1-SNAPSHOT:test
> > > ```
> >
> >
> > I am aware if that, I have intentionally left out deprecated modules and
test dependencies because many of those are false positives. We last a
test-runtime scope. Do you still want me to tackle test scope?
>
> No, not necessarily. I'm fine with leaving out deprecated modules and test
dependencies. We're down to the following:
>
> ```
> [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-tools-model ---
> [WARNING] Used undeclared dependencies found:
> [WARNING] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:compile
>
> [INFO] --- dependency:3.6.1:analyze (default-cli) @ maven-plugin-plugin ---
> [WARNING] Used undeclared dependencies found:
> [WARNING] Unused declared dependencies found:
> [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-java:jar:3.13.1-SNAPSHOT:runtime
> [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-annotations:jar:3.13.1-SNAPSHOT:runtime
> [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-ant:jar:3.13.1-SNAPSHOT:runtime
> [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-beanshell:jar:3.13.1-SNAPSHOT:runtime
>
> [INFO] --- dependency:3.6.1:analyze (default-cli) @
maven-plugin-report-plugin ---
> [WARNING] Used undeclared dependencies found:
> [WARNING] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:compile
> [WARNING] Unused declared dependencies found:
> [WARNING]
org.apache.maven.plugin-tools:maven-plugin-tools-generators:jar:3.13.1-SNAPSHOT:compile
> ```
>
> Should those be ignored too ?
Here we have two issues:
1. Since those are runtime dependencies and `:analyze` does a static
analysis it cannot determine this. I have this `runtime` issue in other
components as well. I hesitate to remove them w/o exactly knowning the
consequences at runtime.
2.
`org.apache.maven.plugin-tools:maven-plugin-tools-generators:jar:3.13.1-SNAPSHOT:compile`
is a bug in the mojo because explicitly in this case it is an import for a
Javadoc `{@link ...}`. If I remove, Javadoc will complain, if I leave
`:analyze` will complain. Ideally analyze could cover Javadoc imports as well.
One could turn this into `provided` for Javadoc:
```
osipovmi@deblndw011x:/tmp/maven-plugin-tools (MPLUGIN-526 *=)
$ git diff
diff --git a/maven-plugin-report-plugin/pom.xml
b/maven-plugin-report-plugin/pom.xml
index 38f79e40..92c5da0d 100644
--- a/maven-plugin-report-plugin/pom.xml
+++ b/maven-plugin-report-plugin/pom.xml
@@ -89,10 +89,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-generators</artifactId>
- </dependency>
<!-- doxia -->
<dependency>
```
output:
```
[INFO] --- maven-compiler-plugin:3.13.0:compile (default-compile) @
maven-plugin-report-plugin ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 7 source files with javac [debug deprecation target 8] to
target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/tmp/maven-plugin-tools/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor/EnhancedPluginDescriptorBuilder.java:[38,47]
package org.apache.maven.tools.plugin.generator does not exist
[INFO] 1 error
```
for
https://github.com/apache/maven-plugin-tools/blob/993425ca11db649872cee31474f889a77ef35bea/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor/EnhancedPluginDescriptorBuilder.java#L38-L44
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]