geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: How to reuse the jars in geronimo repository?
Date Thu, 16 Jul 2009 02:04:34 GMT

On Jul 15, 2009, at 6:54 PM, Wureka wrote:

> Hi,
> I use Eclipse 3.4 to develop a WAR application for Geronimo 2.1.4.
> The application needs  commons-collections-3.2.jar. For shrinking my
> application size, I hope to reuse the same jar file in geronimo  
> repository
> if there is the jar my application needs.
> Fortunately I did find that there is the jar in the repository. And  
> I add
> the below dependencies in <dep:dependencies> block in my geronimo- 
> web.xml
>            <dep:dependency>
>                <dep:groupId>commons-collections</dep:groupId>
>                <dep:artifactId>commons-collections</dep:artifactId>
>                <dep:version>3.2</dep:version>
>                <dep:type>jar</dep:type>
>            </dep:dependency>

That should tell geronimo to reuse the jar but AFAIK not eclipse :-)
> However, in Eclipse, I saw the code using the class in
> commons-collections-3.2.jar still has red circle X on the lines  
> where the
> class appears.
> What action do I still need to do for fixing the priblem?

I'm not an eclipse expert.

What I recommend is setting up a geronimo plugin project to  
"predeploy" your war to geronimo.  You'll have 2 maven projects:
- the war project in which you mark the dependency as "provided" so it  
doesn't get into the war
- the plugin project where you include the dependency without any  
scope.  Don't include the <environment> element in your geronimo plan,  
the car-maven-plugin will add it based on the maven pom.

If you then use m2eclipse eclpse will know about your dependency from  
the maven pom.

hope this helps
david jencks

> Thank you for your help.
> -- 
> View this message in context:
> Sent from the Apache Geronimo - Users mailing list archive at  

View raw message