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

"No such compiler 'eclipse'." with 3.15.0 and Maven 3.9.6 #394

Open
stormeuh opened this issue Jun 27, 2024 · 5 comments
Open

"No such compiler 'eclipse'." with 3.15.0 and Maven 3.9.6 #394

stormeuh opened this issue Jun 27, 2024 · 5 comments

Comments

@stormeuh
Copy link

Hello

I am getting "No such compiler 'eclipse'" on a completely bare project (generated from maven quickstart archetype).
Below is my pom.xml, and here is the log from running "mvn clean compile -X"
mvn_clean_compile.log

Quick summary of my environment (see attached log for more):
Fedora 40
Java 21.0.3 OpenJDK
Maven 3.9.6

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>my-app</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-assembly-plugin</artifactId>
      <version>3.4.2</version>
      <type>maven-plugin</type>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>${maven.compiler.version}</version>
      <type>maven-plugin</type>
    </dependency>
  </dependencies>
  <properties>
    <plexus.compiler.version>2.15.0</plexus.compiler.version>
    <maven.compiler.version>3.13.0</maven.compiler.version>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.version}</version>
        <configuration>
          <compilerId>eclipse</compilerId>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-api</artifactId>
            <version>${plexus.compiler.version}</version>
          </dependency>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-manager</artifactId>
            <version>${plexus.compiler.version}</version>
          </dependency>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-eclipse</artifactId>
            <version>${plexus.compiler.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <archive>
            <manifest>
              <mainClass>com.mycompany.app.App</mainClass>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
@itineric
Copy link

itineric commented Oct 21, 2024

same here, any clue ?

@pzygielo
Copy link
Contributor

Cannot reproduce.
With the pom as above I'm getting:

[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< com.mycompany.app:my-app >----------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ my-app ---
[INFO] Deleting /tmp/ec/target
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ my-app ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/ec/src/main/resources
[INFO] 
[INFO] --- compiler:3.13.0:compile (default-compile) @ my-app ---
[INFO] Recompiling the module because of changed source code.
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling with eclipse [debug target 21] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.109 s
[INFO] Finished at: 2024-10-21T14:07:35+02:00
[INFO] ------------------------------------------------------------------------

@pzygielo
Copy link
Contributor

Also - not sure what is 3.15.0 in the title for, as plexus-compiler is 2.15.0 and m-compiler-p is 3.13.0.

@itineric
Copy link

Problem starts with plexus-compiler-eclipse version 2.14.0

I used the given pom.xml and run mvn install -Dsisu.debug
I got this error:

TRACE: Sisu - Problem scanning: jar:file:/home/me/.m2/repository/org/codehaus/plexus/plexus-compiler-eclipse/2.15.0/plexus-compiler-eclipse-2.15.0.jar!/org/codehaus/plexus/compiler/eclipse/EclipseJavaCompiler.class
java.lang.IllegalArgumentException
	at org.eclipse.sisu.space.asm.ClassReader.<init>(ClassReader.java:170)
	at org.eclipse.sisu.space.asm.ClassReader.<init>(ClassReader.java:153)
	at org.eclipse.sisu.space.asm.ClassReader.<init>(ClassReader.java:424)
	at org.eclipse.sisu.space.SpaceScanner.accept(SpaceScanner.java:102)
	at org.eclipse.sisu.space.SpaceScanner.accept(SpaceScanner.java:78)
	at org.eclipse.sisu.space.SpaceModule.scanForElements(SpaceModule.java:168)
	at org.eclipse.sisu.space.SpaceModule.configure(SpaceModule.java:129)
	at org.eclipse.sisu.plexus.PlexusAnnotatedBeanModule.configure(PlexusAnnotatedBeanModule.java:102)
	at org.eclipse.sisu.plexus.PlexusBindingModule.configure(PlexusBindingModule.java:63)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
	at com.google.inject.spi.Elements.getElements(Elements.java:103)
	at com.google.inject.spi.Elements.getElements(Elements.java:96)
	at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:75)
	at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
	at com.google.inject.spi.Elements.getElements(Elements.java:103)
	at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
	at com.google.inject.Guice.createInjector(Guice.java:87)
	at com.google.inject.Guice.createInjector(Guice.java:69)
	at com.google.inject.Guice.createInjector(Guice.java:59)
	at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
	at org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:460)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.discoverPluginComponents(DefaultMavenPluginManager.java:436)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:415)
	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:374)
	at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:234)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
TRACE: Sisu - Add publisher: com.google.inject.internal.InjectorImpl@39e67516

Tried with several java 17 JDKs and maven from version 3.6.3 to 3.9.1, I always have the same error.

@itineric
Copy link

It works with maven 3.9.6+ as specified in 2.14.0 release notes.
Error should be a little more explicit.

@stormeuh: are you sure you are using the minimal required versions? see here: https://github.com/codehaus-plexus/plexus-compiler/releases/tag/plexus-compiler-2.14.0

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