Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343172 - Jetty version banner is wrong in uber-jar
Summary: Jetty version banner is wrong in uber-jar
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 7.2.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 12:22 EDT by Arkadi Shishlov CLA
Modified: 2011-05-06 04:35 EDT (History)
2 users (show)

See Also:


Attachments
Jetty version from pom.properties (3.47 KB, patch)
2011-04-18 12:23 EDT, Arkadi Shishlov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arkadi Shishlov CLA 2011-04-18 12:22:49 EDT
Build Identifier: 

At server start a version banner is printed to the log:

INFO 18:36:26 jetty-7.2.2.v20101205

The version string is calculated in two places
1. jetty-server org.eclipse.jetty.server.Server
2. jetty-start org.eclipse.jetty.start.Config

Package pkg = Config.class.getPackage();
if (pkg != null && (pkg.getImplementationVersion() != null))
    _version = pkg.getImplementationVersion();
else
    _version = System.getProperty("jetty.version","Unknown");

but, in Maven shade-plugin packaged project (to create single uber-jar for distribution to SE environment), the Manifest versions are project version, not Jetty. So the wrong version is printed. It would be nice to have this improved to print real Jetty version.
Same fix was accepted in Apache Camel, see https://issues.apache.org/jira/browse/CAMEL-3773
Patch attached.


Reproducible: Always
Comment 1 Arkadi Shishlov CLA 2011-04-18 12:23:34 EDT
Created attachment 193498 [details]
Jetty version from pom.properties
Comment 2 Jesse McConnell CLA 2011-04-22 10:00:32 EDT
we'll take a look but I would also point you at the aggregate jars for this use case

http://repo2.maven.org/maven2/org/eclipse/jetty/aggregate/
Comment 3 Greg Wilkins CLA 2011-05-06 04:35:41 EDT
I've added a check for the package implementor before looking for the package version.