You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2019/09/03 14:41:37 UTC

[camel] branch master updated (3c7cf69 -> 03715f2)

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 3c7cf69  Upgrade Reactor Core to version 3.2.12.RELEASE
     new c60ed5d  CAMEL-13900: Use camel-package-maven-plugin to generate JAXB indexes
     new 03715f2  Fix CS for camel-package-maven-plugin

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-cdi/pom.xml                       | 38 ++++++++++++++++++++++
 .../resources/org/apache/camel/cdi/xml/jaxb.index  | 28 ----------------
 components/camel-jmx/pom.xml                       | 38 ++++++++++++++++++++++
 .../org/apache/camel/component/jmx/jaxb/jaxb.index | 24 --------------
 .../resources/org/apache/camel/core/xml/jaxb.index | 21 ------------
 .../org/apache/camel/core/xml/util/jsse/jaxb.index | 27 ---------------
 .../camel/maven/packaging/EndpointDslMojo.java     |  4 +--
 .../camel/maven/packaging/PackageJaxbMojo.java     | 12 ++-----
 .../camel/maven/packaging/PackageLegalMojo.java    |  6 ----
 9 files changed, 80 insertions(+), 118 deletions(-)
 delete mode 100644 components/camel-cdi/src/main/resources/org/apache/camel/cdi/xml/jaxb.index
 delete mode 100644 components/camel-jmx/src/main/resources/org/apache/camel/component/jmx/jaxb/jaxb.index
 delete mode 100644 core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/jaxb.index
 delete mode 100644 core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/util/jsse/jaxb.index


[camel] 02/02: Fix CS for camel-package-maven-plugin

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 03715f2e44020ee0ee84da7ad024308131671989
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Sep 3 12:41:04 2019 +0100

    Fix CS for camel-package-maven-plugin
---
 .../java/org/apache/camel/maven/packaging/EndpointDslMojo.java   | 4 ++--
 .../java/org/apache/camel/maven/packaging/PackageJaxbMojo.java   | 9 ---------
 .../java/org/apache/camel/maven/packaging/PackageLegalMojo.java  | 6 ------
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
index 350a584..8a56ee4 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
@@ -28,13 +28,11 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.function.Function;
 import java.util.function.Supplier;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import javax.annotation.Generated;
 
@@ -470,6 +468,8 @@ public class EndpointDslMojo extends AbstractMojo {
             case "rest":
                 s = "restEndpoint";
                 break;
+            default:
+                break;
             }
         }
         return s;
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
index a1d1dca..413d1c1 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
@@ -20,17 +20,14 @@ import java.io.File;
 import java.io.IOError;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Writer;
 import java.net.URI;
 import java.nio.file.FileSystemAlreadyExistsException;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.nio.file.StandardOpenOption;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -41,23 +38,17 @@ import javax.xml.bind.annotation.XmlEnum;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectHelper;
 import org.jboss.jandex.AnnotationInstance;
 import org.jboss.jandex.AnnotationTarget;
 import org.jboss.jandex.ClassInfo;
 import org.jboss.jandex.DotName;
 import org.jboss.jandex.IndexView;
 import org.jboss.jandex.Indexer;
