Maven 1

Support group ID in jar overrides

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0-rc4
  • Fix Version/s: None
  • Component/s: core, documentation
  • Labels:
    None
  • Number of attachments :
    6

Description

Maven should add support for project local dependencies where a jar file is stored in one of the lib folders in the project.

Currently there is undocumented support for it using maven.jar.<id> however the use of <id> is deprecated and should be removed.

Another way I can think of is to use the properties project.path and local.path

project.path == dependency relative to the location of the project.xml file. This ensures that you are on the right file by using getParent of the project.getFile() method.

local.path == dependency wherever on the system (just like maven.jar)

This would help speed up migration of ant projects to maven projects.

  1. ArtifactListBuilder.patch
    14/May/04 5:19 AM
    1 kB
    Archimedes Trajano
  2. ArtifactListBuilder-2.patch
    14/May/04 5:33 AM
    1 kB
    Archimedes Trajano
  3. ArtifactListBuilder-3.patch
    14/May/04 8:05 AM
    2 kB
    Archimedes Trajano
  4. eclipse-classpath-jelly.patch
    14/May/04 8:20 AM
    1 kB
    Archimedes Trajano
  5. project-descriptor.xml
    14/May/04 5:25 AM
    51 kB
    Archimedes Trajano
  6. user-guide.xml
    14/May/04 5:31 AM
    63 kB
    Archimedes Trajano

Activity

Hide
Archimedes Trajano added a comment -

Patch to ArtifactListBuilder to implement property driven paths

Show
Archimedes Trajano added a comment - Patch to ArtifactListBuilder to implement property driven paths
Hide
Archimedes Trajano added a comment -

Updated project-descriptor.xml file containing text.
Having trouble with CVS and cannot do a patch

Show
Archimedes Trajano added a comment - Updated project-descriptor.xml file containing text. Having trouble with CVS and cannot do a patch
Hide
Archimedes Trajano added a comment -

Updated users guide

Show
Archimedes Trajano added a comment - Updated users guide
Hide
Archimedes Trajano added a comment -

Updated patch, delete the old one.

Show
Archimedes Trajano added a comment - Updated patch, delete the old one.
Hide
Archimedes Trajano added a comment -

Better patch, puts in the path separator automatically instead of having to prefix the project paths with a "/"

Show
Archimedes Trajano added a comment - Better patch, puts in the path separator automatically instead of having to prefix the project paths with a "/"
Hide
Archimedes Trajano added a comment -

Patch for eclipse plugin

Show
Archimedes Trajano added a comment - Patch for eclipse plugin
Hide
dion gillard added a comment -

How is maven.jar.override undocumented?

According to http://maven.apache.org/reference/user-guide.html#Overriding_Stated_Dependencies

the <id> you mention is artifactId, not id.

Show
dion gillard added a comment - How is maven.jar.override undocumented? According to http://maven.apache.org/reference/user-guide.html#Overriding_Stated_Dependencies the <id> you mention is artifactId, not id.
Hide
Archimedes Trajano added a comment -

But where would you specify the groupId? One of the reasons for the patch was to allow

<groupId>struts</groupId>
<artifactId>struts</artifactId>

<groupId>myclosedsourcecompany</groupId>
<artifactId>struts</artifactId>

Show
Archimedes Trajano added a comment - But where would you specify the groupId? One of the reasons for the patch was to allow <groupId>struts</groupId> <artifactId>struts</artifactId> <groupId>myclosedsourcecompany</groupId> <artifactId>struts</artifactId>
Hide
Archimedes Trajano added a comment -

Also its not documented in the list of properties here

http://maven.apache.org/reference/user-guide.html#Behavioural_Properties

I think most people if they find out about this list would go there to find out some of the core properties of maven and may not look further down. That document is getting long already as well anyway, perhaps if it was broken down as well for the next release (though the long version of the page is still provided for printing purposes).

Show
Archimedes Trajano added a comment - Also its not documented in the list of properties here http://maven.apache.org/reference/user-guide.html#Behavioural_Properties I think most people if they find out about this list would go there to find out some of the core properties of maven and may not look further down. That document is getting long already as well anyway, perhaps if it was broken down as well for the next release (though the long version of the page is still provided for printing purposes).
Hide
Brett Porter added a comment -

we need to use a proper id for jar overrides and document it in 1.1.

I'd suggest maven.jar.groupId.artifactId (but also look for just artifactId to be backwards compatible).

eg
maven.jar.org.apache.maven.maven = maven.jar

Show
Brett Porter added a comment - we need to use a proper id for jar overrides and document it in 1.1. I'd suggest maven.jar.groupId.artifactId (but also look for just artifactId to be backwards compatible). eg maven.jar.org.apache.maven.maven = maven.jar
Hide
Archimedes Trajano added a comment -

Not sure about your example.
Since you have maven.jar.org.apache.maven.maven should it just be maven.jar.maven.maven ?

Show
Archimedes Trajano added a comment - Not sure about your example. Since you have maven.jar.org.apache.maven.maven should it just be maven.jar.maven.maven ?
Hide
Carlos Sanchez added a comment -

Remember to allow other dependency types
maven.war.[]
maven.ejb.[]

Show
Carlos Sanchez added a comment - Remember to allow other dependency types maven.war.[] maven.ejb.[]
Hide
Brett Porter added a comment -

Archimedas: yes, now it is maven.maven. Sorry, I was thinking in future-tense

Carlos: good point. To make it more clear, perhaps:
maven.override.jar.groupId.artifactId = <version | filename>

I know its long, but it should suffice.

Show
Brett Porter added a comment - Archimedas: yes, now it is maven.maven. Sorry, I was thinking in future-tense Carlos: good point. To make it more clear, perhaps: maven.override.jar.groupId.artifactId = <version | filename> I know its long, but it should suffice.

People

Vote (2)
Watch (6)

Dates

  • Created:
    Updated: