-
Notifications
You must be signed in to change notification settings - Fork 14
Description
This probably needs to be broken down into a few smaller issues.
But to give a feel for the type of issue I'm thinking about...
server.xml app location doesn't match actual deployment location
Say we have server.xml config like this:
<enterpriseApplication id="guide-maven-multimodules-ear" location="guide-maven-multimodules-ear.ear" name="guide-maven-multimodules-ear"/>
So typically this would need to align with either of:
- LMP config of
<stripVersion>true</stripVersion> - OR,
<finalName>${project.artifactId}</finalName>
If you do neither of things the app is going to fail to start at least.
assist on names of modules within EAR
One thing I always have to go look up is the name of the module URI of a WAR within an EAR. So, say we wanted to configure a ctxRoot for an EAR within a WAR. For the guide-maven-multimodules app, it needs to be something like this
<enterpriseApplication id="guide-maven-multimodules-ear" location="guide-maven-multimodules-ear.ear" name="guide-maven-multimodules-ear">
<web-ext moduleName="guide-maven-multimodules-war-1.0-SNAPSHOT.war" context-root="/MyContextRoot"/>
</enterpriseApplication>but an easy mistake to make is to set moduleName="guide-maven-multimodules-war"
THOUGHTS
In both cases, we could use our Maven awareness (in this example, presumably Gradle too) to help the user insert a valid value.
Would we actually need to run Maven to do so? Possibly. Would this be a reason NOT to do this ? Maybe.
But putting this out there to consider for now.