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 <[email protected]> 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)
