0

Im trying compile the project but this error showing:

java.lang.NoClassDefFoundError: org/codehaus/plexus/util/Scanner

Using Java 11 and Maven v3.8.1 by Intellij

I set:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
            <dependencies>
            <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-utils</artifactId>
                <version>3.0.15</version>
            </dependency>
        </dependencies>
        </plugin>

But not working.

I tried with version maven compiler more recent too

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.11.0</version>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
        </plugin>
  • Why have you added the plexus-utils as a dependency for the plugin? Also I would suggest to use most recent version of maven-compiler-plugin (3.11.0) See https://maven.apache.org/plugins/ ... and remove the supplemental dependency ...Furthermore I would suggest to use most recent version of Maven (https://maven.apache.org/download.cgi) – khmarbaise Jul 21 '23 at 19:32
  • This looks like you might have stumbled upon a workaround to an older problem. Are you sure you even need this dependency? – Scott Kurz Jul 21 '23 at 19:34
  • I tried with this version of maven compiler and deleted plugin, but still show this error – Ariane Leite Jul 21 '23 at 19:38

0 Answers0