[ 
http://jira.codehaus.org/browse/MNG-1412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_93315
 ] 

Bryan Cooper commented on MNG-1412:
-----------------------------------

Perhaps an ordering attribute on the dependency itself would help in ordering.  
By default, the attribute doesn't need to be specified in the pom, but, be used 
by the module responsible for ordering the dependencies to store the default 
pom order of dependencies.  This would also enable a simple sort via the 
Collections.sort utility.

                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                                                                
<classpathOrder>1</classpathOrder>        <-- New attribute
                </dependency>

The attribute should be respected for building classpaths and even for adding a 
classpath to a manifest file.
Also, transitive dependencies shoud be included directly prior to their first 
occurrance, but, not before.
Hope to see some news on this issue soon.

> dependency sorting in classpath
> -------------------------------
>
>                 Key: MNG-1412
>                 URL: http://jira.codehaus.org/browse/MNG-1412
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Mark Hobson
>            Assignee: fabrizio giustina
>             Fix For: 2.1.x
>
>         Attachments: artifact-order_maven-artifact-manager.txt, 
> artifact-order_maven-artifact.txt, artifact-order_maven-project.txt, 
> MNG-1412-maven-2.0.x-r507746.patch
>
>
> The .classpath file entries should be ordered by nearest transitiveness (if 
> that's a word).
> For example, I have project A that depends on B that depends on C.  The 
> classpath for A is generated in the order C, B.  Ideally the classpath should 
> be in order of how near they are to the project, i.e. B, C.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to