https://bz.apache.org/bugzilla/show_bug.cgi?id=66299
Garret Wilson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|----- |------ Status|RESOLVED |REOPENED Component|Catalina |Catalina Resolution|INVALID |--- Version|9.0.50 |10.1.0 Product|Tomcat 9 |Tomcat 10 --- Comment #3 from Garret Wilson <[email protected]> --- I'm reopening this ticket now that the cause is better understood and a simple fix is available. You may still decide not to address this, and that's OK because I have a workaround, but in my opinion the appropriate resolution would not be `INVALID` but rather `WONTFIX`. In any case I wanted to at least provide a further explanation for completeness and to help anyone else who is looking for the answer in the future. Summarizing our discussion on the list, Tomcat has a primary Ant-based build workflow which uses the bnd annotation `aQute.bnd.annotation.spi.ServiceConsumer` (which in turn uses the OSGi class `org.osgi.annotation.bundle.Requirement`) to generate JPMS and OSGi metadata. These classes aren't needed in any secondary builds (i.e. using Maven with the embedded Tomcat dependency), but `javac` with linting doesn't like it if these annotation classes are missing. This can be solved easily enough if Tomcat were to include the following in its POM(s) (versions relevant for Tomcat 10.1.0 shown here): ```xml <dependency> <groupId>biz.aQute.bnd</groupId> <artifactId>biz.aQute.bnd.annotation</artifactId> <version>6.3.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi.annotation</artifactId> <version>8.1.0</version> <scope>provided</scope> </dependency> ``` Developers can prevent the warning by including those same dependency declarations in their own POMs. The `provided` scope informs Maven that these dependencies should not be included in any resulting JARs in the secondary build. Even if you decide to close this ticket again, thanks for the discussion on the list and explaining what was causing this. That helped me find a workaround. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
