Skip to content
Snippets Groups Projects
Commit 74cda94c authored by Grzegorz Slowikowski's avatar Grzegorz Slowikowski Committed by Sean Owen
Browse files

[SPARK-21592][BUILD] Skip maven-compiler-plugin main and test compilations in Maven build

`scala-maven-plugin` in `incremental` mode compiles `Scala` and `Java` classes. There is no need to execute `maven-compiler-plugin` goals to compile (in fact recompile) `Java`.

This change reduces compilation time (over 10% on my machine).

Author: Grzegorz Slowikowski <gslowikowski@gmail.com>

Closes #18750 from gslowikowski/remove-redundant-compilation-from-maven.
parent 6735433c
No related branches found
No related tags found
No related merge requests found
...@@ -69,17 +69,6 @@ ...@@ -69,17 +69,6 @@
</javacArgs> </javacArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<compilerArgs combine.children="append">
<!-- This option is needed to suppress warnings from sun.misc.Unsafe usage -->
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
......
...@@ -106,17 +106,6 @@ ...@@ -106,17 +106,6 @@
</javacArgs> </javacArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<compilerArgs combine.children="append">
<!-- This option is needed to suppress warnings from sun.misc.Unsafe usage -->
<arg>-XDignore.symbol.file</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
......
...@@ -1972,14 +1972,12 @@ ...@@ -1972,14 +1972,12 @@
</execution> </execution>
<execution> <execution>
<id>scala-compile-first</id> <id>scala-compile-first</id>
<phase>process-resources</phase>
<goals> <goals>
<goal>compile</goal> <goal>compile</goal>
</goals> </goals>
</execution> </execution>
<execution> <execution>
<id>scala-test-compile-first</id> <id>scala-test-compile-first</id>
<phase>process-test-resources</phase>
<goals> <goals>
<goal>testCompile</goal> <goal>testCompile</goal>
</goals> </goals>
...@@ -2022,14 +2020,8 @@ ...@@ -2022,14 +2020,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version> <version>3.6.1</version>
<configuration> <configuration>
<source>${java.version}</source> <skipMain>true</skipMain> <!-- skip compile -->
<target>${java.version}</target> <skip>true</skip> <!-- skip testCompile -->
<encoding>UTF-8</encoding>
<maxmem>1024m</maxmem>
<fork>true</fork>
<compilerArgs>
<arg>-Xlint:all,-serial,-path</arg>
</compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment