Thanks Manos, What I've found so far by looking at the source is that its dependent on how the Set that MavenProject.getArtifacts() orders itself. I still haven't found which impl of Set is used. That would tell us how predictable the order is. My guess is its a HashSet and so the order will be determined by the hashCode of the the Artifact object.
Brian Manos Batsis wrote: > > > > Come on guys let us not give too much attention to eachother :-) > > I dont think Maven's behaviour regarding the order of JARs in the > classpath is random; that would be impossible. > > My guess is the order is predictable and based on the dependencies > configuration and the algorithm that goes over it. Something like > > 1) Scan explicit deps > 2) (Recursive?) Either > 2.A) For each one add it's deps and move to the next depth level OR > 2.B) Add each one, then process the next depth level of deps > 3) Remove the overridden versions > > This is pretty rough but you get the point. My bet is you will always > get the same classpath in a project whose POM does not change. > > This of course may not provide an easy solution to the OPs prob, but the > code is OS after all so anyone is free to modify it as needed and post > patches in the JIRA or whatever :-) > > Cheers, > > Manos > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Setting-jar-order-in-maven.compile.classpath-tf4111876s177.html#a11811974 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
