Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343172

Summary: Jetty version banner is wrong in uber-jar
Product: [RT] Jetty Reporter: Arkadi Shishlov <arkadi.shishlov>
Component: serverAssignee: Greg Wilkins <gregw>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jesse.mcconnell, jetty-inbox
Version: unspecified   
Target Milestone: 7.2.x   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Jetty version from pom.properties none

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.