Added Maven profile to define the build toolchain
authorIgnasi Barrera <nacx@apache.org>
Thu, 30 Nov 2017 10:07:50 +0000 (11:07 +0100)
committerIgnasi Barrera <nacx@apache.org>
Thu, 30 Nov 2017 10:09:32 +0000 (11:09 +0100)
pom.xml

diff --git a/pom.xml b/pom.xml
index 58a7375..38b094c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -183,6 +183,7 @@ limitations under the License.
   </modules>
 
   <properties>
+    <jdk.version>1.7</jdk.version>
     <aopalliance.bundle.version>1.0_5</aopalliance.bundle.version>
     <bcprov.version>1.51</bcprov.version>
     <easymock.version>3.0</easymock.version>
@@ -600,4 +601,32 @@ limitations under the License.
     </repository>
   </repositories>
 
+  <profiles>
+    <profile>
+      <id>jenkins</id>
+      <build>
+        <plugins>
+         <!-- Make sure jclouds is built with the right JDK -->
+         <plugin>
+           <artifactId>maven-toolchains-plugin</artifactId>
+           <version>1.1</version>
+           <executions>
+             <execution>
+               <goals>
+                 <goal>toolchain</goal>
+               </goals>
+             </execution>
+           </executions>
+           <configuration>
+             <toolchains>
+                <jdk>
+                 <version>${jdk.version}</version>
+               </jdk>
+             </toolchains>
+           </configuration>
+         </plugin>
+       </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>