Ant to Maven - multiple build targets

后端 未结 3 1057
时光取名叫无心
时光取名叫无心 2020-11-28 23:08

I have an Ant build that is currently being converted to Maven. However, the Ant build has 2 build targets - one that builds the entire app, and one that builds a JAR from s

3条回答
  •  鱼传尺愫
    2020-11-28 23:40

    Your first thought is the correct one. Split the 2 pieces into 2 projects.

    The maven philosophy is that each project should build one and only artifact (jar, war, whatever)

    You could probably hack something together so that you only have one maven project building 2 atrifacts, but it would be a hack.

    You can call ant from maven, so if you really want to do this, then I suggest you start looking at the maven ant plugin. The artifact id is "maven-antrun-plugin"

提交回复
热议问题