My project generates 3/4 assemblies, 3 jars and 1 war.[I need to use assemblies itself] I need to include 2 of these assembly jars into my war. How can I ensure that before assembly war cre开发者_JS百科ation , other 2 jars are created ? Please respond
You have three choices:
- define all the assembly executions in one plugin configuration, and order them as needed. See this answer for more details.
- Define an earlier phase for your jar assemblies so that they have all been packaged before the war is packaged.
- Move the jar content into separate projects and specify them as dependencies of the war project so they are packaged automatically. This is the "Maven way" of handling this. It would also allow you to potentially reuse the jars in other wars.
I'd recommend option 3 myself, but the other two should both work.
精彩评论