java scala maven 混合打包插件

xml 复制代码
 <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <addScalacArgs>-target:jvm-1.8</addScalacArgs>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</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.a.a.at</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>

                </executions>
            </plugin>


        </plugins>
    </build>
相关推荐
tqs_1234520 分钟前
redis zset score的计算
java·算法
kaili23034 分钟前
IDEA试用过期,无法登录,重置方法
java·intellij-idea
没有bug.的程序员40 分钟前
Redis 内存优化与压缩:从原理到实战的完整指南
java·数据库·redis·内存优化·压缩内存
Yeats_Liao1 小时前
Java 软件测试(三):Mockito打桩与静态方法模拟解析
java·开发语言
JAVA学习通1 小时前
RabbitMQ---面试题
java·开发语言
艾菜籽1 小时前
UDP套接字的使用
java·开发语言·网络
七夜zippoe2 小时前
缓存三大劫攻防战:穿透、击穿、雪崩的Java实战防御体系(三)
java·开发语言·缓存
lllsure2 小时前
【Docker】镜像
java·spring cloud·docker
zhysunny2 小时前
51.不可变基础设施:云原生时代的「乐高城堡」建造法
java·云原生