Maven Build multiple profiles in one go

£可爱£侵袭症+ 提交于 2019-11-28 01:48:40

Maven is not like ant. With ant, you can basically do what you want when you want to do it. With maven, there is a clear and documented build life cycle, and it's targeted at building one component (and possibly attaching other artifacts to the build).

What you plan to do is however to build one component multiple times, but with different parameters. This does not fit into the maven lifecycle. So what you will need to do is to cause some external process to do the iteration and call maven repeatedly with different parameters.

The classic way to accomplish this would be to use a shell script, but you can also use the Maven Invoker to launch a separate process from a Java or Maven context.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!