Doesn't the jmock2 contains the classes of jmock1 as well?

On 4/25/07, Jörg Schaible <[EMAIL PROTECTED]> wrote:

Jason van Zyl wrote on Wednesday, April 25, 2007 3:26 PM:

> On 25 Apr 07, at 9:00 AM 25 Apr 07, Jörg Schaible wrote:
>
>> Jason van Zyl wrote on Wednesday, April 25, 2007 2:41 PM:
>>
>>> On 25 Apr 07, at 8:09 AM 25 Apr 07, Jörg Schaible wrote:
>>>
>>>> Hi devs,
>>>>
>>>> how will Maven handle the problem of a dependency that should be
>>>> used in two different versions? This applies to all project that
>>>> release a new (normally major) version that can be used with the
>>>> old version at the same time. This is currently possible at least
>>>> with:
>>>>
>>>> jmock 1.x / jmock 2.x
>>>> webworks 1.x / webworks 2.x
>>>>
>>>> Maven supprts currently only two "versions" of sa dep if
>>>> "groupId:artifactId" is different between those two versions/
>>>> branches, but this might not be always the case. In Gentoo Linux
>>>> such a situation is solved by introducing a "slot" indicating two
>>>> different development trees that can be installed at the same time.
>>>> For Maven this would mean that the separation between (main)
>>>> artifacts should switch to "groupId:artifactId:slot", where slot
>>>> is 0 by default
>>>>
>>>> Is there already a proposal or doc for such kind of functionality
>>>> in a future release that I might have been missed?
>>>>
>>>
>>> Sorry, I'm not sure I fully understand what you're talking about. If
>>> you want a specific version of something why would we use a slot,
>>> when you can specify the version? If you want to use Webwork
>>> 1.x then
>>> you specify the version. Many versions sit happily together in the
>>> repository. Or are you talking about behavior that should be
>>> constricted to a certain version range? For example, in
>>> selecting the
>>> latest version of the 1.x family?
>>>
>>> I'm honestly not sure what you're talking about. Maybe a problem
>>> trying to translate Gentoo speak to Maven?
>>
>> Maven speek:
>>
>> <dependencies>
>>   <dependency>
>>     <groupId>jmock</groupId>
>>     <artifactId>jmock</artifactId>
>>     <version>1.2.0</version>
>>   </dependency>
>>   <dependency>
>>     <groupId>jmock</groupId>
>>     <artifactId>jmock</artifactId>
>>     <version>2.0.0</version>
>>   </dependency>
>> </dependencies>
>>
>> jMock 2.x is designed to be used at the same time as jMock 1.x. My
>> code uses both. So how can I define the deps?
>>
>
> First I'll ask why you are using both versions in one project and
> then I'll answer your question.

Becasue I have 1000 of old unit tests with jMock 1.x, I am switching my
project to JDK 5 and write my new unit tests with improved DSL and
annotation support of jMock 2.x. No need at all to to convert the 1000 old
tests (some might be converted over time). This is exaclty why jMock 1.xand 
jMock
2.x is designed to be used at the same time.

- Jörg

BTW: The same problem appears if your deps depend transitively on two
development branches of the same artifact, that are classloader compatible
(different class names) and might be used at the same time.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to