V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  gongshw  ›  全部回复第 1 页 / 共 1 页
回复总数  3
@lchqfnu

pom.xml 中可以使用变量, 比如
<mainClass>${applicationMainClass}</mainClass>

然后执行命令是用 -D 传递变量参数:
maven install -DapplicationMainClass=com.example.MainClass1
maven install -DapplicationMainClass=com.example.MainClass2

细节还需要再打磨,比如生成的 jar 文件文件名应该也可以由参数决定
方案一:使用多个子模块

方案二:在 pom.xml 中使用变量,并在执行 maven 命令时传递
2018-03-19 19:20:18 +08:00
回复了 novaline 创建的主题 问与答 怎么把 qq 邮箱迁移到 gmail?
设置 -> 账户和导入 -> 查收其他帐号的邮件 -> 添加邮件帐号
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2669 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 04:56 · PVG 12:56 · LAX 21:56 · JFK 00:56
Developed with CodeLauncher
♥ Do have faith in what you're doing.