maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject [maven-compiler-plugin] branch MCOMPILER-320 updated: [MCOMPILER-320] Move Java 10 config to specific profile
Date Sat, 07 Jul 2018 12:26:53 GMT
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MCOMPILER-320
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git


The following commit(s) were added to refs/heads/MCOMPILER-320 by this push:
     new c8f439b  [MCOMPILER-320] Move Java 10 config to specific profile
c8f439b is described below

commit c8f439bdc719b3f51d47b92c032adedf0bc767a0
Author: rfscholte <rfscholte@apache.org>
AuthorDate: Sat Jul 7 14:26:45 2018 +0200

    [MCOMPILER-320] Move Java 10 config to specific profile
---
 src/it/MCOMPILER-320_mrjar/lib/pom.xml | 53 ++++++++++++++++++++--------------
 1 file changed, 32 insertions(+), 21 deletions(-)

diff --git a/src/it/MCOMPILER-320_mrjar/lib/pom.xml b/src/it/MCOMPILER-320_mrjar/lib/pom.xml
index ac04fcc..8b1b0a4 100644
--- a/src/it/MCOMPILER-320_mrjar/lib/pom.xml
+++ b/src/it/MCOMPILER-320_mrjar/lib/pom.xml
@@ -52,9 +52,6 @@
             prevents sun.misc from being visible -->
           <execution>
             <id>default-compile</id>
-            <goals>
-              <goal>compile</goal>
-            </goals>
             <configuration>
               <release>8</release>
             </configuration>
@@ -63,7 +60,6 @@
             here but we also need to include our base classes in the compilation -->
           <execution>
             <id>compile-java9</id>
-            <phase>compile</phase>
             <goals>
               <goal>compile</goal>
             </goals>
@@ -71,28 +67,43 @@
               <release>9</release>
               <buildDirectory>${project.build.directory}</buildDirectory>
               <compileSourceRoots>${project.basedir}/src/main/java9</compileSourceRoots>
-              <!-- we can output directly into the appropriate target directory; 
-                this works out nicely -->
+              <!-- we can output directly into the appropriate target directory; this
works out nicely -->
               <outputDirectory>${project.build.directory}/classes/META-INF/versions/9</outputDirectory>
             </configuration>
           </execution>
-          <execution>
-            <id>compile-java10</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-            <configuration>
-              <release>10</release>
-              <buildDirectory>${project.build.directory}</buildDirectory>
-              <compileSourceRoots>${project.basedir}/src/main/java10</compileSourceRoots>
-              <!-- we can output directly into the appropriate target directory;
-                this works out nicely -->
-              <outputDirectory>${project.build.directory}/classes/META-INF/versions/10</outputDirectory>
-            </configuration>
-          </execution>
         </executions>
       </plugin>
     </plugins>
   </build>
+
+  <profiles>
+    <profile>
+      <activation>
+        <jdk>[10,)</jdk>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>compile-java10</id>
+                <goals>
+                  <goal>compile</goal>
+                </goals>
+                <configuration>
+                  <release>10</release>
+                  <buildDirectory>${project.build.directory}</buildDirectory>
+                  <compileSourceRoots>${project.basedir}/src/main/java10</compileSourceRoots>
+                  <!-- we can output directly into the appropriate target directory; this
works out nicely -->
+                  <outputDirectory>${project.build.directory}/classes/META-INF/versions/10</outputDirectory>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>


Mime
View raw message