You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Jörg von Frantzius <jf...@web.de> on 2009/05/22 23:56:29 UTC

Again: runtck.iut and datanucleus trunk

Hi,

again I'm stumbling on the problem of running the tck against
datanucleus as "implementation under test". Michelle had written previously:
> From 	Michelle Caisse <mc...@sonic.net>
> Subject 	Re: runtck.iut
> Date 	Fri, 03 Apr 2009 04:00:00 GMT
> I just checked in a fix for this problem. When the tck datanucleus 
> dependencies change, both jdo.jdori.classpath in maven.xml and 
> iut.runtck.classpath in build.properties need to be updated in parallel. 
> The latter is used when runtck.iut is invoked.
>
> -- Michelle
>         
>
So I copied my datanucleus 1.1.4-snapshot jars to tck2/iut_jars and
changed tck2/build.properties as follows:
iut.runtck.classpath =
${jta.jarfile}${path.separator}${xmlparser}${path.separator}${asm.jarfile}${path.separator}${logging.log4j.jarfile}

Yet still I end up with datanucleus twice in the classpath, seemingly
because the RI is drawn in as a maven dependency:

        [java] Exception in thread "main" Plugin (Bundle)
    "org.datanucleus" is already registered. Ensure you dont have
    multiple JAR versions of the same plugin in the classpath. The URL
    "file:/home/joerg/jdo/trunk/tck2/iut_jars/datanucleus-core-1.1.4-SNAPSHOT.jar"
    is already registered, and you are trying to register an identical
    plugin located at URL
    "file:/home/joerg/.maven/repository/org.datanucleus/jars/datanucleus-core-1.1-SNAPSHOT.jar."
        [java] org.datanucleus.exceptions.NucleusException: Plugin
    (Bundle) "org.datanucleus" is already registered. Ensure you dont
    have multiple JAR versions of the same plugin in the classpath. The
    URL
    "file:/home/joerg/jdo/trunk/tck2/iut_jars/datanucleus-core-1.1.4-SNAPSHOT.jar"
    is already registered, and you are trying to register an identical
    plugin located at URL
    "file:/home/joerg/.maven/repository/org.datanucleus/jars/datanucleus-core-1.1-SNAPSHOT.jar."
        [java]      at [..]

The only way around this probably is to overwrite the RI jars in the
local maven1 repo with the datanucleus 1.1.4-SNAPSHOT jars originating
from building with maven2, but using the maven1 names of the RI. That's
not a very clean approach, though...

I'm asking because maven1 build support has been dropped entirely from
datanucleus, so the jars cannot be put into the local maven1 repo by
simply building datanucleus (with maven1).

I don't know if conditional dependencies in maven1 are feasible at all?
With maven2, a clean way to do it would be profiles. Just to have
mentioned it ;)

Regards,
Jörg

Re: Again: runtck.iut and datanucleus trunk

Posted by Andy Jefferson <an...@datanucleus.org>.
> I'm asking because maven1 build support has been dropped entirely from
> datanucleus, so the jars cannot be put into the local maven1 repo by
> simply building datanucleus (with maven1).

While building using M1 has been dropped, the jars are still actually put in 
the DN M1 nightly repo (from the M2 repo), but using versions like 
1.1.4-SNAPSHOT etc.



-- 
Andy  (DataNucleus - http://www.datanucleus.org)

Re: Again: runtck.iut and datanucleus trunk

Posted by Michelle Caisse <mc...@sonic.net>.
Hi Jörg,

You are right that the TCK was not designed for the RI to be run just 
like any IUT, but only with the RI jars listed as dependencies. Since 
this is a special case, the cleanest solution is probably to change the 
dependencies in project.xml to name the DataNucleus version that you 
want to run against and manually drop the jars into your local 
repository. Also, instead of manually copying the jars you could change 
maven.repo.remote in project.properties to list a URL from which the 
jars could be downloaded by maven.

-- Michelle

Jörg von Frantzius wrote:
> Hi,
>
> again I'm stumbling on the problem of running the tck against
> datanucleus as "implementation under test". Michelle had written previously:
>   
>> From 	Michelle Caisse <mc...@sonic.net>
>> Subject 	Re: runtck.iut
>> Date 	Fri, 03 Apr 2009 04:00:00 GMT
>> I just checked in a fix for this problem. When the tck datanucleus 
>> dependencies change, both jdo.jdori.classpath in maven.xml and 
>> iut.runtck.classpath in build.properties need to be updated in parallel. 
>> The latter is used when runtck.iut is invoked.
>>
>> -- Michelle
>>         
>>
>>     
> So I copied my datanucleus 1.1.4-snapshot jars to tck2/iut_jars and
> changed tck2/build.properties as follows:
> iut.runtck.classpath =
> ${jta.jarfile}${path.separator}${xmlparser}${path.separator}${asm.jarfile}${path.separator}${logging.log4j.jarfile}
>
> Yet still I end up with datanucleus twice in the classpath, seemingly
> because the RI is drawn in as a maven dependency:
>
>         [java] Exception in thread "main" Plugin (Bundle)
>     "org.datanucleus" is already registered. Ensure you dont have
>     multiple JAR versions of the same plugin in the classpath. The URL
>     "file:/home/joerg/jdo/trunk/tck2/iut_jars/datanucleus-core-1.1.4-SNAPSHOT.jar"
>     is already registered, and you are trying to register an identical
>     plugin located at URL
>     "file:/home/joerg/.maven/repository/org.datanucleus/jars/datanucleus-core-1.1-SNAPSHOT.jar."
>         [java] org.datanucleus.exceptions.NucleusException: Plugin
>     (Bundle) "org.datanucleus" is already registered. Ensure you dont
>     have multiple JAR versions of the same plugin in the classpath. The
>     URL
>     "file:/home/joerg/jdo/trunk/tck2/iut_jars/datanucleus-core-1.1.4-SNAPSHOT.jar"
>     is already registered, and you are trying to register an identical
>     plugin located at URL
>     "file:/home/joerg/.maven/repository/org.datanucleus/jars/datanucleus-core-1.1-SNAPSHOT.jar."
>         [java]      at [..]
>
> The only way around this probably is to overwrite the RI jars in the
> local maven1 repo with the datanucleus 1.1.4-SNAPSHOT jars originating
> from building with maven2, but using the maven1 names of the RI. That's
> not a very clean approach, though...
>
> I'm asking because maven1 build support has been dropped entirely from
> datanucleus, so the jars cannot be put into the local maven1 repo by
> simply building datanucleus (with maven1).
>
> I don't know if conditional dependencies in maven1 are feasible at all?
> With maven2, a clean way to do it would be profiles. Just to have
> mentioned it ;)
>
> Regards,
> Jörg
>
>
>