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

Jetty claims to be running SNAPSHOT version #3918

Closed
cowwoc opened this issue Jul 31, 2019 · 2 comments
Closed

Jetty claims to be running SNAPSHOT version #3918

cowwoc opened this issue Jul 31, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@cowwoc
Copy link
Contributor

cowwoc commented Jul 31, 2019

Version 9.4.15.v20190215

When hitting an HTTP 404 page I get:

Powered by Jetty:// 9.4.z-SNAPSHOT at the bottom of the page. Digging into the source-code, I see the following code in Jetty.java:

        if (pkg != null &&
                "Eclipse Jetty Project".equals(pkg.getImplementationVendor()) &&
                pkg.getImplementationVersion() != null)
            VERSION = pkg.getImplementationVersion();
        else
            VERSION = System.getProperty("jetty.version", "9.4.z-SNAPSHOT");

At runtime, I see that pkg.getImplementationVersion() returns null.

I suspect this is a bug.

My application runs on JDK 13 (build 31) and uses Java Modules. Is it possible that vendor information is being hidden due to the use of Java Modules?

@olamy
Copy link
Member

olamy commented Jul 31, 2019

I agree on this one.
What I would do is
VERSION = System.getProperty("jetty.version", __buildProperties.getProperty( "version", "9.4.z-SNAPSHOT"));
the file build.properties contains the version value coming from the pom so it sounds more accurate.
@gregw ?

olamy added a commit that referenced this issue Jul 31, 2019
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
olamy added a commit that referenced this issue Jul 31, 2019
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
olamy added a commit that referenced this issue Jul 31, 2019
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
@olamy
Copy link
Member

olamy commented Jul 31, 2019

fix in jetty-9.4.x and jetty-10.0.x branches.

@olamy olamy closed this as completed Jul 31, 2019
@olamy olamy self-assigned this Jul 31, 2019
@olamy olamy added the Build label Jul 31, 2019
@olamy olamy added this to the 9.4.x milestone Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants