[英]Include Hortonworks respository in Spring Boot executable jar
我在Spring Boot應用程序中使用Hortonworks存儲庫中的shc-core依賴項,並在pom.xml文件中聲明了存儲庫,如下所示:
<repositories>
<repository>
<id>repository.hortonworks</id>
<name>Hortonworks Repository</name>
<url>http://repo.hortonworks.com/content/repositories/releases/</url>
</repository>
</repositories>
我從此存儲庫添加的依賴項是:
<dependency>
<groupId>com.hortonworks</groupId>
<artifactId>shc-core</artifactId>
<version>1.1.1-2.1-s_2.11</version>
</dependency>
我正在使用spring-boot-maven-plugin
來構建可執行的jar文件。 但是當我mvn clean install
或mvn clean install spring-boot:repackage
,它不會將shc-core jar打包在Spring Boot可執行jar文件中。
我已經嘗試了系統范圍,並啟用了<includeSystemScope>true</includeSystemScope>
配置。 但這也不起作用。
誰能告訴我我做錯了什么?
嘗試在pom.xml中添加
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>fully.qualified.MainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
和
跑::
mvn clean編譯安裝程序集:單個
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.