In my multiproject, I use commons-lang. In my pom.xml (atend) I have the
dependency set (excluded once to avoid a conflict).

However, the build sometimes fails, but not always, trying to find a class
in commons-lang. Doing a mvn -X shows it isn't present
on the test classpath.

Is there some way I can persuade it to be on the classpath correctly?

<dependency>
     <groupId>acegisecurity</groupId>
     <artifactId>acegi-security</artifactId>
     <version>1.0.0</version>
     <exclusions>
       <exclusion>
         <!-- don't use this old version of commons-lang -->
         <artifactId>commons-lang</artifactId>
         <groupId>commons-lang</groupId>
       </exclusion>
...
<dependency>
...
<dependency>
     <!-- this ought to be fetched transitively -->
     <groupId>commons-lang</groupId>
     <artifactId>commons-lang</artifactId>
     <version>2.1</version>
     <type>jar</type>
     <scope>test</scope>
   </dependency>

Reply via email to