[
https://issues.apache.org/jira/browse/MNG-7039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matt Pavlovich updated MNG-7039:
--------------------------------
Description:
Provide the ability to reference maven artifacts using a uri-like syntax
reduces verbosity.
Reasoning:
1. The XML elements for groupId, artifactId, version, classifier and type are
never extended
2. Reducing lines of text improves maintenance of pom's
3. URI is a first-class citizen in XML schema and can be strongly typed, and
regex'd.
4. Maven GAV(CT) as a uri makes sense, since they are both coordinates of sorts.
5. Addition of an attribute in the <dependency/> element allows for backwards
compatibility
Challenges:
1. Requires the uri to be parsed for variable substitution (esp version)
Option 1-- classifier and type as query params (probably more useful):
{noformat}
Given:
<dependency>
<groupId>com.company</groupId>
<artifactId>foo-api</artifactId>
<version>1.0.1-SNAPSHOT</version>
<classifier>default</classifier>
<type>jar</jar>
</dependency>
Maven 4.x feature:
<dependency
uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT?classifier=default&type=jar"
scope="compile"/>
w/ properties:
<dependency
uri="mvn:com.company/foo-api/${project.version}?classifier=default&type=jar"
scope="compile"/>
-or urn style-
<dependency
urn="mvn:com.company:foo-api:${project.version}?classifier=default&type=jar"
scope="compile"/>
{noformat}
Option 2-- classifier and type as path params:
{noformat}
<dependency uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT/default/jar"
scope="compile"/>
{noformat}
was:
Provide the ability to reference maven artifacts using a uri-like syntax
reduces verbosity.
Reasoning:
1. The XML elements for groupId, artifactId, version, classifier and type are
never extended
2. Reducing lines of text improves maintenance of pom's
3. URI is a first-class citizen in XML schema and can be strongly typed, and
regex'd.
4. Maven GAV(CT) as a uri makes sense, since they are both coordinates of sorts.
5. Addition of an attribute allows for backwards compatibility
Challenges:
1. Requires the uri to be parsed for variable substitution (esp version)
Option 1-- classifier and type as query params (probably more useful):
{noformat}
Given:
<dependency>
<groupId>com.company</groupId>
<artifactId>foo-api</artifactId>
<version>1.0.1-SNAPSHOT</version>
<classifier>default</classifier>
<type>jar</jar>
</dependency>
Maven 4.x feature:
<dependency
uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT?classifier=default&type=jar"
scope="compile"/>
w/ properties:
<dependency
uri="mvn:com.company/foo-api/${project.version}?classifier=default&type=jar"
scope="compile"/>
-or urn style-
<dependency
urn="mvn:com.company:foo-api:${project.version}?classifier=default&type=jar"
scope="compile"/>
{noformat}
Option 2-- classifier and type as path params:
{noformat}
<dependency uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT/default/jar"
scope="compile"/>
{noformat}
> [RFC] Reducing GAV verbosity by using URI syntax
> ------------------------------------------------
>
> Key: MNG-7039
> URL: https://issues.apache.org/jira/browse/MNG-7039
> Project: Maven
> Issue Type: Improvement
> Reporter: Matt Pavlovich
> Priority: Major
>
> Provide the ability to reference maven artifacts using a uri-like syntax
> reduces verbosity.
> Reasoning:
> 1. The XML elements for groupId, artifactId, version, classifier and type are
> never extended
> 2. Reducing lines of text improves maintenance of pom's
> 3. URI is a first-class citizen in XML schema and can be strongly typed, and
> regex'd.
> 4. Maven GAV(CT) as a uri makes sense, since they are both coordinates of
> sorts.
> 5. Addition of an attribute in the <dependency/> element allows for backwards
> compatibility
> Challenges:
> 1. Requires the uri to be parsed for variable substitution (esp version)
> Option 1-- classifier and type as query params (probably more useful):
> {noformat}
> Given:
> <dependency>
> <groupId>com.company</groupId>
> <artifactId>foo-api</artifactId>
> <version>1.0.1-SNAPSHOT</version>
> <classifier>default</classifier>
> <type>jar</jar>
> </dependency>
> Maven 4.x feature:
> <dependency
> uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT?classifier=default&type=jar"
> scope="compile"/>
> w/ properties:
> <dependency
> uri="mvn:com.company/foo-api/${project.version}?classifier=default&type=jar"
> scope="compile"/>
> -or urn style-
> <dependency
> urn="mvn:com.company:foo-api:${project.version}?classifier=default&type=jar"
> scope="compile"/>
> {noformat}
> Option 2-- classifier and type as path params:
> {noformat}
> <dependency uri="mvn:com.company/foo-api/1.0.1-SNAPSHOT/default/jar"
> scope="compile"/>
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)