Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 174362 - Accommodate Maven in expected JAR naming scheme in EclipseStarter.searchFor()
Summary: Accommodate Maven in expected JAR naming scheme in EclipseStarter.searchFor()
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL: http://thread.gmane.org/gmane.comp.id...
Whiteboard:
Keywords:
: 240018 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-15 14:38 EST by Steven E. Harris CLA
Modified: 2008-12-01 13:51 EST (History)
5 users (show)

See Also:


Attachments
Adds a hyphen to the expected underscore separating JAR file base name and version. (2.20 KB, patch)
2007-02-15 14:40 EST, Steven E. Harris CLA
tjwatson: iplog+
Details | Diff
patch (1.98 KB, patch)
2007-03-30 17:06 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven E. Harris CLA 2007-02-15 14:38:53 EST
Per the discussion on the equinox-dev mailing list referenced in the URL above:

At present, EclipseStarter.searchFor() looks for JAR files given some
target name, which can be

 o the entire file name
 o the file's base name minus the ".jar" extension
 o the prefix of a base name, followed by an underscore that
   introduces a version tuple

The third one is clever and convenient, but I found that it conflicts
with Maven's preferred JAR naming scheme. Maven separates the
artifactId from the version tuple by a dash or hyphen.

With the small change attached, we could use Maven-generated artifacts
named by their artifactId and have them properly discovered.
Comment 1 Steven E. Harris CLA 2007-02-15 14:40:57 EST
Created attachment 59090 [details]
Adds a hyphen to the expected underscore separating JAR file base name and version.

This patch needs to be reformatted to fix up the tabs v. spaces inconsistency.
Comment 2 Andrew Niefer CLA 2007-02-15 15:14:42 EST
Note that there is similar code in org.eclipse.equinox.launcher.Main.searchFor() and findMax().

There is also a native version in org.eclipse.equinox.executable/library/eclipseCommon.c filter() and findFile().

The one in Main is used to find the osgi framework itself, as well as finding the launcher jar platform fragments.  The native one is used to find the launcher jar and its fragments as well as the splash screen.
Comment 3 Thomas Watson CLA 2007-03-30 17:04:43 EDT
I think it would be interesting to see if we can accomodate mavin artifacts here.  I'm not sure it is as important for the java/native launcher to support this since they typically look for equinox stuff that does not use mavin naming scheme.
Comment 4 Thomas Watson CLA 2007-03-30 17:06:09 EDT
Created attachment 62562 [details]
patch

Here is an updated patch against head.
Comment 5 Pascal Rapicault CLA 2007-04-17 14:59:51 EDT
We are afraid that there will be too many details to handle at this stage.
Comment 6 Chris Aniszczyk CLA 2008-09-12 10:33:14 EDT
*** Bug 240018 has been marked as a duplicate of this bug. ***
Comment 7 Frederic Conrotte CLA 2008-12-01 04:28:34 EST
Hello,

After spending several hours on it, I realized I'm running as well against this issue.

Any chance Thomas' patch will be applied in next milestone ?
Comment 8 Thomas Watson CLA 2008-12-01 10:18:20 EST
I'll take a look for M4.
Comment 9 Thomas Watson CLA 2008-12-01 13:51:31 EST
Patch released.
Comment 10 Thomas Watson CLA 2008-12-01 13:51:59 EST
Comment on attachment 59090 [details]
Adds a hyphen to the expected underscore separating JAR file base name and version.

tagging for iplog.