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

2.9.0: plexus-compiler-eclipse lacks dependencies; doesn't work with maven-compiler-plugin 3.8.1 #166

Closed
tomaswolf opened this issue Nov 12, 2021 · 1 comment

Comments

@tomaswolf
Copy link
Contributor

Trying to use plexus-compiler-eclipse 2.9.0 with maven-compiler-plugin 3.8.1 leads to

org.apache.maven.plugin.PluginContainerException: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile: java.lang.NoSuchMethodError: 'java.lang.String org.codehaus.plexus.compiler.CompilerConfiguration.getWarnings()'

with stack trace

Caused by: java.lang.NoSuchMethodError: 'java.lang.String org.codehaus.plexus.compiler.CompilerConfiguration.getWarnings()'
15:24:41      at org.codehaus.plexus.compiler.eclipse.EclipseJavaCompiler.performCompile (EclipseJavaCompiler.java:132)
15:24:41      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1134)
15:24:41      at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:187)

and reports

15:24:41  [ERROR] urls[1] = file:.../.repository/org/codehaus/plexus/plexus-compiler-eclipse/2.9.0/plexus-compiler-eclipse-2.9.0.jar
...
15:24:41  [ERROR] urls[17] = file:.../.repository/org/codehaus/plexus/plexus-compiler-api/2.8.4/plexus-compiler-api-2.8.4.jar
15:24:41  [ERROR] urls[18] = file:.../.repository/org/codehaus/plexus/plexus-compiler-manager/2.8.4/plexus-compiler-manager-2.8.4.jar
15:24:41  [ERROR] urls[19] = file:.../.repository/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar

plexus-compiler-eclipse 2.9.0 depends on plexus-compiler-api 2.9.0, but doesn't declare this dependency in the pom.xml. So one ends up with inconsistent versions.

Users would have to override the maven-compiler-plugin config by not only adding the dependency to plexus-compiler-eclipse:2.9.0 but also to plexus-compiler-api:2.9.0.

I think the dependency should be declared.

@pzygielo
Copy link
Contributor

tomaswolf added a commit to tomaswolf/plexus-compiler that referenced this issue Nov 12, 2021
plexus-compiler-eclipse 2.9.0 depends on plexus-compiler-api 2.9.0
or newer since it makes use of CompilerConfiguration.getWarnings().

Declare the dependency to match the API the plug-in is actually built
against, ensuring that maven-compiler-plugin will also pull in the
correct API version when people use plexus-compiler-eclipse.
slachiewicz pushed a commit that referenced this issue Nov 21, 2021
plexus-compiler-eclipse 2.9.0 depends on plexus-compiler-api 2.9.0
or newer since it makes use of CompilerConfiguration.getWarnings().

Declare the dependency to match the API the plug-in is actually built
against, ensuring that maven-compiler-plugin will also pull in the
correct API version when people use plexus-compiler-eclipse.
mvilliger added a commit to eclipse-scout/scout.sdk that referenced this issue Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants