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

Bug 346750

Summary: Add: "Main-Class: org.eclipse.persistence.Version" to MANIFEST for eclipselink.jar
Product: z_Archived Reporter: David Minsky <david.minsky>
Component: EclipselinkAssignee: David Minsky <david.minsky>
Status: RESOLVED FIXED QA Contact: Project Inbox <eclipselink.foundation-inbox>
Severity: minor    
Priority: P3 CC: eric.gwin
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch to build.xml and build.properties none

Description David Minsky CLA 2011-05-20 14:03:22 EDT
I propose we make a minor change: 

Add the following to the meta-inf/manifest.mf for eclipselink.jar ::

Main-Class: org.eclipse.persistence.Version 

This change is for the sole purpose of being able to obtain eclipselink.jar 's version (& build qualifier, build time, svn revision) with a simple and easily remembered command line invocation:

Easy:

   > java -jar eclipselink.jar

Note: org.eclipse.persistence.Version already has a main() method, so no Java changes would need to be made. The code is already there.

Easiest current way (Not as easy as above):

   > java -cp eclipselink.jar org.eclipse.persistence.Version

This change would be of benefit to:

- developers
- system administrators
- support staff
- integration, installation staff
Comment 1 David Minsky CLA 2011-05-20 14:49:16 EDT
Created attachment 196244 [details]
Proposed patch to build.xml and build.properties
Comment 2 David Minsky CLA 2011-05-20 15:25:53 EDT
Core & JPA Core tests pass 100% with changes in patch
Comment 3 Eric Gwin CLA 2011-05-26 13:08:08 EDT
Patch looks good. Applying now to verify.
Comment 4 Eric Gwin CLA 2011-05-26 13:45:16 EDT
Works fine. Didn't verify tests. I see no reason not to merge it. Risk is minimal. Having it available starting with initial release would be more beneficial than in a patch (2.3.1).
Comment 5 Eric Gwin CLA 2011-05-26 13:53:06 EDT
I merged my patched files into 2.3.0 so this would make the RC3 milestone build.
Needs to be merged to the older branches.
Comment 6 Eric Gwin CLA 2011-05-26 13:54:02 EDT
should have mentioned, Peter reviewed and gave go-ahead.
Comment 7 David Minsky CLA 2011-05-27 13:19:56 EDT
Checked into 2.1 trunk revision: 9469
Comment 8 David Minsky CLA 2011-05-27 13:20:24 EDT
Checked into 2.2 trunk at revision: 9471
Comment 9 David Minsky CLA 2011-05-27 13:21:09 EDT
Ported to older branches. Bug resolved
Comment 10 Eclipse Webmaster CLA 2022-06-09 10:02:52 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:09:36 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink