Hi I have multiproject set up for my application.
There are 3 sub projects and 1 outer project.
Main
| Services (using jar plugin)
| Data ( using jar plugin)
| Web (using war plugin)
| (using the ear plugin)
The outer project (Main) creates the Ear file and one of the (web) sub project creates the war file.
Now the new requirement is to not create ear file and just use war file generated from the sub project (web)
Now I want a task which only copy the war file from web project to the main project.
If i add the war and ear plugin in the main project then the war file that it generates is empty.
Please let me know how to bring the only war file to outer main project.
Note: the outer main project’s ear task is generating the war file properly. But I donot need the ear directory structure. I only need the war file to the main project.
Here is the code from war plugin ( in the web project)
war {
webInf {
from fileTree('src/main/webapp/xml').files
include "*.xml" into('resources/xml')
}
}
Here is the code from the Ear plugin ( in the main project)
ear {
archiveName = "${rootName}.ear"
libDirName 'APP-INF/lib'
excludes = ["**/*-javadoc.jar","**/*-sources.jar"]
deploymentDescriptor {
version = "5"
webModule("${rootName}-web-" + project.version + ".war", "/title")
}
}