简体   繁体   English

如何使用外部资源配置创建uber-jar

[英]How to create an uber-jar with external resource configuration


I need to create uberjar, which will contain the java-dependencies and the configuration directory will be located out of the jar? 我需要创建uberjar,它将包含java-dependencies,并且配置目录是否位于jar之外? any ideas? 有任何想法吗?

The structure should be something like this: 结构应如下所示:

MyOutputDir MyOutputDir
| |
----- MyApp(jar-with-dependencies) ----- MyApp(具有依赖关系的jar)
----- conf ----- conf

Thanks in advance 提前致谢

It depends on what you are trying to do. 这取决于您要执行的操作。 If you are trying to include dependencies, try using the maven shade plugin within the plugins node. 如果要包括依赖项,请尝试在plugins节点内使用maven shade插件。 Simply include the artifacts that you want added to your shaded jar. 只需包括要添加到着色罐中的工件即可。

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

More info at http://maven.apache.org/plugins/maven-shade-plugin/ 有关更多信息,请访问http://maven.apache.org/plugins/maven-shade-plugin/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM