• Register
search
Log In
0 votes
23 views

Problem :

Getting bellow error because of Maven Compiler Plugin
failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
6.9k points

1 Answer

0 votes

Solution :

I had same problem with maven in the past i had used bellow code to resolve the issue.

Solution for Jdk 9 and 10

<plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler.version}</version>
            <configuration>
                <source>${java.version}</source>
                <target>${java.version}</target>
                <debug>true</debug>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm</artifactId>
                    <version>6.2</version>
                </dependency>
            </dependencies>
        </plugin>

and make sure your maven is pointing to JDK 10 or 9. 

mvn -v

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:05-05:00)
Maven home: C:\devplay\apache-maven-3.5.3\bin\..
Java version: 10.0.1, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-10.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

36.1k points

Related questions

0 votes
0 answers 9 views
9 views
Problem: I have fundamental knowledge of Java and Maven. I am currently using the maven to create the dynamic webapp in a Eclipse IDE. I have already added some folders like src/test/java and src/test/resources. Also I have changed a library in a Java Build ... change version of project facet Dynamic Web Module to 3.1. I have already changed everything that would affect the changing I guess so.
asked Jun 16 Raphael Pacheco 560 points
0 votes
2 answers 356 views
356 views
Problem : Currently I am using the Android Studio 2.1 but when I try to run it the suddenly my App shows me the below error Message my Gradle Build saying the following Exception is: org.gradle. ... .execute(SkipEmptySourceFilesTaskExec uter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52)
asked Jan 31 jwilliam 3.9k points
1 vote
2 answers 31 views
31 views
Problem: Dear all, Right now I&rsquo;ve imported a maven project into my eclipse IDE and I changed my java path library to work on java 1.7 Suddenly, eclipse started showing an error but I&rsquo;ve got no errors in my files there. The error is &ldquo;java compiler level ... Project Problem (Java Version Mismatch) Please tell me how to resolve this error (I want to have my JRE version as 1.7 only).
asked Mar 22 Gavin 15k points
0 votes
2 answers 48 views
48 views
Problem : I want to compile a project in Eclipse using the m2eclipse. I set my JDK path in Eclipse as below: Windows-->preferences-->installed jres--> jdk1.7.xx path But this is showing me below error [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ ... BUILD FAILURE [INFO] ------------------------------------------------------------------------
asked Feb 4 jwilliam 3.9k points
0 votes
2 answers 129 views
129 views
Problem : I am stuck with following Maven issue. Error: could not find or load main class org.codehaus.plexus.classworlds.launcher.launcher My Maven was working fine till last week after that I do not know what went wrong with it now it gives me the error I have tried replacing ... Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
asked Nov 24, 2019 alecxe 7.5k points