We currently ship a standard ear to our clients but web services can be customized and are shipped differently.
The ear that is shipped to all is generated from a standard multi-maven project and the final structure is like:
enterprise-app.ear
|-- ejb.jar
|-- webapp.war
|-- standard_webservices.jar
|-- framework.jar
|-- lib
| |-- lib1.jar
| |-- lib2.jar
| |-- ...
|-- META-INF
|-- application.xml
Then for each client we have a separate project that builds a jar (not mavenized yet) and it is the clients' responsibility to manually update the .ear with the provided script.
install
|-- custom_client1_webservices.jar
|-- build.xml
|-- META-INF
|-- application.xml
The ant script will overwrite the application.xml in the original .ear with the custom one and add the custom webservices.
This approach works more or less fine but there are multiple issues.
- Each custom project is not a maven project
- Each custom project has an application.xml to be maintained
- Each client needs to install manually the customizations
My questions are:
- is there a standard approach to generating custom .ear files in maven ?
- should the custom webservices all be under a parent-custom project or under the enterprise project ?
My concern is that I need to use profiles in the assembly plugin to generate multiple .ear files (custom_client1.ear, custom_client2.ear, etc.) and that our nexus will end up having as many .ear files as we have customized client apps where only a little jar and the application.xml is different
Aucun commentaire:
Enregistrer un commentaire