jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1
  • MAVEN-699

add a posibility to extend a project by specifying it's groupId, artifactId and version

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: model additions
  • Labels:
    None

Description

I propose the following alternative to <extend>project.xml path</extend>

<extendProject>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
</extendProject>

It would look up the pom in the repo (and download it if neccessary).

IMO it's more flexible than relying on filesystem paths.

Issue Links

is related to

Improvement - An improvement or enhancement to an existing feature or task. MAVEN-1390 POM example <extends> doco is non-portable

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
dion gillard added a comment - 20/Aug/03 8:14 PM

Why not just allow the specification of extend as a URL,

e.g. ${maven.repo.remote}/ant/poms/ant.1.5.3.pom

Show
dion gillard added a comment - 20/Aug/03 8:14 PM Why not just allow the specification of extend as a URL, e.g. ${maven.repo.remote}/ant/poms/ant.1.5.3.pom
Hide
Permalink
Rafal Krzewski added a comment - 21/Aug/03 2:16 AM

According to the specs maven.repo.remote may contain a comma separated list of URL, so this is a bad idea.
What's more you've put information about remote repo orgainzation into the path. This is also wrong because maven can be quite easily extended to work with various repo organizations (the repo might store a layout.xml file in it's root directory and the artifact fetcher would use it to build URLs relative to that root from (groupId, artifactType, artifactId, version, snapshot/release) tuples.

Show
Rafal Krzewski added a comment - 21/Aug/03 2:16 AM According to the specs maven.repo.remote may contain a comma separated list of URL, so this is a bad idea. What's more you've put information about remote repo orgainzation into the path. This is also wrong because maven can be quite easily extended to work with various repo organizations (the repo might store a layout.xml file in it's root directory and the artifact fetcher would use it to build URLs relative to that root from (groupId, artifactType, artifactId, version, snapshot/release) tuples.
Hide
Permalink
dion gillard added a comment - 21/Aug/03 2:21 AM

ok, how about:

pom:ant-1.5.3

Show
dion gillard added a comment - 21/Aug/03 2:21 AM ok, how about: pom:ant-1.5.3
Hide
Permalink
Rafal Krzewski added a comment - 21/Aug/03 2:58 AM

Do you mean defining custom URL schema for refferring to artifacts
available through maven?
If we decide to do that, that notation should be also used for
declaring dependencies, right?
We would need something like that to express all the information:

maven:<groupId>/<artifactId>/<artifactType>/<version>

How would it look in practice?

<extends>maven:myproject/myproject-common/pom/1.0</extends>
...
<dependencies>
<dependency>
<location>maven:ant/ant/jar/1.5</location>
</dependency>
</dependencies>

Show
Rafal Krzewski added a comment - 21/Aug/03 2:58 AM Do you mean defining custom URL schema for refferring to artifacts available through maven? If we decide to do that, that notation should be also used for declaring dependencies, right? We would need something like that to express all the information: maven:<groupId>/<artifactId>/<artifactType>/<version> How would it look in practice? <extends>maven:myproject/myproject-common/pom/1.0</extends> ... <dependencies> <dependency> <location>maven:ant/ant/jar/1.5</location> </dependency> </dependencies>
Hide
Permalink
Rafal Krzewski added a comment - 21/Aug/03 4:30 AM

I've just noticed a problem with the feature I've proposed (after some discussions with Norbert Pabis).

Extending a project in the current implementation involves inheriting it's maven.xml script, and there is intent to inherit project.properties file (though that doesnt' work - see MAVEN-37: the longest standing maven bug at the time of writing - over 1 year old! I hope it gets fixed by 1.0...)

Both mine original proposal, and dIon's URL variation specify the location of project.xml file only in the local repo. The two other files are not there, so this would be a regression in project inheritance functionality.

This brings us to the interesting questions: Is POM euqivalent to project.xml, or is POM composed of all three files?

In we decide for the first option, this feautre would be of pretty
limited usability, unless we extend maven to somehow know what
projects the user has checked out in source form, and thus be
able to map groupId/artifactId/version to a directory on a local disk.
This calls for some sort of registry that would have to be maintained.
A good subject for a separate discussion...

However if we decide to go down the second route, a new vehicle for POM is needed. The most straightforward solution is a zip archive that contains a file named project.xml in it's root folder, and may optionally contain maven.xml and project.properties files. The maven.xml file may include other jelly scripts and parse additional properties files, so we might allow the POM archive to contain these as well.

There is another advantage of such POM archives: - you can quickly see how a project uses Maven to build itself without downloading full source distribution or accessing their SCM system.

The POM archives would be generated by the POM plugin, and this seems to be a no-braniner task.

Loading the project from a POM archive should be reasonably easy, provided that Maven core uses URLs instead of File in a few places.

The difference between loading a local project, and a project referred
through POM archive would be parsing:

jar:file://${projectArtifact.path}!/project.xml instead of
file://${projectLocation}/project.xml

Show
Rafal Krzewski added a comment - 21/Aug/03 4:30 AM I've just noticed a problem with the feature I've proposed (after some discussions with Norbert Pabis). Extending a project in the current implementation involves inheriting it's maven.xml script, and there is intent to inherit project.properties file (though that doesnt' work - see MAVEN-37: the longest standing maven bug at the time of writing - over 1 year old! I hope it gets fixed by 1.0...) Both mine original proposal, and dIon's URL variation specify the location of project.xml file only in the local repo. The two other files are not there, so this would be a regression in project inheritance functionality. This brings us to the interesting questions: Is POM euqivalent to project.xml, or is POM composed of all three files? In we decide for the first option, this feautre would be of pretty limited usability, unless we extend maven to somehow know what projects the user has checked out in source form, and thus be able to map groupId/artifactId/version to a directory on a local disk. This calls for some sort of registry that would have to be maintained. A good subject for a separate discussion... However if we decide to go down the second route, a new vehicle for POM is needed. The most straightforward solution is a zip archive that contains a file named project.xml in it's root folder, and may optionally contain maven.xml and project.properties files. The maven.xml file may include other jelly scripts and parse additional properties files, so we might allow the POM archive to contain these as well. There is another advantage of such POM archives: - you can quickly see how a project uses Maven to build itself without downloading full source distribution or accessing their SCM system. The POM archives would be generated by the POM plugin, and this seems to be a no-braniner task. Loading the project from a POM archive should be reasonably easy, provided that Maven core uses URLs instead of File in a few places. The difference between loading a local project, and a project referred through POM archive would be parsing: jar:file://${projectArtifact.path}!/project.xml instead of file://${projectLocation}/project.xml
Hide
Permalink
Arik Kfir added a comment - 06/Oct/03 8:20 AM

I definitly agree that POM inheritance should be declarative rather than file-based. This is a feature every organization generating multiple projects will appreciate.

Show
Arik Kfir added a comment - 06/Oct/03 8:20 AM I definitly agree that POM inheritance should be declarative rather than file-based. This is a feature every organization generating multiple projects will appreciate.
Hide
Permalink
Brett Porter added a comment - 23/Jul/04 1:34 AM

not in POMv3, already in POMv4 - coming soon

Show
Brett Porter added a comment - 23/Jul/04 1:34 AM not in POMv3, already in POMv4 - coming soon

People

  • Assignee:
    Unassigned
    Reporter:
    Rafal Krzewski
Vote (4)
Watch (2)

Dates

  • Created:
    20/Aug/03 9:10 AM
    Updated:
    08/Mar/06 10:47 PM
    Resolved:
    23/Jul/04 1:34 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.