You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brendon Davidson <br...@dimestore.com> on 2008/12/17 21:03:15 UTC

Compiling one module into another

Hello,

We have three projects under a single parent project.  The structure is as follows:

ParentProject
  - Core (jar)
  - Project A (war)
  - Project B (war)

Core is a set of classes that are used for DB access by both Project A and Project B.  

We want to keep the size of the war files down.  We've achieved this so far by setting their dependencies as provided since most of them will change very rarely.  We then provide them locally by adding the dependencies to jetty and we manually add the dependency jars to production.  

Currently, even core is set as provided in projects A and B (otherwise core's dependencies get added to the war which makes the war file huge).  So when we deploy a project, we have to upload the latest core jar into the Tomcat's lib directory and replace the war file with the new war.  This is not the end of the world, but we'd like to get it to where we can simply upload the new war.  Ideally, compiling project A(or B) would also compile the core classes into war file (WEB-INF/classes/...).  

Is this possible?  Thus far, I have been unable to figure out how to get this working the way we want.  Any suggestions would be greatly appreciated.

Thanks,

Brendon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Compiling one module into another

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
I think what you want is the new maven-reactor-plugin. This
functionality isn't yet built into core.

-----Original Message-----
From: Brett Randall [mailto:javabrett@gmail.com] 
Sent: Wednesday, December 17, 2008 5:59 PM
To: Maven Users List
Subject: Re: Compiling one module into another

Hi Brendon,

Perhaps this article on Creating Skinny
WARs<http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wa
rs.html>might
help, demonstrating the use of
packagingExcludes<http://maven.apache.org/plugins/maven-war-plugin/war-m
ojo.html#packagingExcludes>.
 Busting-out the Core library dependency as provided or compiling it
separately into the WAR projects seems like a bit much just to prevent a
bunch of Core's dependencies from shipping ...

Best
Brett

On Thu, Dec 18, 2008 at 7:03 AM, Brendon Davidson
<br...@dimestore.com>wrote:

> Hello,
>
> We have three projects under a single parent project.  The structure
is as
> follows:
>
> ParentProject
>  - Core (jar)
>  - Project A (war)
>  - Project B (war)
>
> Core is a set of classes that are used for DB access by both Project A
and
> Project B.
>
> We want to keep the size of the war files down.  We've achieved this
so far
> by setting their dependencies as provided since most of them will
change
> very rarely.  We then provide them locally by adding the dependencies
to
> jetty and we manually add the dependency jars to production.
>
> Currently, even core is set as provided in projects A and B (otherwise
> core's dependencies get added to the war which makes the war file
huge).  So
> when we deploy a project, we have to upload the latest core jar into
the
> Tomcat's lib directory and replace the war file with the new war.
This is
> not the end of the world, but we'd like to get it to where we can
simply
> upload the new war.  Ideally, compiling project A(or B) would also
compile
> the core classes into war file (WEB-INF/classes/...).
>
> Is this possible?  Thus far, I have been unable to figure out how to
get
> this working the way we want.  Any suggestions would be greatly
appreciated.
>
> Thanks,
>
> Brendon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Compiling one module into another

Posted by Brett Randall <ja...@gmail.com>.
Hi Brendon,

Perhaps this article on Creating Skinny
WARs<http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html>might
help, demonstrating the use of
packagingExcludes<http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#packagingExcludes>.
 Busting-out the Core library dependency as provided or compiling it
separately into the WAR projects seems like a bit much just to prevent a
bunch of Core's dependencies from shipping ...

Best
Brett

On Thu, Dec 18, 2008 at 7:03 AM, Brendon Davidson <br...@dimestore.com>wrote:

> Hello,
>
> We have three projects under a single parent project.  The structure is as
> follows:
>
> ParentProject
>  - Core (jar)
>  - Project A (war)
>  - Project B (war)
>
> Core is a set of classes that are used for DB access by both Project A and
> Project B.
>
> We want to keep the size of the war files down.  We've achieved this so far
> by setting their dependencies as provided since most of them will change
> very rarely.  We then provide them locally by adding the dependencies to
> jetty and we manually add the dependency jars to production.
>
> Currently, even core is set as provided in projects A and B (otherwise
> core's dependencies get added to the war which makes the war file huge).  So
> when we deploy a project, we have to upload the latest core jar into the
> Tomcat's lib directory and replace the war file with the new war.  This is
> not the end of the world, but we'd like to get it to where we can simply
> upload the new war.  Ideally, compiling project A(or B) would also compile
> the core classes into war file (WEB-INF/classes/...).
>
> Is this possible?  Thus far, I have been unable to figure out how to get
> this working the way we want.  Any suggestions would be greatly appreciated.
>
> Thanks,
>
> Brendon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>