Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
scottkurz opened this issue Jun 20, 2023 · 0 comments

Comments

@scottkurz
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant