[jbosscache-dev] Cache Loader migration code

Brian Stansberry brian.stansberry at redhat.com
Fri Aug 17 14:51:20 EDT 2007


Galder Zamarreno wrote:
> Brian/Manik,
> 
> As part of cacheloader-migration subproject in maven, I wanna to pull AS 
> 4.0.3's jboss-minimal.jar so that I can build the migration jar.
> 
> I've been digging through this and got a few questions:
> 
> 1.- What's the difference between http://repository.jboss.com/, 
> http://repository.jboss.org/ and http://repository.jboss.org/maven2? 
> IIRC, repository.jboss.com is for AS ant builds. The 
> http://repository.jboss.org/maven2 seems to be for maven builds. There 
> seem to be differences between them. For example .com contains 
> jbossas/core-libs/ whereas neither of the other two URLs do.
> 

http://repository.jboss.org is used by the AS build.
http://repository.jboss.org/maven2 is used by the maven builds.
http://repository.jboss.com is a legacy version of repository.jboss.org

They match only to the extent that people need them to and expend effort 
to make it happen. So your missing core-libs issue doesn't surprise me.

> 2.- I'm new to these repositories. Is there a way to search through 
> these repositories without checking out the whole repo?
> 

What kind of search? A browser is a pretty easy way to poke around and 
see what's there.  Beyond that, you can just check out pieces; svn 
doesn't make you checkout out the whole thing.

> 3.- Seeing that JBC uses http://repository.jboss.org/maven2, would it be 
> possible to create 
> http://repository.jboss.org/maven2/jbossas/core-libs/4.0.3/lib and 
> upload there the jboss-minimal.jar that I'm interested in? Can you think 
> a better place for it? Adding it should as easy as checking it out 
> http://repository.jboss.org/maven2/jbossas/, creating the lib dir and 
> uploading the jar.
> 

You'd need to make a pom, at least a trivial one a la 
http://repository.jboss.org/maven2/jgroups/jgroups/2.2.8/jgroups-2.2.8.pom

Suggest you contact Paul Gier (copied) and get his input on how he'd 
want this done. If you add a dir to maven2 with a naming scheme contrary 
to the long-term direction, he's just going to have to fix it some day.

