camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/6] camel git commit: CAMEL-10922 replace jaxb2-maven-plugin with cxf-xjc-plugin on Java 9
Date Thu, 02 Mar 2017 17:46:38 GMT
CAMEL-10922 replace jaxb2-maven-plugin with cxf-xjc-plugin on Java 9


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

Branch: refs/heads/master
Commit: 2468ba87b3f86ebec2d663ebf75a2b215e516700
Parents: 67522e7
Author: jpoth <poth.john@gmail.com>
Authored: Thu Mar 2 14:58:19 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Mar 2 18:46:27 2017 +0100

----------------------------------------------------------------------
 components/camel-jmx/pom.xml  | 72 ++++++++++++++++++++++++++++-----
 components/camel-soap/pom.xml | 83 +++++++++++++++++++++++++++++++++++---
 parent/pom.xml                |  2 +
 3 files changed, 143 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2468ba87/components/camel-jmx/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jmx/pom.xml b/components/camel-jmx/pom.xml
index 0e22ee2..f50fe74 100644
--- a/components/camel-jmx/pom.xml
+++ b/components/camel-jmx/pom.xml
@@ -74,13 +74,67 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.jvnet.jaxb2.maven2</groupId>
-                <artifactId>maven-jaxb2-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
+    <profiles>
+        <profile>
+            <id>jdk8-build</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.jvnet.jaxb2.maven2</groupId>
+                        <artifactId>maven-jaxb2-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+           <!-- TODO: This is a temporary workaround until org.codehaus.mojo:jaxb2-maven-plugin
supports JDK9.
+           (https://github.com/mojohaus/jaxb2-maven-plugin/issues/43). We need to add the
plugin back
+           once we are sure it works on both JDK8 and JDK9.
+           See https://issues.apache.org/jira/browse/CAMEL-10141 for more info. -->
+            <id>jdk9-build</id>
+            <activation>
+                <jdk>9</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-xjc-plugin</artifactId>
+                        <version>${cxf-xjc-plugin-version}</version>
+                        <configuration>
+                            <extensions>
+                                <extension>net.java.dev.jaxb2-commons:jaxb-fluent-api:2.1.8</extension>
+                            </extensions>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-sources</id>
+                                <phase>generate-sources</phase>
+                                <configuration>
+                                    <fork>${cxf.codegenplugin.forkmode}</fork>
+                                    <additionalJvmArgs>${cxf.xjc.jvmArgs}</additionalJvmArgs>
+                                    <sourceRoot>${basedir}/target/xjc</sourceRoot>
+                                    <xsdOptions>
+                                        <xsdOption>
+                                            <xsd>${basedir}/src/main/resources/notifications.xsd</xsd>
+                                            <packagename>org.apache.camel.component.jmx.jaxb</packagename>
+                                            <extensionArgs>
+                                                <extensionArg>-Xfluent-api</extensionArg>
+                                            </extensionArgs>
+                                        </xsdOption>
+                                    </xsdOptions>
+                                </configuration>
+                                <goals>
+                                    <goal>xsdtojava</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/2468ba87/components/camel-soap/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-soap/pom.xml b/components/camel-soap/pom.xml
index 0ff0ff9..89bc3b1 100644
--- a/components/camel-soap/pom.xml
+++ b/components/camel-soap/pom.xml
@@ -124,11 +124,6 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.jvnet.jaxb2.maven2</groupId>
-                <artifactId>maven-jaxb2-plugin</artifactId>
-            </plugin>
-            
-            <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-xjc-plugin</artifactId>
                 <version>${cxf-xjc-plugin-version}</version>
@@ -140,6 +135,8 @@
                             <goal>xsdtojava-tests</goal>
                         </goals>
                         <configuration>
+                            <fork>${cxf.codegenplugin.forkmode}</fork>
+                            <additionalJvmArgs>${cxf.xjc.jvmArgs}</additionalJvmArgs>
                             <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
                             <xsdOptions>
                                 <xsdOption>
@@ -173,6 +170,8 @@
                         <id>generate-sources-wsdl</id>
                         <phase>generate-sources</phase>
                         <configuration>
+                            <fork>${cxf.codegenplugin.forkmode}</fork>
+                            <additionalJvmArgs>${cxf.codegen.jvmArgs}</additionalJvmArgs>
                             <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
                             <defaultOptions>
                                 <frontEnd>jaxws21</frontEnd>
@@ -221,4 +220,78 @@
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>jdk8-build</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.jvnet.jaxb2.maven2</groupId>
+                        <artifactId>maven-jaxb2-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <!-- TODO: This is a temporary workaround until org.codehaus.mojo:jaxb2-maven-plugin
supports JDK9.
+            (https://github.com/mojohaus/jaxb2-maven-plugin/issues/43). We need to add the
plugin back
+            once we are sure it works on both JDK8 and JDK9.
+            See https://issues.apache.org/jira/browse/CAMEL-10141 for more info. -->
+            <id>jdk9-build</id>
+            <activation>
+                <jdk>9</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-xjc-plugin</artifactId>
+                        <version>${cxf-xjc-plugin-version}</version>
+                        <configuration>
+                            <extensions>
+                                <extension>net.java.dev.jaxb2-commons:jaxb-fluent-api:2.1.8</extension>
+                            </extensions>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-sources</id>
+                                <phase>generate-sources</phase>
+                                <configuration>
+                                    <fork>${cxf.codegenplugin.forkmode}</fork>
+                                    <additionalJvmArgs>${cxf.xjc.jvmArgs}</additionalJvmArgs>
+                                    <sourceRoot>${basedir}/target/xjc</sourceRoot>
+                                    <xsdOptions>
+                                        <xsdOption>
+                                            <xsd>${basedir}/src/main/resources/soap.xsd</xsd>
+                                            <extensionArgs>
+                                                <extensionArg>-Xfluent-api</extensionArg>
+                                            </extensionArgs>
+                                        </xsdOption>
+                                        <xsdOption>
+                                            <xsd>${basedir}/src/main/resources/soap12.xsd</xsd>
+                                            <extensionArgs>
+                                                <extensionArg>-Xfluent-api</extensionArg>
+                                            </extensionArgs>
+                                        </xsdOption>
+                                        <xsdOption>
+                                            <xsd>${basedir}/src/main/resources/xml.xsd</xsd>
+                                            <extensionArgs>
+                                                <extensionArg>-Xfluent-api</extensionArg>
+                                            </extensionArgs>
+                                        </xsdOption>
+                                    </xsdOptions>
+                                </configuration>
+                                <goals>
+                                    <goal>xsdtojava</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/2468ba87/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 814b674..f465d16 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -33,6 +33,7 @@
     <compiler.fork>true</compiler.fork>
     <cxf.codegenplugin.forkmode>once</cxf.codegenplugin.forkmode>
     <cxf.codegen.jvmArgs/>
+    <cxf.xjc.jvmArgs/>
     <!-- dependency versions -->
     <abdera-version>1.1.3</abdera-version>
     <!-- Note that activemq dependency is only used for testing! -->
@@ -5109,6 +5110,7 @@
       </activation>
       <properties>
         <cxf.codegen.jvmArgs>--add-modules java.activation,java.xml.bind,java.xml.ws
--add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED
--add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.marshaller=ALL-UNNAMED
--add-opens java.xml.ws/javax.xml.ws.wsaddressing=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED</cxf.codegen.jvmArgs>
+        <cxf.xjc.jvmArgs>--add-modules java.activation,java.xml.bind,java.xml.ws --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED
--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED
--add-exports=java.xml.bind/com.sun.xml.internal.bind.marshaller=ALL-UNNAMED --add-opens java.xml.ws/javax.xml.ws.wsaddressing=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens
java.base/java.util.concurrent=ALL-UNNAMED</cxf.xjc.jvmArgs>
         <cxf.codegenplugin.forkmode>true</cxf.codegenplugin.forkmode>
       </properties>
       <build>


Mime
View raw message