Questions tagged [maven-compiler-plugin]

The Maven Compiler Plugin is used to compile the sources of your project. The default compiler is javac and is used to compile Java sources.

The Maven Compiler Plugin is used to compile the sources of your project.

The plugin always has a binding to the compile phase to compile application sources and to the test-compile phase to compile test sources.

Check the official usage page for a first look at this plugin.

More Info

293 questions
5
votes
0 answers

maven compiler plugin error at org.codehaus.plexus.archiver.AbstractArchiver

I try to create a jar of the repo https://github.com/olehmberg/WebTableStitching using the maven compiler plugin but I get following error: Exception in thread "main" java.lang.StackOverflowError at…
OBlue
  • 51
  • 1
  • 4
5
votes
2 answers

JHipster5 project with JPA static metamodel on Java 10

I have been trying to upgrade my JHipster 5 application to use Java 10 but I can't get it to compile and process JPA static metamodels with Maven. Apparently maven-compiler-plugin is not triggering hibernate-jpamodelgen in order to generate the JPA…
djeison
  • 490
  • 2
  • 5
  • 20
5
votes
2 answers

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK in IntelliJ

I tried mvn clean install in Intellij. But it raise this error. mvn -version command works fine in the terminal of intellij.
Lahiru Gamage
  • 849
  • 5
  • 14
  • 27
5
votes
2 answers

Maven compiler plugin configured with Java 7 but still compiles Java 8 code

In my project, we are going to use Java 7 for maven-compiler-plugin and we assume that after Maven compile, all the code which is using Java 8 should not compile successfully. However, in my case, there is a file using Arrays.stream(T[] array)…
TryMyBest
  • 333
  • 5
  • 11
5
votes
2 answers

Use Maven Compiler Plugin with Eclipse Compiler and Lombok

Is there a way to compile lomboked code in ECJ without setting lombok as javaaagent for the maven process? The snippet below only works if I run mvn with lombok as agent ecj
Jakub Bochenski
  • 3,113
  • 4
  • 33
  • 61
5
votes
3 answers

IntelliJ 14 maven compilation issues

I have updated to IntelliJ 14.0.1 today. I imported the Maven project I was working on IntelliJ 13.1 and although the project is imported successfully the dependencies cannot be found when I try to Make or Compile the project from IntelliJ. I need…
5
votes
3 answers

How to permanently exclude one test class in a Maven build

I'm trying to exclude a single test from my maven build (I don't want the test to be compiled or executed). The following doesn't work: org.apache.maven.plugins
Konstantin Weitz
  • 6,180
  • 8
  • 26
  • 43
5
votes
2 answers

Maven compilation failure when switching on enum

I am mavenifying (is that a word?) a project whose build process has been so far based entirely on ant/shell scripts. Consider the following enum public enum ResourceType { A, B; } The following bean: public ResourceTypeOwner { //set get…
dkateros
  • 1,574
  • 10
  • 14
4
votes
3 answers

Unable to resolve FragmentActivity running on Android 2.3.3 with compatibility package v4

I'm building a simple hello world app to learn about the Android Compatibility Package. I'm able to get the app to run on the 3.2 emulator but when I run it on a 2.3.3 emulator I get 10-12 11:36:14.474: WARN/dalvikvm(469): Unable to resolve…
4
votes
1 answer

how to get maven to run all tests but still fail build on compile error

Suppose I have a multi-module maven project. I want to run it in such a way that: If a test fails, I still want to compile and test the next module. This sounds like a job for --fail-never, but see below. If there are test failures, I don't…
Mark VY
  • 1,489
  • 16
  • 31
4
votes
3 answers

maven-compiler-plugin:3.8.1:compile throwing NullPointerException

I am trying to set up a maven project, and while doing so: The command I ran: mvn clean install Error received: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project pfm: Fatal…
4
votes
0 answers

Specific classes not compiled with maven compiler plugin

I have to convert an old massive project from Ant to Maven. The project consists in various sub-projects (web applications) but the source code of all these projects are under various src folders. In order to create the war files we have a dist…
ultracode
  • 107
  • 1
  • 8
4
votes
2 answers

How to tell compiler to use openjdk 11 via pom.xml

How to configure OpenJDK 11 in pom file. 3.8.0 11 11
R K
  • 43
  • 1
  • 1
  • 3
4
votes
4 answers

Failed to execute goal maven-compiler-plugin 3.8.0 - org/codehaus/plexus/compiler/manager/NoSuchCompilerException

i am using Maven 3.5.3 with JDK 1.8. When i try to compile from cmd my project with mvn clean compile, the console return the following errors: [INFO] Scanning for projects... [INFO] [INFO] ------------------< com.dadopay:DadopayDAOAggregator…
el fuser
  • 606
  • 1
  • 6
  • 10
4
votes
2 answers

How to use JUnit 5 and Java 10 in Maven with the confilcting maven-surefire-plugin and org.ow2.asm

In my project I try to use Java 10 with Junit 5, but something interesting occurs. Background To make maven work well under Java 10, we need to change the asm library of maven-compiler-plugin to org.ow2.asm. And to make Junit 5 work well under Java…