SRo*_*mes 5 scala maven sbt maven-shade-plugin sbt-assembly
由于某些依赖项中的一些怪癖,我遇到了麻烦sbt-assembly,并且被告知使用Java的人并且使用Maven的shade插件获得了良好的结果.
如何为Scala/sbt使用Maven的阴影插件?
小智 -1
您可以将以下内容添加到您的 POM 中
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.group.id.Launcher1</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)