-import org.sonatype.plexus.build.incremental.BuildContext;
 
 /**
  * Analyses the Camel plugins in a project and generates extra descriptor information for easier auto-discovery in Camel.
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLegalMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLegalMojo.java
index 5560630..2578c82 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLegalMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLegalMojo.java
@@ -19,21 +19,15 @@ package org.apache.camel.maven.packaging;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.Writer;
 import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
 import java.nio.file.Path;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectHelper;
 
 /**
  * Analyses the Camel plugins in a project and generates legal files.


[camel] 01/02: CAMEL-13900: Use camel-package-maven-plugin to generate JAXB indexes

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c60ed5d6a938bea37c7ffc66f090e23e322e6391
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Sep 2 15:03:59 2019 +0100

    CAMEL-13900: Use camel-package-maven-plugin to generate JAXB indexes
---
 components/camel-cdi/pom.xml                       | 38 ++++++++++++++++++++++
 .../resources/org/apache/camel/cdi/xml/jaxb.index  | 28 ----------------
 components/camel-jmx/pom.xml                       | 38 ++++++++++++++++++++++
 .../org/apache/camel/component/jmx/jaxb/jaxb.index | 24 --------------
 .../resources/org/apache/camel/core/xml/jaxb.index | 21 ------------
 .../org/apache/camel/core/xml/util/jsse/jaxb.index | 27 ---------------
 .../camel/maven/packaging/PackageJaxbMojo.java     |  3 +-
 7 files changed, 78 insertions(+), 101 deletions(-)

diff --git a/components/camel-cdi/pom.xml b/components/camel-cdi/pom.xml
index 217adea..de76d82 100644
--- a/components/camel-cdi/pom.xml
+++ b/components/camel-cdi/pom.xml
@@ -192,6 +192,44 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-package-maven-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>jaxb-list</id>
+                        <goals>
+                            <goal>generate-jaxb-list</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-generated-resources-jaxb</id>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                        <configuration>
+                            <resources>
+                                <resource>
+                                    <directory>${basedir}/target/generated/camel/jaxb</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <profiles>
         <profile>
             <id>weld-3.0</id>
diff --git a/components/camel-cdi/src/main/resources/org/apache/camel/cdi/xml/jaxb.index b/components/camel-cdi/src/main/resources/org/apache/camel/cdi/xml/jaxb.index
deleted file mode 100644
index fa117ca..0000000
--- a/components/camel-cdi/src/main/resources/org/apache/camel/cdi/xml/jaxb.index
+++ /dev/null
@@ -1,28 +0,0 @@
-## ------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ------------------------------------------------------------------------
-ApplicationContextFactoryBean
-CamelContextFactoryBean
-ConsumerTemplateFactoryBean
-EndpointFactoryBean
-ErrorHandlerDefinition
-ErrorHandlerType
-ImportDefinition
-ProducerTemplateFactoryBean
-RedeliveryPolicyFactoryBean
-RestContextDefinition
-RouteContextDefinition
-ThreadPoolFactoryBean
\ No newline at end of file
diff --git a/components/camel-jmx/pom.xml b/components/camel-jmx/pom.xml
index 11d1130..93cf5fe 100644
--- a/components/camel-jmx/pom.xml
+++ b/components/camel-jmx/pom.xml
@@ -70,6 +70,44 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-package-maven-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>jaxb-list</id>
+                        <goals>
+                            <goal>generate-jaxb-list</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-generated-resources-jaxb</id>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                        <phase>process-classes</phase>
+                        <configuration>
+                            <resources>
+                                <resource>
+                                    <directory>${basedir}/target/generated/camel/jaxb</directory>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
     <profiles>
         <profile>
             <id>jdk8-build</id>
diff --git a/components/camel-jmx/src/main/resources/org/apache/camel/component/jmx/jaxb/jaxb.index b/components/camel-jmx/src/main/resources/org/apache/camel/component/jmx/jaxb/jaxb.index
deleted file mode 100644
index 4d297ab..0000000
--- a/components/camel-jmx/src/main/resources/org/apache/camel/component/jmx/jaxb/jaxb.index
+++ /dev/null
@@ -1,24 +0,0 @@
-## ------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ------------------------------------------------------------------------
-AttributeChangeNotification
-JMXConnectionNotification
-MBeanServerNotification
-MonitorNotification
-NotificationEventType
-ObjectNamesType
-RelationNotification
-TimerNotification
diff --git a/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/jaxb.index b/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/jaxb.index
deleted file mode 100644
index c2ef941..0000000
--- a/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/jaxb.index
+++ /dev/null
@@ -1,21 +0,0 @@
-## ------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ------------------------------------------------------------------------
-CamelJMXAgentDefinition
-CamelPropertyPlaceholderDefinition
-CamelProxyFactoryDefinition
-CamelServiceExporterDefinition
-CamelStreamCachingStrategyDefinition
diff --git a/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/util/jsse/jaxb.index b/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/util/jsse/jaxb.index
deleted file mode 100644
index bd8e9a2..0000000
--- a/core/camel-core-xml/src/main/resources/org/apache/camel/core/xml/util/jsse/jaxb.index
+++ /dev/null
@@ -1,27 +0,0 @@
-## ------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ------------------------------------------------------------------------
-AbstractKeyManagersParametersFactoryBean
-AbstractKeyStoreParametersFactoryBean
-AbstractSecureRandomParametersFactoryBean
-AbstractSSLContextClientParametersFactoryBean
-AbstractSSLContextParametersFactoryBean
-AbstractSSLContextServerParametersFactoryBean
-AbstractTrustManagersParametersFactoryBean
-CipherSuitesParametersDefinition
-ClientAuthenticationDefinition
-FilterParametersDefinition
-SecureSocketProtocolsParametersDefinition
\ No newline at end of file
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
index 0211ed8..a1d1dca 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
@@ -39,6 +39,7 @@ import java.util.TreeSet;
 import java.util.stream.Stream;
 import javax.xml.bind.annotation.XmlEnum;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
@@ -91,7 +92,7 @@ public class PackageJaxbMojo extends AbstractGeneratorMojo {
     private void processClasses(IndexView index) {
         Map<String, Set<String>> byPackage = new HashMap<>();
 
-        Stream.of(XmlRootElement.class, XmlEnum.class)
+        Stream.of(XmlRootElement.class, XmlEnum.class, XmlType.class)
                 .map(Class::getName)
                 .map(DotName::createSimple)
                 .map(index::getAnnotations)