You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/04/21 08:09:35 UTC

[2/2] camel git commit: Kotlin example to skip compile on java 9 as its not supported

Kotlin example to skip compile on java  9 as its not supported


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8f10e2b1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8f10e2b1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8f10e2b1

Branch: refs/heads/master
Commit: 8f10e2b1020b70c5a0c85804fbdaede38d1e441d
Parents: b2d6520
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Apr 21 10:08:26 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Apr 21 10:08:26 2017 +0200

----------------------------------------------------------------------
 examples/camel-example-kotlin/pom.xml | 80 +++++++++++++++++-------------
 1 file changed, 46 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8f10e2b1/examples/camel-example-kotlin/pom.xml
----------------------------------------------------------------------
diff --git a/examples/camel-example-kotlin/pom.xml b/examples/camel-example-kotlin/pom.xml
index c63ede9..347ee49 100644
--- a/examples/camel-example-kotlin/pom.xml
+++ b/examples/camel-example-kotlin/pom.xml
@@ -54,7 +54,7 @@
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-jetty</artifactId>
     </dependency>
-   
+
     <!-- logging -->
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
@@ -78,38 +78,6 @@
     <defaultGoal>install</defaultGoal>
 
     <plugins>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-resources-plugin</artifactId>
-        <version>${maven-resources-plugin-version}</version>
-        <configuration>
-          <encoding>UTF-8</encoding>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <artifactId>kotlin-maven-plugin</artifactId>
-        <groupId>org.jetbrains.kotlin</groupId>
-        <version>${kotlin.version}</version>
-        <executions>
-          <execution>
-            <id>compile</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>compile</goal>
-            </goals>
-          </execution>
-          <execution>
-            <id>test-compile</id>
-            <phase>test-compile</phase>
-            <goals>
-              <goal>test-compile</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
       <!-- Allows the example to be run via 'mvn compile exec:java' -->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
@@ -120,8 +88,52 @@
           <includePluginDependencies>false</includePluginDependencies>
         </configuration>
       </plugin>
-
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <!-- kotlin 1.1.x only supports Java 8 -->
+      <id>java8</id>
+      <activation>
+        <jdk>1.8</jdk>
+      </activation>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-resources-plugin</artifactId>
+            <version>${maven-resources-plugin-version}</version>
+            <configuration>
+              <encoding>UTF-8</encoding>
+            </configuration>
+          </plugin>
+          <plugin>
+            <artifactId>kotlin-maven-plugin</artifactId>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <version>${kotlin.version}</version>
+            <executions>
+              <execution>
+                <id>compile</id>
+                <phase>compile</phase>
+                <goals>
+                  <goal>compile</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>test-compile</id>
+                <phase>test-compile</phase>
+                <goals>
+                  <goal>test-compile</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+  </profiles>
+
 </project>