Я искал похожие вопросы в StackOverflow и не могу ничего найти.
Мой pom.xml
файл:
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stackoverflow.example</groupId>
<artifactId>dmytro-camel-demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
</parent>
<properties>
<jdk.version>1.8</jdk.version>
<kotlin.version>1.3.31</kotlin.version>
<camel.version>2.23.1</camel.version>
<spring-boot.version>2.1.4.RELEASE</spring-boot.version>
<google-cloud.version>1.92.0</google-cloud.version>
<google-firestore.version>1.22.0</google-firestore.version>
<javax-jaxb.version>2.2.11</javax-jaxb.version>
<javax-activation.version>1.1.1</javax-activation.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Kotlin -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
</dependency>
<!-- Camel -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-google-pubsub-starter</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-zipfile</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jetty</artifactId>
<version>${camel.version}</version>
</dependency>
<!-- GCP -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>${google-cloud.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-firestore</artifactId>
<version>${google-firestore.version}</version>
</dependency>
<!-- JDK >=10 doesn't bundle JAXB -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${javax-jaxb.version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax-activation.version}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-java-parameters</arg>
</args>
<compilerPlugins>
<!-- Spring compiler plugin will automatically open relevant classes and members for Spring AOP support. See https://kotlinlang.org/docs/reference/compiler-plugins.html -->
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>${jdk.version}</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
<!-- Needed by the Spring compiler plugin. -->
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ci</id>
<properties>
<revision>0.0.1-SNAPSHOT</revision>
</properties>
</profile>
</profiles>
</project>
Я получил следующую ошибку:
java.lang.NoClassDefFoundError: com / google / api / client / repackaged / com / google / common / base / Strings at org.apache.camel.component.google.pubsub.GooglePubsubEndpoint.afterPropertiesSet (GooglePubsubEndpoint.java:87)camel-google-pubsub-2.23.1.jar: 2.23.1] at org.apache.camel.component.google.pubsub.GooglePubsubEndpoint.createConsumer (GooglePubsubEndpoint.java:109) ~ [camel-google-pubsub-2.23.1.jar: 2.23.1] в org.apache.camel.impl.EventDrivenConsumerRoute.addServices (EventDrivenConsumerRoute.java:69) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultRoute.onStartingServices (DefaultRoute.java:107) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.RouteService.doWarmUp (RouteService.java:172) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.RouteService.warmUp (RouteService.java:145) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes (DefaultCamelContext.java:3953) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices (DefaultCamelContext.java:3860) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes (DefaultCamel:36)-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.doStartCamel (DefaultCamelContext.java:3489) ~ [camel-core-2.23.1.jar: 2.23.1] в организации.apache.camel.impl.DefaultCamelContext $ 4.call (DefaultCamelContext.java:3248) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext $ 4.call (DefaultCamelContext.java: 3244) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader (DefaultCamelContext.java:3267) ~ [camel-core-2.23.1.jar: 2.23.1] at org.apache.camel.impl.DefaultCamelContext.doStart (DefaultCamelContext.java:3244) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.support.ServiceSupport.start (ServiceSupport.java:72) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.impl.DefaultCamelContext.start (DefaultCamelContext).java: 3160) ~ [camel-core-2.23.1.jar: 2.23.1] в org.apache.camel.spring.SpringCamelContext.start (SpringCamelContext.java:133) ~ [camel-spring-2.23.1.jar: 2.23.1] в org.apache.camel.spring.SpringCamelContext.onApplicationEvent (SpringCamelContext.java:174) ~ [camel-spring-2.23.1.jar: 2.23.1] в org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener (SimpleApplicationEventMulticaster.java:172) ~ [spring-context-5.1.6.RELEASE.jar: 5.1.6.[spring-context-5.1.6.RELEASE.jar: 5.1.6.RELEASE] в org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent (SimpleApplicationEventMulticaster.java:139) ~ [spring-context-5.1.6.RELEASE.баночка: 5.1.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent (AbstractApplicationContext.java:402) ~ [spring-context-5.1.6.RELEASE.jar: 5.1.6.RELEASE] в org.springframework.context.support.AbstractApplicationContext.publishEvent (AbstractApplicationContext.java:359) ~ [spring-context-5.1.6.RELEASE.jar: 5.1.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh (AbstractApplicationCon896)[spring-context-5.1.6.RELEASE.jar: 5.1.6.RELEASE] в org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh (ServletWebServerApplicationContext.java:163) ~ [spring-boot-2.134.RELEASE.jar: 2.1.4.RELEASE] вorg.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:552) ~ [spring-context-5.1.6.RELEASE.jar: 5.1.6.RELEASE] в org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142) ~ [spring-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] в org.springframework.boot.SpringApplication.refresh (SpringApplication. Spring) 7-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] в org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] в org.springframework.boot.SpringApplication.run (SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] в org.springframework.boot.SpringApplication.run (SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] в org.springframework.boot.SpringApplication.run (SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar: 2.1.4.RELEASE] на com.stackoverflow.example.ExampleAppKt.main (ExampleApp.kt: 13) [classes /: na] Причина: java.lang.ClassNotFoundException: com.google.api.client.repackaged.com.google.common.base.Strings at java.net.URLClassLoader.findClass (URLClassLoader.java:382) ~ [na: 1.8.0_202-release] в java.lang.ClassLoader.loadClass (ClassLoader.java:424) ~ [na: 1.8.0_202-release] в sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java:349) ~ [na: 1.8.0_202-release] в java.lang.ClassLoader.loadClass (ClassLoader.java:357) ~ [na: 1.8.0_202-release] ... 33 общие рамки опущены
Как решить?Я что-то делаю не так?