After I upgraded to the latest m2eclipse the builds of out integration tests
started failing.
The reason was this:
I had set up our integration tests so that I could run one side of the
communication with an older version of our product (for compatibility
tests). I did this by setting up two dependencies for the same artifact,
with different scopes (compile and runtime).  (See example below)
This failed in Maven 3, the error message was that I had two dependencies
with the same version. 

Now, I solved my problem by changing the setup of the tests from using
copy-dependencies to using copy (and all the dependencies spelled out in the
configuration). But the previous solution was nicer, in that copy-dependecy
also brought with it the transitive dependencies as well. Now I had to
duplicate 'em by hand instead.

Question: is this intended behavior? Or should the version check look at the
scope as well?

Example:

<dependency>
  <groupId>com.example</groupId>
  <artifactId>component</artifactId>
  <version>${client-side-version}</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>com.example</groupId>
  <artifactId>component</artifactId>
  <version>${server-side-version}</version>
  <scope>runtime</scope>
</dependency>

The jars are copied with maven-dependency-plugin:copy-dependency.
When a developer builds client- and server-side-version are the same. During
compatiblility tests one is pointed to the previous version.

-- 
View this message in context: 
http://old.nabble.com/Maven-3-incompatiblity-tp26492785p26492785.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to