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

Use of HTTP port value in pom.xml property and defaultValue in server.xml is confiusing #961

Closed
scottkurz opened this issue Mar 15, 2023 · 2 comments

Comments

@scottkurz
Copy link
Member

scottkurz commented Mar 15, 2023

In pom.xml we set:

    <properties>
        <liberty.var.default.http.port>9080</liberty.var.default.http.port>
        <liberty.var.default.https.port>9443</liberty.var.default.https.port>
    </properties>

which we also pass to the test client via failsafe config.

In server.xml we have:

    <variable name="default.http.port" defaultValue="9080"/>
    <variable name="default.https.port" defaultValue="9443"/>

    <httpEndpoint host="*" httpPort="${default.http.port}" 
        httpsPort="${default.https.port}" id="defaultHttpEndpoint"/>

It's natural to think one might be able to change a value in server.xml and see the port change, and it's surprising to learn that this value is overridden by the Liberty variable generated from the pom.xml property.

The defaultValue serves a purpose in the Docker build, since we are not making use of the liberty-maven-plugin-generated values there.

This is a bit of an advanced point and maybe makes the "getting started" sample a bit too confusing, arguably.

Could we address with a comment?

Would it be just a bit less confusing to rename "default.http.port" => "http.port" ?

This applies to multiple guides too, not just this one.

@scottkurz scottkurz changed the title Are the HTTP port defaultValues in server.xml more confusing than helpful? Use of HTTP port value in pom.xml property and defaultValue in server.xml is confiusing Mar 22, 2023
@gkwan-ibm gkwan-ibm transferred this issue from OpenLiberty/guide-getting-started Aug 30, 2023
@gkwan-ibm
Copy link
Member

This problem should apply to most (51/64) of the guides

@gkwan-ibm
Copy link
Member

close

  • all guides should be updated except deprecated guides and liberty-deep-dive-gradle

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

Successfully merging a pull request may close this issue.

2 participants