Repository: camel Updated Branches: refs/heads/master 01ef7a2f8 -> 9c50fbac9
CAMEL-7314: Support to build the source with JDK8 Update JAXB to 2.2.7, Scala to 2.11, and disable building components that don't support Java 8 yet. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9c50fbac Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9c50fbac Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9c50fbac Branch: refs/heads/master Commit: 9c50fbac946c3143e885e7d91b937557055eae6f Parents: 01ef7a2 Author: Hiram Chirino <hi...@hiramchirino.com> Authored: Wed May 7 23:05:12 2014 -0400 Committer: Hiram Chirino <hi...@hiramchirino.com> Committed: Wed May 14 10:47:35 2014 -0400 ---------------------------------------------------------------------- .../src/main/resources/notice-supplements.xml | 2 +- components/camel-blueprint/pom.xml | 5 +++- components/camel-scala/pom.xml | 2 +- .../scala/converter/ScalaCollections.scala | 6 ++--- .../camel/scala/converter/ConverterSpec.scala | 4 +-- .../org/apache/camel/scala/test/Animal.scala | 2 +- .../org/apache/camel/scala/test/Person.scala | 2 +- components/camel-spring/pom.xml | 8 ++++-- components/camel-web/pom.xml | 28 ++++++++++---------- components/pom.xml | 28 +++++++++++++++++--- parent/pom.xml | 16 ++++++----- pom.xml | 28 +++++++++++++++++--- 12 files changed, 92 insertions(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/buildingtools/src/main/resources/notice-supplements.xml ---------------------------------------------------------------------- diff --git a/buildingtools/src/main/resources/notice-supplements.xml b/buildingtools/src/main/resources/notice-supplements.xml index 6da46a0..fd1af53 100644 --- a/buildingtools/src/main/resources/notice-supplements.xml +++ b/buildingtools/src/main/resources/notice-supplements.xml @@ -20,7 +20,7 @@ <supplement> <project> <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-xjc</artifactId> + <artifactId>jaxb-jxc</artifactId> <name>Sun JAXB Reference Implementation Tools</name> <organization> <name>Sun Microsystems</name> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-blueprint/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-blueprint/pom.xml b/components/camel-blueprint/pom.xml index ce9c89b..a37bf98 100644 --- a/components/camel-blueprint/pom.xml +++ b/components/camel-blueprint/pom.xml @@ -267,7 +267,7 @@ <executions> <execution> <id>process-sources</id> - <phase>process-sources</phase> + <phase>process-classes</phase> <configuration> <target> <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask" classpathref="maven.plugin.classpath" /> @@ -301,6 +301,9 @@ <classpath refid="maven.compile.classpath" /> </schemagen> <replace file="${project.build.directory}/schema/camel-blueprint.xsd" token="http://camel.apache.org/schema/spring" value="http://camel.apache.org/schema/blueprint" /> + <copy todir="${project.build.directory}/classes"> + <fileset dir="${project.build.directory}/schema"/> + </copy> </target> </configuration> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-scala/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-scala/pom.xml b/components/camel-scala/pom.xml index 2d242ff..434c802 100644 --- a/components/camel-scala/pom.xml +++ b/components/camel-scala/pom.xml @@ -51,7 +51,7 @@ <!-- test dependencies --> <dependency> <groupId>org.scalatest</groupId> - <artifactId>scalatest_2.10</artifactId> + <artifactId>scalatest_2.11</artifactId> <version>${scalatest-version}</version> <scope>test</scope> <!-- exclude scala compiler so we can control which version we are using --> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-scala/src/main/scala/org/apache/camel/scala/converter/ScalaCollections.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/converter/ScalaCollections.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/converter/ScalaCollections.scala index 0f57b2b..8b84f21 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/converter/ScalaCollections.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/converter/ScalaCollections.scala @@ -72,7 +72,7 @@ class ScalaImmutableCollections { @Converter class ScalaMutableCollections { - import collection.mutable.{ConcurrentMap, Buffer, Map, Seq, Set} + import collection.mutable.{Buffer, Map, Seq, Set} import java.util.{Dictionary => JDictionary, List => JList, Map => JMap, Set => JSet} import java.util.concurrent.{ConcurrentMap => JConcurrentMap} @@ -101,10 +101,10 @@ class ScalaMutableCollections { def toScalaMap[A,B](map: JMap[A,B]): Map[A,B] = map @Converter - def toJavaConcurrentMap[A,B](map: ConcurrentMap[A,B]): JConcurrentMap[A,B] = map + def toJavaConcurrentMap[A,B](map: scala.collection.concurrent.Map[A,B]): JConcurrentMap[A,B] = map @Converter - def toScalaConcurrentMap[A,B](map: JConcurrentMap[A,B]): ConcurrentMap[A,B] = map + def toScalaConcurrentMap[A,B](map: JConcurrentMap[A,B]): scala.collection.concurrent.Map[A,B] = map @Converter def toJavaList[T](seq: Seq[T]): JList[T] = seq http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ConverterSpec.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ConverterSpec.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ConverterSpec.scala index e3134bb..37fafc8 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ConverterSpec.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/converter/ConverterSpec.scala @@ -94,7 +94,7 @@ class ConverterSpec extends FunSpec with CamelSpec with MustMatchers { } describe("mutable collections converter") { - import collection.mutable.{ConcurrentMap, Buffer, Map, Seq, Set} + import collection.mutable.{Buffer, Map, Seq, Set} import java.util.{Dictionary => JDictionary, Hashtable => JHashtable, Collections, List => JList, Map => JMap, Set => JSet} import java.util.concurrent.{ConcurrentHashMap => JConcurrentHashMap} @@ -129,7 +129,7 @@ class ConverterSpec extends FunSpec with CamelSpec with MustMatchers { } it("must convert java concurrent map") { val m = new JConcurrentHashMap[String,Int](Collections.singletonMap("a", 1)) - to[ConcurrentMap[String,Int]](m) must be('defined) + to[scala.collection.concurrent.Map[String,Int]](m) must be('defined) } it("must convert scala seq") { val s = Seq(1) http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Animal.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Animal.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Animal.scala index e043b8e..fc69d05 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Animal.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Animal.scala @@ -16,7 +16,7 @@ */ package org.apache.camel.scala.test -import _root_.scala.reflect.BeanProperty +import _root_.scala.beans.BeanProperty /** * Just a simple Animal test class http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Person.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Person.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Person.scala index 63f9e69..a3c4a0e 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Person.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/test/Person.scala @@ -16,7 +16,7 @@ */ package org.apache.camel.scala.test -import _root_.scala.reflect.BeanProperty +import _root_.scala.beans.BeanProperty /** * Just a simple Person test class http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-spring/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-spring/pom.xml b/components/camel-spring/pom.xml index 213ce77..d6eb313 100644 --- a/components/camel-spring/pom.xml +++ b/components/camel-spring/pom.xml @@ -254,7 +254,7 @@ </execution> <execution> <id>generate-sources</id> - <phase>generate-sources</phase> + <phase>process-classes</phase> <configuration> <target> <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask" classpathref="maven.plugin.classpath" /> @@ -308,6 +308,10 @@ <copy file="${project.build.directory}/schema/camel-spring.xsd" tofile="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" /> <replace file="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" token="http://camel.apache.org/schema/spring" value="http://camel.apache.org/schema/spring/v${camel.schema.version}" /> + <copy todir="${project.build.directory}/classes"> + <fileset dir="${project.build.directory}/schema"/> + </copy> + </target> </configuration> <goals> @@ -321,7 +325,7 @@ <artifactId>properties-maven-plugin</artifactId> <executions> <execution> - <phase>generate-sources</phase> + <phase>process-classes</phase> <goals> <goal>read-project-properties</goal> </goals> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/camel-web/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-web/pom.xml b/components/camel-web/pom.xml index d41e41f..0ac0b3b 100644 --- a/components/camel-web/pom.xml +++ b/components/camel-web/pom.xml @@ -32,7 +32,7 @@ <properties> <camel.osgi.export.pkg>org.apache.camel.web.*</camel.osgi.export.pkg> <jaxb-api-version>2.1</jaxb-api-version> - <scalate-version>1.6.1</scalate-version> + <scalate-version>1.7.0</scalate-version> <jersey-version>1.17.1</jersey-version> <jetty-port>8080</jetty-port> <webdriver-version>0.9.7376</webdriver-version> @@ -130,8 +130,8 @@ <optional>true</optional> </dependency> <dependency> - <groupId>org.fusesource.scalate</groupId> - <artifactId>scalate-core_2.10</artifactId> + <groupId>org.scalatra.scalate</groupId> + <artifactId>scalate-core_2.11</artifactId> <version>${scalate-version}</version> </dependency> @@ -230,8 +230,8 @@ </plugin> <plugin> - <groupId>org.fusesource.scalate</groupId> - <artifactId>maven-scalate-plugin_2.10</artifactId> + <groupId>org.scalatra.scalate</groupId> + <artifactId>maven-scalate-plugin_2.11</artifactId> <version>${scalate-version}</version> <executions> <execution> @@ -373,7 +373,8 @@ </additionalparam> </configuration> </plugin> - +<!-- Disable wadl generation for now, fails on Java 8--> +<!-- <plugin> <groupId>com.sun.jersey.contribs</groupId> <artifactId>maven-wadl-plugin</artifactId> @@ -384,11 +385,6 @@ <goals> <goal>generate</goal> </goals> - <!-- - TODO - for some reason using a compile phase with maven 2.2.1 and jetty:run causes an odd classloader bug - - <phase>compile</phase> - --> <phase>package</phase> </execution> </executions> @@ -431,8 +427,8 @@ </wadlGeneratorDescription> </wadlGenerators> </configuration> - - </plugin> + </plugin> +--> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> @@ -461,7 +457,7 @@ <executions> <execution> <id>process-sources</id> - <phase>process-sources</phase> + <phase>process-classes</phase> <configuration> <target> <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask" classpathref="maven.plugin.classpath" /> @@ -485,6 +481,10 @@ <classpath refid="maven.compile.classpath" /> </schemagen> + <copy todir="${project.build.directory}/classes"> + <fileset dir="${project.build.directory}/schema"/> + </copy> + </target> </configuration> <goals> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/components/pom.xml ---------------------------------------------------------------------- diff --git a/components/pom.xml b/components/pom.xml index 942218f..a8d3109 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -49,7 +49,6 @@ <module>camel-jetty</module> <module>camel-cxf</module> <module>camel-cxf-transport</module> - <module>camel-web</module> <module>camel-web-standalone</module> <module>camel-jms</module> @@ -112,7 +111,6 @@ <module>camel-jcr</module> <module>camel-jdbc</module> <module>camel-jgroups</module> - <module>camel-jibx</module> <module>camel-jing</module> <module>camel-jmx</module> <module>camel-josql</module> @@ -190,6 +188,7 @@ <module>camel-velocity</module> <module>camel-vertx</module> <module>camel-weather</module> + <module>camel-web</module> <module>camel-websocket</module> <module>camel-xmlbeans</module> <module>camel-xmljson</module> @@ -260,11 +259,34 @@ </reporting> <profiles> + + <!-- Some components don't support Java 8 Yet. --> + <profile> + <id>jdk-7</id> + <modules> + <module>camel-jibx</module> + </modules> + <activation> + <jdk>1.7</jdk> + </activation> + </profile> + <profile> + <id>jdk-6</id> + <modules> + <module>camel-jibx</module> + </modules> + <activation> + <jdk>1.6</jdk> + </activation> + </profile> + <!-- enables the APT dependency so that it can be disabled in IDE builds --> <profile> <id>apt</id> <activation> - <activeByDefault>true</activeByDefault> + <property> + <name>!dummy.prop.to.keep.this.profile.active.even.when.other.profiles.are.active</name> + </property> </activation> <dependencies> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 82b928a..c32b73c 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -347,11 +347,11 @@ <rome-version>1.0</rome-version> <rxjava-version>0.17.5</rxjava-version> <saaj-impl-version>1.3.2_2</saaj-impl-version> - <saxon-bundle-version>9.5.1-4_1</saxon-bundle-version> - <saxon-version>9.5.1-4</saxon-version> - <scala-version>2.10.4</scala-version> + <saxon-bundle-version>9.5.1-5_1</saxon-bundle-version> + <saxon-version>9.5.1-5</saxon-version> + <scala-version>2.11.0</scala-version> <scala-maven-plugin-version>3.1.6</scala-maven-plugin-version> - <scalatest-version>2.0</scalatest-version> + <scalatest-version>2.1.5</scalatest-version> <scribe-version>1.3.5</scribe-version> <scriptengines-version>1.1</scriptengines-version> <serp-bundle-version>1.14.1_1</serp-bundle-version> @@ -1541,7 +1541,7 @@ </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-xjc</artifactId> + <artifactId>jaxb-jxc</artifactId> <version>${jaxb-version}</version> </dependency> <dependency> @@ -2231,7 +2231,7 @@ </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-xjc</artifactId> + <artifactId>jaxb-jxc</artifactId> <version>${jaxb-version}</version> </dependency> <dependency> @@ -2628,6 +2628,8 @@ <failIfNoTests>false</failIfNoTests> <runOrder>alphabetical</runOrder> <systemPropertyVariables> + <javax.xml.accessExternalSchema>file,http</javax.xml.accessExternalSchema> + <javax.xml.accessExternalDTD>file,http</javax.xml.accessExternalDTD> <derby.stream.error.file>target/derby.log</derby.stream.error.file> <java.awt.headless>${java.awt.headless}</java.awt.headless> <java.util.logging.config.file>${basedir}/target/test-classes/logging.properties</java.util.logging.config.file> @@ -2788,7 +2790,7 @@ </activation> <properties> - <jaxb-version>2.2.6</jaxb-version> + <jaxb-version>2.2.7</jaxb-version> </properties> <dependencies> http://git-wip-us.apache.org/repos/asf/camel/blob/9c50fbac/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 186d307..adb94e2 100755 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ <maven-compiler-plugin-version>2.5.1</maven-compiler-plugin-version> <!-- eclipse plugin need the jaxb in this pom.xml file --> - <jaxb-version>2.1.13</jaxb-version> + <jaxb-version>2.2.7</jaxb-version> </properties> <mailingLists> @@ -135,7 +135,29 @@ <build> <defaultGoal>install</defaultGoal> - + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>properties-maven-plugin</artifactId> + <version>1.0-alpha-2</version> + <executions> + <execution> + <phase>initialize</phase> + <goals> + <goal>set-system-properties</goal> + </goals> + <configuration> + <properties> + <property> + <name>javax.xml.accessExternalSchema</name> + <value>file,http</value> + </property> + </properties> + </configuration> + </execution> + </executions> + </plugin> + </plugins> <pluginManagement> <plugins> <plugin> @@ -382,7 +404,7 @@ </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-xjc</artifactId> + <artifactId>jaxb-jxc</artifactId> <version>${jaxb-version}</version> </dependency> <dependency>