Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: None
-
Fix Version/s: 2.5
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
It would very useful to have the ability to automatically reference dependee project for which the project source code is locally found.
Let's assume that module y depends on module x. The project description of module y will contain directly or indirectly - i.e. transitively - a dependency to module x.
The execution of the goal "eclipse:eclipse" on the module y would normally generate an eclipse project with a jar dependency to module x.
Often it is convenient to directly reference the module x as eclipse project to allow concurrent modification and compilation of both module x and y.
The attached patch allows to automatically reference projects if the dependee project's source code is found in same directory as the dependent project. A project is a candidate match if the group-id and artifact-id properties of the two project equal and the two version equal or the dependee's version is the requested version but SNAPSHOT tagged.
Example of directory structure:
/usr/src/product/com.company.product.x/pom.xml
/usr/src/product/com.company.product.y/pom.xml
The feature can be enabled via the maven's boolean property
eclipse.referenceDependeeProjects
The property default value is false and therefore the feature is disabled per default.
The following is an example of execution with the feature enabled:
- mvn eclipse:eclipse -Declipse.referenceDependeeProjects=true
Currently it is assumed that the dependee project sources are within a directory named after the project's artifact-id.
Future extensions could consider the more general maven's version matching strategy - is this coded anywhere specific in maven's source code? - and possibly allowing for locating the dependee source in directories with generic names or paths.
Attachments
Issue Links
| This issue is related to: | ||||
| MECLIPSE-344 | connecting existing workspace artifact-projects |
|
|
|
I would be very interested in a behaviour that's quite similar to this.
I have two open source projects, GeoTools and GeoServer, both using maven, and GeoServer depending on GeoTools.
Now, what I would like very much would be the ability to load both project modules into Eclipse so that GeoServer project refer directly GeoTools modules, instead of depending on the jars.
GeoTools is a complex library made up of 90+ modules, organised in a tree hierarchy, so I guess to make this possible mvn eclipse:eclipse would have to actually scan the
GeoTools poms.