maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Digana (JIRA)" <j...@codehaus.org>
Subject [jira] (MNG-5540) Simplyfied form of overridden scope on transitive dependencies
Date Tue, 03 Dec 2013 18:31:45 GMT

    [ https://jira.codehaus.org/browse/MNG-5540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336710#comment-336710
] 

Tibor Digana edited comment on MNG-5540 at 12/3/13 12:30 PM:
-------------------------------------------------------------

@Robert
Once we added two artifacts with same groupId and artifactId but two different scope (test,
compile).
The Maven printed a warning but we had to do it for some reason which I do not remember now.

Having different versions/classifiers with different scope is like having different modules.
I see that feature you mentioned above very challenging, but due to the inheritance in Maven
it would be quite risky unless critical bugs are fixed now.

I think the approach in Maven might be similar to other concepts like when you have ORM and
JAXB namespace just in one XML, and to add an extension into Maven which would patch the behavior
in the way defined by foreign schema.
When the day comes, the Maven can take over some features or their modifications into own
schema with new version.

Since the Maven is getting slow, a new kind of extendability of this tool may increase the
popularity and show the direction with Maven.
The concept of XML structure of a build and life-cycle is revolutionary, the same concept
stops the ability to extend it.
                
      was (Author: tibor17):
    @Robert
Once we added two artifacts with same groupId and artifactId but two different scope (test,
compile).
The Maven printed a warning but we had to do it for some reason which I do not remember now.

Having different versions/classifiers with different scope is like having different modules.
I see that feature you mentioned above very challenging, but due to the inheritance in Maven
it would be quite risky unless critical bugs are fixed now.

I think the approach in Maven might be similar to other concepts like when you have ORM and
JAXB namespace just in one XML, and to add an extension into Maven which would patch the behavior
in the way defined by foreign schema.
When the day comes, the Maven can take over some features or their modifications into own
schema with new version.

Since the Maven is getting slow, the extendability of this tool may increase the popularity
and show the direction with Maven.
The concept of XML structure of a build and life-cycle is revolutionary, the same concept
stops the ability to extend it.
                  
> Simplyfied form of overridden scope on transitive dependencies
> --------------------------------------------------------------
>
>                 Key: MNG-5540
>                 URL: https://jira.codehaus.org/browse/MNG-5540
>             Project: Maven 2 & 3
>          Issue Type: New Feature
>          Components: Dependencies
>    Affects Versions: 3.1.1
>            Reporter: Tibor Digana
>            Priority: Critical
>
> I am thinking of a new feature since Maven's exclusion are two steps process in practice.
> In order to change the scope from compile to provided on transitive dependency you exclude
dependency via
> {code:xml}
> <dependencies>
>  <dependency>
>  ...
>  <exludes>
>   <exclude>
>    ... transitive dependency ...
>   </exclude>
>  </exludes>
>  </dependency>
> </dependencies>
> {code}
> Then put such transitive {{</dependency>}} with {{scope=provided}} which was excluded
above.
> {code:xml}
> <dependencies>
>  <dependency>
>  ...
>  <scope>provided</scope>
>  </dependency>
> </dependencies>
> {code}
> This is waste because you have to touch the exc.dependency twice and the POM xml is getting
huge.
> Maybe another syntax would simplify:
> {code:xml}
> <dependencies>
>  <dependency>
>   ...
>   <includes/>
>    <include/>
>      ... transitive dependency ...
>      <scope>provided</scope>
>    <include/>
>   <includes/>
>  </dependency>
> </dependencies>
> {code}
> Validation should fail if no such transitive dependency in includes section is specified
for the wrapping dependency.
> If the transitive dependency is specified in other sections or inherited, the scopes
should be merged.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message