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
21
votes
1 answer

What is the default annotation processors discovery process?

The documentation of Maven Compiler plugin mentions the following: annotationProcessors: Names of annotation processors to run. Only applies to JDK 1.6+ If not set, the default annotation processors discovery process applies. What is the…
16
votes
7 answers

Plugin org.apache.maven.plugins:maven-compiler-plugin or one of its dependencies could not be resolved

I'm having some issues to configure properly my eclipse to work with maven. I create a new project, this one is correctly build with maven in command line (mvn install), but in Eclipse I got this error: CoreException: Could not get the value for…
user3275313
  • 186
  • 1
  • 1
  • 6
15
votes
2 answers

Unable to compile java project with maven

I'm trying to build IntelliJ Project with maven on java 16.0.1, but it can't compile my project, although IntelliJ is able to do it successfuly. Before that, I used maven to compile a java 15 project, but I decided to update everything to 16.0.1…
denh
  • 179
  • 1
  • 1
  • 8
15
votes
2 answers

release version 1.8 not supported

I have a project that is using Java 8. Up to now in the pom we specified the source and target version as 1.8: 1.8 1.8 We want to utilize the "-release"…
radlan
  • 2,393
  • 4
  • 33
  • 53
13
votes
11 answers

maven-compiler-plugin not found

I am learning Selenium and I would like to try add the maven-compiler-plugin to pom.xml and reimport maven settings. So I found this example to do it http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html…
Čamo
  • 3,863
  • 13
  • 62
  • 114
10
votes
4 answers

How to exclude error prone from being run on unit tests?

When maven-compiler-plugin:3.8.0:testCompile @ foo-child runs, thread dumps show errorprone is taking an extremely long time. I believe there is a bug with errorprone, but for now I'd rather just have errorprone not run on unit tests. I have a…
lf215
  • 1,185
  • 7
  • 41
  • 83
10
votes
3 answers

maven-compiler-plugin in parent pom

I am facing issue in setting java compiler version for the parent-child pom files. I added maven-compiler-plugin in child pom with version 1.7 and noticed that the java version changed from default 1.5 to 1.7 for child module and the parent project…
Johnyzhub
  • 382
  • 2
  • 4
  • 18
9
votes
1 answer

Maven Java Version Configuration ignored by Eclipse/Idea

I have: org.apache.maven.plugins maven-compiler-plugin 3.1
John Smith
  • 752
  • 9
  • 35
9
votes
2 answers

Java 8: What is the equivalent of "UseSplitVerifier"?

I'm using Maven 3.2.3 on Mac 10.9.5 and have this for my compiler plugin ... org.apache.maven.plugins
Dave A
  • 2,780
  • 9
  • 41
  • 60
9
votes
4 answers

Maven Pom.xml issue

I'm trying to make a spring mvc project using maven and getting following error in pom.xml: CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be resolved:…
user2501168
  • 91
  • 1
  • 1
  • 2
9
votes
1 answer

How to pass "-J" options to javac through Maven?

I have a Java project which is built using Maven. I would like to add options to the "javac" command line - particularly, I want to pass a few "-J" options. So normally I would do something like this:
Richard Downer
  • 772
  • 6
  • 16
8
votes
1 answer

How can I handle split packages in automatic modules?

I am currently testing to migrate an existing application to Jigsaw Modules. One of my modules uses ElasticSearch along with its Groovy Plugin. org.elasticsearch:elasticsearch org.elasticsearch.module:lang-groovy Unfortunately, they share a split…
peterp
  • 3,101
  • 3
  • 22
  • 37
8
votes
1 answer

java generics: compiler error not shown in eclipse

I have these classes: public class EntityDataModel { ... } public abstract class BarChartBean { protected EntityDataModel currentModel; ... } I can compile and run this…
Michele Mariotti
  • 7,372
  • 5
  • 41
  • 73
8
votes
1 answer

How to make maven-compiler-plugin not hide error source locations

Maybe there is a maven-compiler-plugin option for this, but I haven't found it. When javac is run directly and prints an error, after the first line of the message, it shows the affected line of source with a caret on the next line pointing to the…
Chapman Flack
  • 604
  • 5
  • 13
8
votes
2 answers

Getting "Expecting a stackmap frame at branch target" when running Maven integration testing

I’m using Maven 3.2.3 with this version of Java davea$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home When I run mvn clean install I get errors like the below in my integration tests…
Dave
  • 15,639
  • 133
  • 442
  • 830
1
2
3
19 20