扫码关注官方订阅号
认证0级讲师
最终是自己写了个小程序搞定的
你都把maven当做标签了 为啥不用maven呢?
可以使用Maven的maven-assembly-plugin插件或maven-shade-plugin插件,打成的jar包会带有所有依赖。可以参考我的一篇博客:http://xxgblog.com/2015/08/07/maven-create-executable-jar/
使用ant构建工具,可以配置自动化编译的。
可以直接使用maven 我之前些工具包就是用的maven
给你一个参考
<?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <build> <finalName>greys-core</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> <showDeprecation>true</showDeprecation> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <goals> <goal>attached</goal> </goals> <phase>package</phase> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.github.ompc.greys.core.GreysLauncher</mainClass> </manifest> </archive> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
maven挺好用的啊
发现个博文不错,分享下:https://segmentfault.com/a/1190000005155826
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
最终是自己写了个小程序搞定的
你都把maven当做标签了 为啥不用maven呢?
可以使用Maven的maven-assembly-plugin插件或maven-shade-plugin插件,打成的jar包会带有所有依赖。可以参考我的一篇博客:http://xxgblog.com/2015/08/07/maven-create-executable-jar/
使用ant构建工具,可以配置自动化编译的。
可以直接使用maven 我之前些工具包就是用的maven
给你一个参考
maven挺好用的啊
发现个博文不错,分享下:https://segmentfault.com/a/1190000005155826