camel-spring-xml
Used in
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-xml</artifactId> <version>4.10.2</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <!-- 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. --> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.camel</groupId> <artifactId>components</artifactId> <version>4.10.2</version> </parent> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-xml</artifactId> <version>4.10.2</version> <name>Camel :: Spring XML</name> <description>Camel Spring with XML DSL</description> <licenses> <license> <name>Apache-2.0</name> <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> </license> </licenses> <properties> <firstVersion>3.9.0</firstVersion> <camel.surefire.forkTimeout>1800</camel.surefire.forkTimeout> <camel.surefire.parallel>false</camel.surefire.parallel> <label>spring</label> <supportLevel>Stable</supportLevel> <title>Spring XML</title> <camel.surefire.forkCount>4</camel.surefire.forkCount> </properties> <dependencies> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring</artifactId> <version>4.10.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-xml-jaxb</artifactId> <version>4.10.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-xml-jaxp</artifactId> <version>4.10.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core-xml</artifactId> <version>4.10.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> <version>3.0.0</version> <scope>compile</scope> </dependency> </dependencies> <build> <resources> <resource> <directory>target/schema</directory> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*.class</exclude> </excludes> </resource> </resources> <pluginManagement> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> <artifactItems> <artifactItem> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-xml</artifactId> <version>${project.version}</version> <type>jar</type> <overWrite>false</overWrite> <outputDirectory>${project.build.directory}/schema</outputDirectory> <includes>*.xsd</includes> </artifactItem> </artifactItems> </configuration> </plugin> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>${lifecycle-mapping-version}</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <versionRange>[0.0.0,)</versionRange> <goals> <goal>read-project-properties</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <versionRange>${maven-antrun-plugin-version}</versionRange> <goals> <goal>run</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution> <id>generate-schema</id> <phase>generate-test-sources</phase> <goals> <goal>schemagen</goal> </goals> </execution> </executions> <configuration> <outputDirectory>${project.build.directory}/schema</outputDirectory> <sources> <source>${project.build.directory}/schema-src</source> </sources> <createJavaDocAnnotations>false</createJavaDocAnnotations> <schemaSourceExcludeFilters> <filter implementation="org.codehaus.mojo.jaxb2.shared.filters.pattern.PatternFileFilter"> <patterns> <pattern>Helper.java</pattern> <pattern>Adapter.java</pattern> </patterns> </filter> </schemaSourceExcludeFilters> </configuration> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>copy-generated-resources-jaxb</id> <phase>process-classes</phase> <goals> <goal>resources</goal> </goals> <configuration> <resources> <resource> <directory>${basedir}/target/generated/camel/jaxb</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>process-sources</id> <phase>process-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>org.apache.camel</groupId> <artifactId>camel-api</artifactId> <version>${project.version}</version> <type>jar</type> <classifier>sources</classifier> <overWrite>true</overWrite> <includes>**/*</includes> <outputDirectory>target/sources/camel-api</outputDirectory> </artifactItem> <artifactItem> <groupId>org.apache.camel</groupId> <artifactId>camel-core-model</artifactId> <version>${project.version}</version> <type>jar</type> <classifier>sources</classifier> <overWrite>true</overWrite> <includes>**/*</includes> <excludes>**/*Configurer.java,**/console/*</excludes> <outputDirectory>target/sources/camel-core-model</outputDirectory> </artifactItem> <artifactItem> <groupId>org.apache.camel</groupId> <artifactId>camel-core-xml</artifactId> <version>${project.version}</version> <type>jar</type> <classifier>sources</classifier> <overWrite>true</overWrite> <includes>**/*</includes> <outputDirectory>target/sources/camel-core-xml</outputDirectory> </artifactItem> <artifactItem> <groupId>org.apache.camel</groupId> <artifactId>camel-util</artifactId> <version>${project.version}</version> <type>jar</type> <classifier>sources</classifier> <overWrite>true</overWrite> <includes>**/*</includes> <outputDirectory>target/sources/camel-util</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>store-camel-schema-version-in-file</id> <phase>initialize</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" /> <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" /> <property name="mv" value="${project.version}" /> <propertyregex input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" defaultValue="0" property="ov.p1" replace="\1" /> <propertyregex input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" defaultValue=".0" property="ov.p2" replace=".\2" /> <propertyregex input="${ov.p1}" regexp="(.+)" defaultValue="0" property="ov.p1a" replace="\1" /> <propertyregex input="${ov.p2}" regexp="(\..+)" defaultValue=".0" property="ov.p2a" replace="\1" /> <property name="camel.schema.version" value="${ov.p1a}${ov.p2a}" /> <mkdir dir="target" /> <mkdir dir="${project.build.directory}/schema/META-INF/JAXB" /> <echo file="target/camel.osgi.version.txt">camel.schema.version = ${camel.schema.version}</echo> </target> </configuration> </execution> <execution> <id>generate-sources</id> <phase>process-classes</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <echo>Copying code together for the XSD generation</echo> <mkdir dir="${project.build.directory}/schema-src" /> <copy todir="${project.build.directory}/schema-src"> <fileset dir="${basedir}/src/main/java"> <include name="org/apache/camel/spring/xml/package-info.java" /> <include name="org/apache/camel/spring/xml/CamelBeanPostProcessor.java" /> <include name="org/apache/camel/spring/xml/ErrorHandler*.java" /> <include name="org/apache/camel/spring/xml/*FactoryBean.java" /> </fileset> <fileset dir="${project.build.directory}/sources/camel-core-xml"> <include name="org/apache/camel/core/xml/*.java" /> <include name="org/apache/camel/core/xml/util/**/*.java" /> </fileset> <fileset dir="${project.build.directory}/sources/camel-api"> <include name="org/apache/camel/BeanScope.java" /> <include name="org/apache/camel/ExchangePattern.java" /> <include name="org/apache/camel/LoggingLevel.java" /> <include name="org/apache/camel/ManagementStatisticsLevel.java" /> <include name="org/apache/camel/ShutdownRoute.java" /> <include name="org/apache/camel/ShutdownRunningTask.java" /> <include name="org/apache/camel/StartupSummaryLevel.java" /> <include name="org/apache/camel/TypeConverterExists.java" /> <include name="org/apache/camel/WaitForTaskToComplete.java" /> </fileset> <fileset dir="${project.build.directory}/sources/camel-core-model"> <include name="org/apache/camel/model/**/*.java" /> <include name="org/apache/camel/package-info.java" /> </fileset> <fileset dir="${project.build.directory}/sources/camel-util"> <include name="org/apache/camel/concurrent/ThreadPoolRejectedPolicy.java" /> </fileset> </copy> </target> </configuration> </execution> <execution> <id>include-schemas</id> <phase>prepare-package</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <echo>Copying XSD schema to be included in JAR</echo> <copy file="${project.build.directory}/classes/camel-spring.xsd" tofile="${project.build.directory}/schema/camel-spring.xsd" preservelastmodified="true" /> <copy file="${project.build.directory}/classes/camel-spring.xsd" tofile="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" preservelastmodified="true" /> <replace file="${project.build.directory}/schema/camel-spring-v${camel.schema.version}.xsd" preservelastmodified="true" value=""http://camel.apache.org/schema/spring/v${camel.schema.version}"" token=""http://camel.apache.org/schema/spring"" /> <copy todir="${project.build.directory}/classes" preservelastmodified="true"> <fileset dir="${project.build.directory}/schema"> <exclude name="**/*.class" /> </fileset> </copy> </target> </configuration> </execution> <execution> <id>copy-spring-meta-filter</id> <phase>process-resources</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <echo>Copying spring meta files</echo> <copy todir="${project.build.directory}/spring-meta" preservelastmodified="true"> <fileset dir="${project.basedir}/src/main/resources" /> </copy> <replace file="${project.build.directory}/spring-meta/META-INF/spring.handlers" preservelastmodified="true" value="${camel.schema.version}" token="$${camel.schema.version}" /> <replace file="${project.build.directory}/spring-meta/META-INF/spring.schemas" preservelastmodified="true" value="${camel.schema.version}" token="$${camel.schema.version}" /> <replace file="${project.build.directory}/spring-meta/META-INF/spring.schemas" preservelastmodified="true" value="${project.version}" token="$${camel.version}" /> <copy todir="${project.build.directory}/classes" preservelastmodified="true"> <fileset dir="${project.build.directory}/spring-meta" /> </copy> </target> </configuration> </execution> <execution> <id>Create JAR for test</id> <phase>process-test-classes</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <echo>Create some jars for testing</echo> <jar destfile="${project.build.directory}/test-classes/package+scan+test.jar" update="true"> <fileset includes="**/Test.class" dir="${project.build.directory}/test-classes/" /> </jar> <copy file="${project.build.directory}/test-classes/package+scan+test.jar" tofile="${project.build.directory}/test-classes/package_scan_test.jar" /> </target> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <executions> <execution> <id>init-camel-schema-version-property-from-file</id> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>target/camel.osgi.version.txt</file> </files> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>attach-artifacts</id> <phase>package</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>${project.build.directory}/classes/camel-spring.xsd</file> <type>xsd</type> </artifact> </artifacts> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-eip-documentation-enricher-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> <id>eip-documentation-enricher</id> <phase>process-test-resources</phase> <goals> <goal>eip-documentation-enricher</goal> </goals> <configuration> <inputCamelSchemaFile>${project.build.directory}/schema/schema1.xsd</inputCamelSchemaFile> <outputCamelSchemaFile>${project.build.directory}/classes/camel-spring.xsd</outputCamelSchemaFile> <deleteFilesAfterRun>${project.build.directory}/schema/schema1.xsd,${project.build.directory}/schema/schema2.xsd</deleteFilesAfterRun> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>