You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leif Mortenson <le...@tanukisoftware.com> on 2003/05/28 05:34:42 UTC
[Fortress] Datasource and meta info
Currently the datasource project is divided into 3 jar files:
excalibur-datasource-1.1.1.jar
excalibur-datasource-ids-1.1.1a.jar
excalibur-datasource-cluster-1.1.1a.jar
The build as is is generating the following files in the
META-INF/services directory
org.apache.avalon.excalibur.datasource.cluster.HashedDataSourceCluster
org.apache.avalon.excalibur.datasource.cluster.IndexedDataSourceCluster
org.apache.avalon.excalibur.datasource.cluster.RoundRobinDataSourceCluster
org.apache.avalon.excalibur.datasource.DataSourceComponent
org.apache.avalon.excalibur.datasource.ids.IDGenerator
The problem is that they are all being placed into the first jar file.
If I attempt
to start Fortress with only the excalibur-datasource-1.1.1.jar present, then
I will get errors about fortress not being able to find the other classes.
Even if I copy all 3 jars into the Fortress classpath, I still am
getting an error
about IDGenerator not being found, even though the jar file exists and the
is in there. I was wondering if this was a problem with the order in
which the
jars are being scanned or something like that?
I attempted to modify the datasource build.xml file so that each jar would
contain only the service files contained in that jar so that I could remove
the other two unused jars from Fortress. But when I start fortress, I would
get errors about the various cluster classes not being found. I think
this is
being caused by their being referenced in the DataSourceComponent service
file.
What are the meta files for these 3 jars supposed to contain? The
cluster and ids jars should be completely optional. The datasource project
is actually turning out to be a good example as getting it to work should
show me how to get my own project jars set up correctly.
Cheers,
Leif
By the way, here is the diff of the datasource build.xml showing how I
attempted to break out the service info for the 3 classes. I am thinking
that it may be necessary to run the fortress collect meta task 3 different
times to make sure that the resulting files for each jar are completely
independent.
Index: build.xml
===================================================================
RCS file: /home/cvs/avalon-excalibur/datasource/build.xml,v
retrieving revision 1.50
diff -u -r1.50 build.xml
--- build.xml 27 May 2003 15:13:20 -0000 1.50
+++ build.xml 28 May 2003 03:31:53 -0000
@@ -213,6 +213,8 @@
<exclude name="**/test/**"/>
<exclude name="**/cluster/**"/>
<exclude name="**/ids/**"/>
+ <exclude name="**/org.apache.avalon.excalibur.datasource.cluster.*"/>
+ <exclude name="**/org.apache.avalon.excalibur.datasource.ids.*"/>
<zipfileset dir="${build.conf}" prefix="META-INF/">
<include name="LICENSE.txt"/>
</zipfileset>
@@ -230,6 +232,7 @@
<attribute name="Implementation-Version" value="${package-version}"/>
</manifest>
<include name="**/cluster/**"/>
+ <include name="**/org.apache.avalon.excalibur.datasource.cluster.*"/>
<zipfileset dir="${build.conf}" prefix="META-INF/">
<include name="LICENSE.txt"/>
</zipfileset>
@@ -247,6 +250,7 @@
<attribute name="Implementation-Version" value="${package-version}"/>
</manifest>
<include name="**/ids/**"/>
+ <include name="**/org.apache.avalon.excalibur.datasource.ids.*"/>
<zipfileset dir="${build.conf}" prefix="META-INF/">
<include name="LICENSE.txt"/>
</zipfileset>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [Fortress] Datasource and meta info
Posted by Leif Mortenson <le...@tanukisoftware.com>.
Anton,
Actually I tried this exact thing yesterday. Great minds think alike.
It was not working because the services.list file for the main jar still
contained references to the services from all 3 jars.
But good news is that I just tried it again, and it is now working
correctly.
Someone must have fixed something over night.
I just committed the changes to the build.xml and default.properties
files
to implement this.
Give it a try, it seems to be working great.
Cheers,
Leif
Anton Tagunov wrote:
>Hello Leif!
>
>Its weird but I have one way to go:
>we need a separate services.list for each jar.
>Right?
>
>The only thing I can think of is to create
>a spearate directory under build for fortress meta-info
>(let's call it ./build/fortress.meta, just to have a name)
>and one subdir under it per each jar.
>
>Then we should run three separate collect-meta tasks
>with varying filesets each time and outputting to their
>respecive directories under ./build/fortress.meta
>
>Then we should correctly pack our jars.
>
>Probably if collect-meta task in this scenario
>does not produce correct results we should fix collect-meta.
>
>That's in theory ;-)
>
>WBR, Anton
>
>LM> Currently the datasource project is divided into 3 jar files:
>LM> excalibur-datasource-1.1.1.jar
>LM> excalibur-datasource-ids-1.1.1a.jar
>LM> excalibur-datasource-cluster-1.1.1a.jar
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [Fortress] Datasource and meta info
Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Leif!
Its weird but I have one way to go:
we need a separate services.list for each jar.
Right?
The only thing I can think of is to create
a spearate directory under build for fortress meta-info
(let's call it ./build/fortress.meta, just to have a name)
and one subdir under it per each jar.
Then we should run three separate collect-meta tasks
with varying filesets each time and outputting to their
respecive directories under ./build/fortress.meta
Then we should correctly pack our jars.
Probably if collect-meta task in this scenario
does not produce correct results we should fix collect-meta.
That's in theory ;-)
WBR, Anton
LM> Currently the datasource project is divided into 3 jar files:
LM> excalibur-datasource-1.1.1.jar
LM> excalibur-datasource-ids-1.1.1a.jar
LM> excalibur-datasource-cluster-1.1.1a.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: [Fortress] Datasource and meta info
Posted by Berin Loritsch <bl...@apache.org>.
Leif Mortenson wrote:
>
> What are the meta files for these 3 jars supposed to contain? The
> cluster and ids jars should be completely optional. The datasource project
> is actually turning out to be a good example as getting it to work should
> show me how to get my own project jars set up correctly.
You are correct.
--
"You know the world is going crazy when the best
rapper is a white guy, the best golfer is a black guy,
The Swiss hold the America's Cup, France is
accusing the US of arrogance, and Germany doesn't want
to go to war. And the 3 most powerful men in America
are named 'Bush', 'Dick', and 'Colon' (sic)".
-----Chris Rock
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org