> Cheers,
> 
> Galder Zamarreno wrote:
>> Manik,
>>
>> The library pulled for cacheloader-migration is incorrect:
>>
>>       <dependency>
>>          <groupId>org.jboss.aop</groupId>
>>          <artifactId>jboss-aop</artifactId>
>>          <version>2.0.0-SNAPSHOT</version>
>>       </dependency>
>>
>> The unit tests are designed to generate 1.x format stores and 
>> transform them to 2.x. It assumes that you have migration's 
>> lib/jboss-minimal (from 4.0.3) in the junit classpath.
>>
>> However, these tests would still work if you use a later MS 
>> (MarshalledValue) class because in the test you're both generating the 
>> store and tranforming it. It was never my intention to pull AOP 2.0 to 
>> get MS, the idea was to have MS from migration/lib/jboss-minimal from 
>> 4.0.3:
>>
>>    <path id="migration.library.classpath">
>>       <fileset dir="${retro.lib.dir}">
>>          <include name="jboss-logging-spi.jar"/>
>>       </fileset>
>>       <fileset dir="${migration.lib.dir}">
>>          <include name="*.jar"/>
>>       </fileset>
>>    </path>
>>
>>    <target name="functionaltests-migration" 
>> depends="compile-cache,test-jar,unittests-init"
>>            description="Runs cache loader functional tests">
>>       <property name="jgroups.stack" value="udp"/>
>>       <echo>Running functional tests using ${jgroups.stack} jgroups 
>> stack</echo>
>>       <junit printsummary="yes" timeout="${junit.timeout}" fork="yes" 
>> maxmemory="512m">
>>          <classpath refid="library.classpath"/>
>>          <classpath refid="output.classpath"/>
>>          <classpath refid="migration.library.classpath"/>
>>          <classpath refid="migration.output.classpath"/>
>>          <jvmarg value="-Dbind.address=${bind.address}"/>
>>          <jvmarg value="-Dsun.lang.ClassLoader.allowArraySyntax=true"/>
>>          <jvmarg value="-Djgroups.stack=${jgroups.stack}"/>
>>          <jvmarg value="-Djava.net.preferIPv4Stack=true"/>
>>          <jvmarg value="-Dtest.jar.dir=${output.dir}"/>
>>          <jvmarg value="-Dlib.dir=${lib.dir}"/>
>>          <formatter 
>> classname="org.jboss.cache.util.XMLUnitTestFormatter" usefile="true"
>>                     extension="-${jgroups.stack}.xml"/>
>>          <batchtest todir="${build.reports}">
>>             <fileset dir="${migration.functional.tests.dir}">
>>                <include name="**/*Test.*"/>
>>                <patternset refid="junit.excludes"/>
>>             </fileset>
>>          </batchtest>
>>       </junit>
>>    </target>
>>
>>
>> I didn't wanna make the UTs rely on 1.x (generated with JBC 1.x) 
>> produced stores, which is why I created the examples. examples/data 
>> contains stores generated with JBC 1.x and I bet (need to try) that if 
>> you try running the examples, they will fail.
>>
>> Now, how to pull jboss-minimal from 4.0.3 (which is what JBC 1.x uses) 
>> from maven is unknown to me right now. I need a bit of time to sort 
>> this out.
>>
>> Thanks for your patience.
>>
>> Galder Zamarreno wrote:
>>> Ok, I'll look into it. Don't think I'll have time to look into it 
>>> today though. I'll try doing it this evening.
>>>
>>> Manik Surtani wrote:
>>>> Do a mvn install though - the dependencies it packages in the zip 
>>>> file is horrendous!  :)
>>>>
>>>> On 15 Aug 2007, at 11:45, Galder Zamarreno wrote:
>>>>
>>>>>
>>>>>
>>>>> Manik Surtani wrote:
>>>>>> Ok, here you go
>>>>>>     https://svn.jboss.org/repos/jbosscache/cacheloader_migration/
>>>>>> Tests run and everything works, just wondering why you need 
>>>>>> MarshalledValue and whether there is an easier way around this 
>>>>>> (currently pulls in JBoss AOP and a whole lot of crap for this one 
>>>>>> file)
>>>>>
>>>>> It's JBoss AOP stuff we used in JBC 1.x to marshall data to some 
>>>>> cache loaders (File and JDBC), hence I need it so that I can 
>>>>> transform 1.x data to 2.x. At the time, I couldn't find any other 
>>>>> way of dealing with this as the this class had 
>>>>> changed/moved/did-not-exist (can't remember exactly which of the 3) 
>>>>> in AOP used in 2.x.
>>>>>
>>>>>> On 15 Aug 2007, at 08:57, Galder Zamarreno wrote:
>>>>>>> Manik Surtani wrote:
>>>>>>>> Sort of.
>>>>>>>
>>>>>>> I guessed so. I used Maven 1.0 around 3 years ago and I do 
>>>>>>> remember the pains of it :)
>>>>>>>
>>>>>>>> I guess it could live on the top level, alongside core and pojo 
>>>>>>>> as 'migration' and have a dependency on core.
>>>>>>>
>>>>>>> That sounds fine by me.
>>>>>>>
>>>>>>>> On 15 Aug 2007, at 08:48, Galder Zamarreno wrote:
>>>>>>>>> Manik Surtani wrote:
>>>>>>>>>> Guys,
>>>>>>>>>> Does this still need to live in 2.1.0?  Can I delete it from 
>>>>>>>>>> here?  It is still in the 2.0.0 src tree.
>>>>>>>>>
>>>>>>>>> I guess u're refering to the code I wrote to migrate a 1.x 
>>>>>>>>> cache store to 2.0 format? Ideally, I'd like it to be there for 
>>>>>>>>> the duration of the 2.x branch in case someone uploads directly 
>>>>>>>>> from 1.x to 2.1. Is it causing you any troubles with maven?
>>>>>>>>>
>>>>>>>>>> Cheers,
>>>>>>>>>> -- 
>>>>>>>>>> Manik Surtani
>>>>>>>>>> Lead, JBoss Cache
>>>>>>>>>> JBoss, a division of Red Hat
>>>>>>>>>> _______________________________________________
>>>>>>>>>> jbosscache-dev mailing list
>>>>>>>>>> jbosscache-dev at lists.jboss.org
>>>>>>>>>> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> Galder Zamarreño
>>>>>>>>> Sr. Software Maintenance Engineer
>>>>>>>>> JBoss, a division of Red Hat
>>>>>>>> -- 
>>>>>>>> Manik Surtani
>>>>>>>> Lead, JBoss Cache
>>>>>>>> JBoss, a division of Red Hat
>>>>>>>
>>>>>>> -- 
>>>>>>> Galder Zamarreño
>>>>>>> Sr. Software Maintenance Engineer
>>>>>>> JBoss, a division of Red Hat
>>>>>> -- 
>>>>>> Manik Surtani
>>>>>> Lead, JBoss Cache
>>>>>> JBoss, a division of Red Hat
>>>>>
>>>>> -- 
>>>>> Galder Zamarreño
>>>>> Sr. Software Maintenance Engineer
>>>>> JBoss, a division of Red Hat
>>>>
>>>> -- 
>>>> Manik Surtani
>>>>
>>>> Lead, JBoss Cache
>>>> JBoss, a division of Red Hat
>>>>
>>>>
>>>>
>>>
>>
> 


-- 
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry at redhat.com




More information about the jbosscache-dev mailing list