Я создаю компонент Camel на основе Maven.Я добавил соответствующие зависимости в POM.xml, но все равно получаю исключение:
Неразрешенная зависимость: (& (component = FileFormatConversion) (objectClass = org.apache.camel.spi.ComponentResolver))
Мне удалось собрать и запустить проект Maven.Однако в папке компонента присутствует jar компонента:
Папка компонента
Может кто-нибудь посоветовать, если есть какая-то проблема с моим POM или причина этого исключения.Вот мой POM.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>FileFormatConversion</groupId>
<artifactId>FileFormatConversion</artifactId>
<version>1.0.0</version>
<packaging>bundle</packaging>
<name>${project.groupId}.${project.artifactId}</name>
<properties>
<camel.version>2.18.0</camel.version>
<import.packages>*;version="0";resolution:=optional</import.packages>
<private.packages>!*</private.packages>
<symbolic.name>${project.groupId}</symbolic.name>
<embed-dep>*;scope=compile;type=!pom;inline=true</embed-dep>
<unpack-bundle>false</unpack-bundle>
<maven.test.skip>true</maven.test.skip>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
</properties>
<dependencies>
<!-- Check for the latest version of this artifact in central maven repository -->
<dependency>
<groupId>com.sap.cloud.adk</groupId>
<artifactId>com.sap.cloud.adk.build.archive</artifactId>
<version>1.24.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.camel/camel-component -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-component</artifactId>
<version>1.4.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/in.jlibs/jlibs-xsd -->
<dependency>
<groupId>in.jlibs</groupId>
<artifactId>jlibs-xsd</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>in.jlibs</groupId>
<artifactId>jlibs-xml</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>in.jlibs</groupId>
<artifactId>jlibs-visitor</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>in.jlibs</groupId>
<artifactId>jlibs-core</artifactId>
<version>2.2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache/xerces -->
<dependency>
<groupId>org.apache</groupId>
<artifactId>xerces</artifactId>
<version>2.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<!-- testing -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<version>${camel.version}</version>
<scope>test</scope>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>4.2.0</version>
<inherited>true</inherited>
<configuration>
<excludeDependencies>true</excludeDependencies>
<instructions>
<Include-Resource>src/main/resources/,lib/</Include-Resource>
<Bundle-SymbolicName>${symbolic.name}</Bundle-SymbolicName>
<Bundle-Classpath>.,jax-qname.jar,jaxmexs-0.5.jar,xsd-2.2.3.jar,jlibs-core-2.2.1.jar,jlibs-visitor-2.2.1.jar,jlibs-xml-2.2.1.jar,
jlibs-xsd-2.2.1.jar,xercesImpl-2.11.0.jar,xml-apis-1.4.01.jar,FileFormatConversion-1.0.0.jar
</Bundle-Classpath>
<Import-Package>${import.packages}</Import-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<!-- Specify the artifacts to be excluded in the dependencies -->
<excludeArtifactIds></excludeArtifactIds>
<!-- Specify the group ids to be excluded in the dependencies -->
<excludeGroupIds>com.sap.cloud.adk,org.apache.camel,org.slf4j,log4j,in.jlibs,xerces,org.apache</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.sap.cloud.adk</groupId>
<artifactId>com.sap.cloud.adk.build.archive</artifactId>
<version>1.24.0</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.sap.cloud.adk</groupId>
<artifactId>com.sap.cloud.adk.build.archive</artifactId>
<executions>
<execution>
<id>build-adapter</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<adapterProjectDirectory>${project.basedir}</adapterProjectDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>