Skip to content

For application/module config, employ Maven/Gradle-aware validation of URI, name, location, etc. values #185

Description

@scottkurz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions