maven-compiler-plugin

Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven

情到浓时终转凉″ 提交于 2019-11-26 19:43:33
问题 I have a maven project forked and cloned from a git repo onto my eclipse. It is build on Java 8. The first thing i do is perform a mvn clean install But I get following failure message: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ Maven ---

Maven Java Version Configuration ignored by Eclipse/Idea

时光毁灭记忆、已成空白 提交于 2019-11-26 19:08:47
I have: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </pluginManagement> </build> Yet I have no problem declaring: public enum DirectoryWatchService { INSTANCE; private java.util.Optional<String> test; private java.nio.file.Files files; } Eclipse doesn't bother. IntelliJ neither. Even Maven does not bother. I can even do a mvn clean package . Builds the darn thing without any warning

Maven Out of Memory Build Failure

╄→гoц情女王★ 提交于 2019-11-26 15:18:46
问题 As of today, my maven compile fails. [INFO] [ERROR] Unexpected [INFO] java.lang.OutOfMemoryError: Java heap space [INFO] at java.util.Arrays.copyOfRange(Arrays.java:2694) [INFO] at java.lang.String.<init>(String.java:203) [INFO] at java.lang.String.substring(String.java:1877) [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) As of yesterday I had successfully run a maven compile. As of today, I just bumped up my heap to 3 GB . Also, I

What is the default annotation processors discovery process?

江枫思渺然 提交于 2019-11-26 13:52:14
问题 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 default annotation processors discovery process here? Is there any other way to set up annotation processors than this configuration tag? I've found that the Getting Started with the Annotation Processing Tool (apt) documentation mentions a default discovery

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)

浪子不回头ぞ 提交于 2019-11-26 10:08:39
问题 I am using Maven 3.0.5 and Spring Tool Source 3.2 with Maven plugin installed. When I try to do \'Run As---> Maven install\', I am getting the following error : [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Spring Social Twitter4J Sample 1.0.0 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 is

Maven - exclude folder from build

点点圈 提交于 2019-11-26 07:44:30
问题 Trying to exlcude a folder src/main/resources/scripts/ from my build but the following does not work: <build> <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>src/main/resources/scripts/</exclude> </excludes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <excludes> <exclude>src/main/resources/scripts/</exclude> </excludes> <source

--add-modules only on compilation [duplicate]

徘徊边缘 提交于 2019-11-26 07:41:15
问题 This question already has an answer here: How to express dependency in maven on java ee features for transition to Java 9? 4 answers I\'m building my project with maven and java-9. I\'ve added in my pom.xml file: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <compilerArgs> <arg>--add-modules</arg> <arg>java.xml.bind</arg> </compilerArgs> <

Maven Java Version Configuration ignored by Eclipse/Idea

故事扮演 提交于 2019-11-26 06:48:54
问题 I have: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </pluginManagement> </build> Yet I have no problem declaring: public enum DirectoryWatchService { INSTANCE; private java.util.Optional<String> test; private java.nio.file.Files files; } Eclipse doesn\'t bother. IntelliJ neither. Even

Specifying java version in maven - differences between properties and compiler plugin

故事扮演 提交于 2019-11-26 06:11:56
问题 I\'m not very experienced with maven and while experimenting with multi-module project I started wondering how can I specify java version for all my child modules in parent maven pom. Until today I was using just: <properties> <java.version>1.8</java.version> </properties> but when researching I found that you can also specify java version in maven compiler plugin, like that: <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8<