Setting classloader for extra dependencies

View: New views
4 Messages — Rating Filter:   Alert me  

Setting classloader for extra dependencies

by Alexander Brill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

With the <dependencies> tag you can add extra dependencies to the container execution classpath. As I am running Tomcat I'd rather have these extra dependencies get copied into either my common/lib or server/lib directory.

I figured this isn't implemented yet, however I have a bit of time to look into it. But... What would be the best approach to get this as generic as possible from the configuration perspective? One possible solution that comes to mind is:

<dependencies>
  <dependency>
    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <output>jvm | common | server</output>
  </dependency>
</dependencies>

Comments?

--
Alexander Brill
http://brill.no

Re: Setting classloader for extra dependencies

by Matt Wringe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-02-05 at 15:43 +0100, Alexander Brill wrote:
> Hi,
>
> With the <dependencies> tag you can add extra dependencies to the
> container execution classpath. As I am running Tomcat I'd rather have
> these extra dependencies get copied into either my common/lib or
> server/lib directory.

there is the concept of a "sharedclasspath" option that does this, it
currenly only works with ant right now (it shouldn't be too much of a
problem to get the maven extension working with it). And it isn't
documented. It works similar to the extraclasspath option
(http://cargo.codehaus.org/Container+Classpath).

> I figured this isn't implemented yet, however I have a bit of time to
> look into it. But... What would be the best approach to get this as
> generic as possible from the configuration perspective? One possible
> solution that comes to mind is:
>
> <dependencies>
>   <dependency>
>     <groupId>foo</groupId>
>     <artifactId>bar</artifactId>
>     <output>jvm | common | server</output>
>   </dependency>
> </dependencies>
>
> Comments?
>
> --
> Alexander Brill
> http://brill.no


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Setting classloader for extra dependencies

by Alexander Brill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Thu, Feb 5, 2009 at 4:03 PM, Matt Wringe <mwringe@...> wrote:
On Thu, 2009-02-05 at 15:43 +0100, Alexander Brill wrote:
> Hi,
>
> With the <dependencies> tag you can add extra dependencies to the
> container execution classpath. As I am running Tomcat I'd rather have
> these extra dependencies get copied into either my common/lib or
> server/lib directory.

there is the concept of a "sharedclasspath" option that does this, it
currenly only works with ant right now (it shouldn't be too much of a
problem to get the maven extension working with it). And it isn't
documented. It works similar to the extraclasspath option
(http://cargo.codehaus.org/Container+Classpath).


How do I use this with ant, and better yet - which classes should I look at? :)

 


> I figured this isn't implemented yet, however I have a bit of time to
> look into it. But... What would be the best approach to get this as
> generic as possible from the configuration perspective? One possible
> solution that comes to mind is:
>
> <dependencies>
>   <dependency>
>     <groupId>foo</groupId>
>     <artifactId>bar</artifactId>
>     <output>jvm | common | server</output>
>   </dependency>
> </dependencies>
>
> Comments?
>
> --
> Alexander Brill
> http://brill.no


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Alexander Brill
http://brill.no

Re: Setting classloader for extra dependencies

by Matt Wringe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Fri, 2009-02-06 at 10:03 +0100, Alexander Brill wrote:

>
>
> On Thu, Feb 5, 2009 at 4:03 PM, Matt Wringe <mwringe@...>
> wrote:
>         On Thu, 2009-02-05 at 15:43 +0100, Alexander Brill wrote:
>         > Hi,
>         >
>         > With the <dependencies> tag you can add extra dependencies
>         to the
>         > container execution classpath. As I am running Tomcat I'd
>         rather have
>         > these extra dependencies get copied into either my
>         common/lib or
>         > server/lib directory.
>        
>        
>         there is the concept of a "sharedclasspath" option that does
>         this, it
>         currenly only works with ant right now (it shouldn't be too
>         much of a
>         problem to get the maven extension working with it). And it
>         isn't
>         documented. It works similar to the extraclasspath option
>         (http://cargo.codehaus.org/Container+Classpath).
>
>
> How do I use this with ant,
see the bottom of http://cargo.codehaus.org/Container+Classpath is gives
an example of how to extraclasspath, just substitute shared for extra.

> and better yet - which classes should I look at? :)
its spread out among a bunch of classes. For Tomcat look at
AbstractCatalinaStandaloneLocalConfiguration's DoConfigure method to see
how its done in Tomcat.

>  
>        
>        
>         > I figured this isn't implemented yet, however I have a bit
>         of time to
>         > look into it. But... What would be the best approach to get
>         this as
>         > generic as possible from the configuration perspective? One
>         possible
>         > solution that comes to mind is:
>         >
>         > <dependencies>
>         >   <dependency>
>         >     <groupId>foo</groupId>
>         >     <artifactId>bar</artifactId>
>         >     <output>jvm | common | server</output>
>         >   </dependency>
>         > </dependencies>
>         >
>         > Comments?
>         >
>         > --
>         > Alexander Brill
>         > http://brill.no
>        
>        
>        
>         ---------------------------------------------------------------------
>         To unsubscribe from this list, please visit:
>        
>            http://xircles.codehaus.org/manage_email
>        
>        
>
>
>
> --
> Alexander Brill
> http://brill.no


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email