You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dsilve <da...@gmail.com> on 2013/10/18 15:00:51 UTC

dependency build-classpath returns wrong order

Hi,
I am using the maven-dependency-plugin version 2.8.
If I run "mvn dependency:build-classpath" for one of my project I get the
correct order of the dependencies, but if I generate the classpath in the
maven build itself of my project then the order is messed up.
The plugin configuration I am using (from the effective pom) is below. 
I also tried using older versions of this plugin. 
Why is the order different for the same project and the same version of the
dependency plugin?

       <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>build-classpath</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>build-classpath</goal>
            </goals>
            <configuration>
              <excludeScope>provided</excludeScope>
              <prefix>\</prefix>
              <pathSeparator>;</pathSeparator>
              <outputFile>classpath.txt</outputFile>
              <useBaseVersion>true</useBaseVersion>
            </configuration>
          </execution>
....



--
View this message in context: http://maven.40175.n5.nabble.com/dependency-build-classpath-returns-wrong-order-tp5773306.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: dependency build-classpath returns wrong order

Posted by dsilve <da...@gmail.com>.
I have been able to understand where the issue is, but not how to solve it.
The wrong classpath is generated when I use the configuration property
"excludeScope=provided".

So if I run:
mvn dependency:build-classpath 
I get the correct classpath, but if I run:
mvn dependency:build-classpath -DexcludeScope=provided
then the classpath has a weird order that doesn't correspond to the
dependency tree.

Is this a known bug of the dependency plugin?



--
View this message in context: http://maven.40175.n5.nabble.com/dependency-build-classpath-returns-wrong-order-tp5773306p5773488.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org