You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Karthik Manimaran <mk...@gmail.com> on 2005/12/20 17:01:00 UTC

[m2] - WAR file generation

Hi,

I am building a J2EE project. My WAR file includes all the dependency jars
(including the common jars and ejb jars) in the WEB-INF/lib directory. This
creates additional copies of jar files within the EAR file and the size of
the WAR file gets huge. Is there a way to avoid bundling of the dependencies
within the WAR file? The scope attribute value (provided/runtime) doesnt
seem to have an effect on this behaviour.

Thanks and regards,
Karthik.

Re: [m2] - WAR file generation

Posted by Wayne Fay <wa...@gmail.com>.
I'd pull the latest code from SVN, build and install locally, and see
if it works.

Wayne

On 4/12/06, Pat Turner <gr...@ichini.co.uk> wrote:
>
> I tried that first of all, but without success. The latest version at Ibiblio
> is 2.0-beta2, but I think this has been fixed in a later release (2.0-beta3
> ?).
>
> Pat
> --
> View this message in context: http://www.nabble.com/-m2---WAR-file-generation-t778773.html#a3881301
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] - WAR file generation

Posted by Pat Turner <gr...@ichini.co.uk>.
I tried that first of all, but without success. The latest version at Ibiblio
is 2.0-beta2, but I think this has been fixed in a later release (2.0-beta3
?). 

Pat
--
View this message in context: http://www.nabble.com/-m2---WAR-file-generation-t778773.html#a3881301
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] - WAR file generation

Posted by Wayne Fay <wa...@gmail.com>.
Have you tried:

<excludes>
<exclude>**/WEB-INF/lib/*</exclude>
<exclude>**/WEB-INF/classes/*</exclude>
</excludes>

This is how excludes "should" work. If it doesn't, then you might want
to file a JIRA Enhancement request for this plugin.

Wayne

On 4/11/06, Pat Turner <gr...@ichini.co.uk> wrote:
>
> Hi Karthik,
>
> I'm also integrating Maven2 into our WSAD projects and I've hit the same
> problem as you. The root cause is that the WebContent folder already has the
> dependencies in the WEB-INF/lib folder. So when it is copied into place, all
> the libraries come with it.
>
> WSAD treats WebContent as a src directory *and* a target directory so that
> the embedded test environment will work. Its a pain in the backside to work
> around, and I've had to write a small plugin to sync up the maven
> dependencies into WEB-INF/lib as an additional step after running the
> eclipse plugin.
>
> The solution is to add an excludes section in your war plugin config. You'll
> probably end up with something like this:
> <plugin>
>        <artifactId>maven-war-plugin</artifactId>
>        <configuration>
>                <warSourceDirectory>WebContent</warSourceDirectory>
>                <excludes>**/WEB-INF/lib/*</excludes>
>        </configuration>
> </plugin>
>
> Note that the <excludes> tag currently only allows a single entry, so you
> can't add '**/WEB-INF/classes/*' as well. This probably means that you'll
> get your test classes copied across, unless you've configured WSAD away from
> its default 'single output location'.
>
> Hope this helps.
> Pat
> --
> View this message in context: http://www.nabble.com/-m2---WAR-file-generation-t778773.html#a3861722
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] - WAR file generation

Posted by Pat Turner <gr...@ichini.co.uk>.
Hi Karthik,

I'm also integrating Maven2 into our WSAD projects and I've hit the same
problem as you. The root cause is that the WebContent folder already has the
dependencies in the WEB-INF/lib folder. So when it is copied into place, all
the libraries come with it.

WSAD treats WebContent as a src directory *and* a target directory so that
the embedded test environment will work. Its a pain in the backside to work
around, and I've had to write a small plugin to sync up the maven
dependencies into WEB-INF/lib as an additional step after running the
eclipse plugin.

The solution is to add an excludes section in your war plugin config. You'll
probably end up with something like this:
<plugin>
	<artifactId>maven-war-plugin</artifactId>
	<configuration>
		<warSourceDirectory>WebContent</warSourceDirectory>
		<excludes>**/WEB-INF/lib/*</excludes>
	</configuration>
</plugin>

Note that the <excludes> tag currently only allows a single entry, so you
can't add '**/WEB-INF/classes/*' as well. This probably means that you'll
get your test classes copied across, unless you've configured WSAD away from
its default 'single output location'.

Hope this helps.
Pat
--
View this message in context: http://www.nabble.com/-m2---WAR-file-generation-t778773.html#a3861722
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
It has been done for the PrivacyWeb POM (WAR file POM - ref prev mails) but
it doesnt seem to work.


On 12/21/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
>
> Karthik Manimaran wrote:
>
> >My question here is - How to avoid jars that can be reused from being
> copied
> >to the lib directory and have it as a common file in the EAR.
> >
> >Thanks and regards,
> >Karthik.
> >
> >
> We put the ejb module in the ear and we put this in the war module pom
> so that it uses the ear lib and doesn't import it.
>
> <dependency>
>      <groupId>it.linksystem.csai</groupId>
>      <artifactId>CSAIEJB</artifactId>
>      <version>1.0</version>
>      <scope>provided</scope>
> </dependency>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] - WAR file generation

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Karthik Manimaran wrote:

>My question here is - How to avoid jars that can be reused from being copied
>to the lib directory and have it as a common file in the EAR.
>
>Thanks and regards,
>Karthik.
>  
>
We put the ejb module in the ear and we put this in the war module pom 
so that it uses the ear lib and doesn't import it.

<dependency>
      <groupId>it.linksystem.csai</groupId>
      <artifactId>CSAIEJB</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
</dependency>

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


Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
:( When I build the EAR using WSAD, I dont have this replication and still
the application works as all the jars are available in the EAR once.

On 12/21/05, Stephane Nicoll <st...@gmail.com> wrote:
>
> then you need to include those, otherwise your app won't work.
>
> On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
> >
> > Some of the libs are are used by components in the EAR.
> >
> > On 12/21/05, Stephane Nicoll <st...@gmail.com> wrote:
> > >
> > > Well, this is a really tricky question. Thoses libs are for the WAR
> > > artifact
> > > only and are not used in any way by components in the EAR file, right?
> > >
> > > On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > > >
> > > > My question here is - How to avoid jars that can be reused from
> being
> > > > copied
> > > > to the lib directory and have it as a common file in the EAR.
> > > >
> > > > Thanks and regards,
> > > > Karthik.
> > > >
> > > >
> > > > On 12/20/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
> > > > >
> > > > > Karthik Manimaran wrote:
> > > > >
> > > > > >The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
> > > > > >
> > > > > >1. It is present in the EAR file as a separate jar at the root.
> > > > > >2. It is also present inside PrivacyWeb.war file (inside
> > WEB-INF/lib
> > > > > folder)
> > > > > >
> > > > > >The same duplication occurs for all other jars used by PrivacyWeb
> > > > > (runtime,
> > > > > >commons-*, ContentManager etc)
> > > > > >
> > > > > >Now the EAR is twice as big as what it is supposed to be. I do
> not
> > > need
> > > > > >Maven to include all the depencies required for the WAR file
> inside
> > > lib
> > > > > >directory as it is already available as separate jars in the EAR
> > > file.
> > > > > >
> > > > > >Thanks and regards,
> > > > > >Karthik.
> > > > > >
> > > > > For my team we allow the war module to have it's own libraries,
> only
> > > if
> > > > > the lib can be reused between it and the ejb module do we put it
> in
> > > ear,
> > > > > otherwise we keep them separated. That's our approach.
> > > > > Cheers
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: users-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > .::You're welcome ::.
> > >
> > >
> >
> >
>
>
> --
> .::You're welcome ::.
>
>

Re: [m2] - WAR file generation

Posted by Stephane Nicoll <st...@gmail.com>.
then you need to include those, otherwise your app won't work.

On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
>
> Some of the libs are are used by components in the EAR.
>
> On 12/21/05, Stephane Nicoll <st...@gmail.com> wrote:
> >
> > Well, this is a really tricky question. Thoses libs are for the WAR
> > artifact
> > only and are not used in any way by components in the EAR file, right?
> >
> > On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > >
> > > My question here is - How to avoid jars that can be reused from being
> > > copied
> > > to the lib directory and have it as a common file in the EAR.
> > >
> > > Thanks and regards,
> > > Karthik.
> > >
> > >
> > > On 12/20/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
> > > >
> > > > Karthik Manimaran wrote:
> > > >
> > > > >The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
> > > > >
> > > > >1. It is present in the EAR file as a separate jar at the root.
> > > > >2. It is also present inside PrivacyWeb.war file (inside
> WEB-INF/lib
> > > > folder)
> > > > >
> > > > >The same duplication occurs for all other jars used by PrivacyWeb
> > > > (runtime,
> > > > >commons-*, ContentManager etc)
> > > > >
> > > > >Now the EAR is twice as big as what it is supposed to be. I do not
> > need
> > > > >Maven to include all the depencies required for the WAR file inside
> > lib
> > > > >directory as it is already available as separate jars in the EAR
> > file.
> > > > >
> > > > >Thanks and regards,
> > > > >Karthik.
> > > > >
> > > > For my team we allow the war module to have it's own libraries, only
> > if
> > > > the lib can be reused between it and the ejb module do we put it in
> > ear,
> > > > otherwise we keep them separated. That's our approach.
> > > > Cheers
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > .::You're welcome ::.
> >
> >
>
>


--
.::You're welcome ::.

Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
Some of the libs are are used by components in the EAR.

On 12/21/05, Stephane Nicoll <st...@gmail.com> wrote:
>
> Well, this is a really tricky question. Thoses libs are for the WAR
> artifact
> only and are not used in any way by components in the EAR file, right?
>
> On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
> >
> > My question here is - How to avoid jars that can be reused from being
> > copied
> > to the lib directory and have it as a common file in the EAR.
> >
> > Thanks and regards,
> > Karthik.
> >
> >
> > On 12/20/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
> > >
> > > Karthik Manimaran wrote:
> > >
> > > >The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
> > > >
> > > >1. It is present in the EAR file as a separate jar at the root.
> > > >2. It is also present inside PrivacyWeb.war file (inside WEB-INF/lib
> > > folder)
> > > >
> > > >The same duplication occurs for all other jars used by PrivacyWeb
> > > (runtime,
> > > >commons-*, ContentManager etc)
> > > >
> > > >Now the EAR is twice as big as what it is supposed to be. I do not
> need
> > > >Maven to include all the depencies required for the WAR file inside
> lib
> > > >directory as it is already available as separate jars in the EAR
> file.
> > > >
> > > >Thanks and regards,
> > > >Karthik.
> > > >
> > > For my team we allow the war module to have it's own libraries, only
> if
> > > the lib can be reused between it and the ejb module do we put it in
> ear,
> > > otherwise we keep them separated. That's our approach.
> > > Cheers
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
>
>
> --
> .::You're welcome ::.
>
>

Re: [m2] - WAR file generation

Posted by Stephane Nicoll <st...@gmail.com>.
Well, this is a really tricky question. Thoses libs are for the WAR artifact
only and are not used in any way by components in the EAR file, right?

On 12/21/05, Karthik Manimaran <mk...@gmail.com> wrote:
>
> My question here is - How to avoid jars that can be reused from being
> copied
> to the lib directory and have it as a common file in the EAR.
>
> Thanks and regards,
> Karthik.
>
>
> On 12/20/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
> >
> > Karthik Manimaran wrote:
> >
> > >The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
> > >
> > >1. It is present in the EAR file as a separate jar at the root.
> > >2. It is also present inside PrivacyWeb.war file (inside WEB-INF/lib
> > folder)
> > >
> > >The same duplication occurs for all other jars used by PrivacyWeb
> > (runtime,
> > >commons-*, ContentManager etc)
> > >
> > >Now the EAR is twice as big as what it is supposed to be. I do not need
> > >Maven to include all the depencies required for the WAR file inside lib
> > >directory as it is already available as separate jars in the EAR file.
> > >
> > >Thanks and regards,
> > >Karthik.
> > >
> > For my team we allow the war module to have it's own libraries, only if
> > the lib can be reused between it and the ejb module do we put it in ear,
> > otherwise we keep them separated. That's our approach.
> > Cheers
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>


--
.::You're welcome ::.

Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
My question here is - How to avoid jars that can be reused from being copied
to the lib directory and have it as a common file in the EAR.

Thanks and regards,
Karthik.


On 12/20/05, Srepfler Srgjan <sr...@lnksystem.com> wrote:
>
> Karthik Manimaran wrote:
>
> >The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
> >
> >1. It is present in the EAR file as a separate jar at the root.
> >2. It is also present inside PrivacyWeb.war file (inside WEB-INF/lib
> folder)
> >
> >The same duplication occurs for all other jars used by PrivacyWeb
> (runtime,
> >commons-*, ContentManager etc)
> >
> >Now the EAR is twice as big as what it is supposed to be. I do not need
> >Maven to include all the depencies required for the WAR file inside lib
> >directory as it is already available as separate jars in the EAR file.
> >
> >Thanks and regards,
> >Karthik.
> >
> For my team we allow the war module to have it's own libraries, only if
> the lib can be reused between it and the ejb module do we put it in ear,
> otherwise we keep them separated. That's our approach.
> Cheers
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] - WAR file generation

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Karthik Manimaran wrote:

>The jar file DotComCommon-1.0.jar is duplicated in the EAR file.
>
>1. It is present in the EAR file as a separate jar at the root.
>2. It is also present inside PrivacyWeb.war file (inside WEB-INF/lib folder)
>
>The same duplication occurs for all other jars used by PrivacyWeb (runtime,
>commons-*, ContentManager etc)
>
>Now the EAR is twice as big as what it is supposed to be. I do not need
>Maven to include all the depencies required for the WAR file inside lib
>directory as it is already available as separate jars in the EAR file.
>
>Thanks and regards,
>Karthik.
>
For my team we allow the war module to have it's own libraries, only if 
the lib can be reused between it and the ejb module do we put it in ear, 
otherwise we keep them separated. That's our approach.
Cheers

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


Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
The jar file DotComCommon-1.0.jar is duplicated in the EAR file.

1. It is present in the EAR file as a separate jar at the root.
2. It is also present inside PrivacyWeb.war file (inside WEB-INF/lib folder)

The same duplication occurs for all other jars used by PrivacyWeb (runtime,
commons-*, ContentManager etc)

Now the EAR is twice as big as what it is supposed to be. I do not need
Maven to include all the depencies required for the WAR file inside lib
directory as it is already available as separate jars in the EAR file.

Thanks and regards,
Karthik.



On 12/20/05, Stephane Nicoll <st...@gmail.com> wrote:
>
> Well this does not sound a mistake to me.  What are you actually expecting
> from Maven?
>
> s/
>
> On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> >
> > Oops . Didn't know attachements arent accepted. Details below:
> >
> > Folder structure
> > remo
> > --------- applications
> >                -----------------DotCom
> > ----------modules
> >               ------------------ContentManager
> >                ------------------DotComCommon
> >                ------------------PrivacyWeb
> >
> > PrivacyWeb POM:
> > <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>remo.gtvx2</groupId>
> >    <artifactId>PrivacyWeb</artifactId>
> >    <packaging>war</packaging>
> >    <version>1.0</version>
> >    <name>Privacy Web</name>
> >
> >    <dependencies>
> >       <dependency>
> >          <groupId>remo.gtvx2</groupId>
> >          <artifactId>DotComCommon</artifactId>
> >          <version>1.0</version>
> >          <scope>provided</scope>
> >       </dependency>
> >       <dependency>
> >          <groupId>remo.gtvx2</groupId>
> >          <artifactId>ContentManager</artifactId>
> >          <version>1.0</version>
> >          <scope>provided</scope>
> >       </dependency>
> >
> >
> >     <dependency>
> >       <groupId>javax.servlet</groupId>
> >       <artifactId>servlet-api</artifactId>
> >       <version>2.3</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>javax.mail</groupId>
> >       <artifactId>mail</artifactId>
> >       <version>1.3.3</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>javax.activation</groupId>
> >       <artifactId>activation</artifactId>
> >       <version>1.0.2</version>
> >       <scope>provided</scope>
> >     </dependency>
> >
> >      <dependency>
> >       <groupId>commons-beanutils</groupId>
> >       <artifactId>commons-beanutils</artifactId>
> >       <version>1.7.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>log4j</groupId>
> >       <artifactId>log4j</artifactId>
> >       <version>1.2.8</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>struts</groupId>
> >       <artifactId>struts</artifactId>
> >       <version>1.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-collections</groupId>
> >       <artifactId>commons-collections</artifactId>
> >       <version>2.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-logging</groupId>
> >       <artifactId>commons-logging</artifactId>
> >       <version>1.0.2</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-lang</groupId>
> >       <artifactId>commons-lang</artifactId>
> >       <version>1.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-fileupload</groupId>
> >       <artifactId>commons-fileupload</artifactId>
> >       <version>1.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-digester</groupId>
> >       <artifactId>commons-digester</artifactId>
> >       <version>1.0</version>
> >       <scope>provided</scope>
> >     </dependency>
> >
> >    </dependencies>
> >
> >    <build>
> >       <plugins>
> >          <plugin>
> >             <artifactId>maven-war-plugin</artifactId>
> >             <version>2.0-beta-2</version>
> >             <configuration>
> >                <archive>
> >                   <manifest>
> >                      <addClasspath>true</addClasspath>
> >                   </manifest>
> >                </archive>
> >             </configuration>
> >          </plugin>
> >       </plugins>
> >    </build>
> >
> > </project>
> >
> > DotCom POM:
> > <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>remo.gtvx2</groupId>
> >    <artifactId>DotComEar</artifactId>
> >    <packaging>ear</packaging>
> >    <version>1.0</version>
> >    <name>Dot Com EAR</name>
> >    <dependencies>
> >       <dependency>
> >          <groupId>remo.gtvx2</groupId>
> >          <artifactId>ContentManager</artifactId>
> >          <version>1.0</version>
> >          <type>ejb</type>
> >       </dependency>
> >       <dependency>
> >          <groupId>remo.gtvx2</groupId>
> >          <artifactId>PrivacyWeb</artifactId>
> >          <version>1.0</version>
> >          <type>war</type>
> >       </dependency>
> >       <dependency>
> >          <groupId>remo.gtvx2</groupId>
> >          <artifactId>DotComCommon</artifactId>
> >          <version>1.0</version>
> >       </dependency>
> >    </dependencies>
> >    <build>
> >       <plugins>
> >          <plugin>
> >             <artifactId>maven-ear-plugin</artifactId>
> >             <version>2.0</version>
> >             <configuration>
> >                <archive>
> >                   <manifest>
> >                      <addClasspath>true</addClasspath>
> >                   </manifest>
> >                </archive>
> >             </configuration>
> >          </plugin>
> >       </plugins>
> >    </build>
> > </project>
> >
> > remo POM:
> > <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>remo</groupId>
> >    <version>1.0</version>
> >    <artifactId>gtvx</artifactId>
> >    <packaging>pom</packaging>
> >    <name>gtvx .com Build</name>
> >    <modules>
> >       <module>applications</module>
> >       <module>modules</module>
> >    </modules>
> >    <build>
> >       <plugins>
> >          <plugin>
> >             <groupId>org.apache.maven.plugins</groupId>
> >             <artifactId>maven-javadoc-plugin</artifactId>
> >          </plugin>
> >       </plugins>
> >    </build>
> > </project>
> >
> > DotComCommon POM:
> >
> > <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>remo.gtvx2</groupId>
> >    <artifactId>DotComCommon</artifactId>
> >    <packaging>jar</packaging>
> >    <version>1.0</version>
> >    <name>Dot Com Common Components</name>
> >    <dependencies>
> >
> >     <dependency>
> >       <groupId>remo.gtvx2</groupId>
> >       <artifactId>ContentManager</artifactId>
> >       <version>1.0</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>javax.servlet</groupId>
> >       <artifactId>servlet-api</artifactId>
> >       <version>2.3</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>javax.mail</groupId>
> >       <artifactId>mail</artifactId>
> >       <version>1.3.3</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>javax.activation</groupId>
> >       <artifactId>activation</artifactId>
> >       <version>1.0.2</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>commons-beanutils</groupId>
> >       <artifactId>commons-beanutils</artifactId>
> >       <version>1.7.0</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>log4j</groupId>
> >       <artifactId>log4j</artifactId>
> >       <version>1.2.8</version>
> >     </dependency>
> >
> >
> >    </dependencies>
> >    <build>
> >       <plugins>
> >          <plugin>
> >             <artifactId>maven-ejb-plugin</artifactId>
> >             <version>2.0</version>
> >             <configuration>
> >                <archive>
> >                   <manifest>
> >                      <addClasspath>true</addClasspath>
> >                   </manifest>
> >                </archive>
> >             </configuration>
> >          </plugin>
> >       </plugins>
> >    </build>
> > </project>
> >
> > In my case the coomon jars between DotComCommon and PrivacyWeb are
> > replicated. Also DotComCommon jar is replicated once within the WAR
> file.
> >
> > Thanks and regards,
> > Karthik.
> >
> >
> >
> >
> >
> > On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I have attached the POMs as reference.
> > >
> > > The modules DotComCommon (jar), ContentManager (ejb jar) and other
> > > dependency jars get included once in the EAR and within lib directory
> of
> > the
> > > WAR file for PrivacyWeb (war) too.
> > >
> > > Thanks and regards,
> > > Karthik.
> > >
> > >
> > >  On 12/20/05, Stephane Nicoll <st...@gmail.com> wrote:
> > > >
> > > > Could you please describe a bit more your situation. You have an WAR
> > > > inside
> > > > an EAR and librarires got duplicated?
> > > >
> > > > Maybe show your poms.
> > > >
> > > > s/
> > > >
> > > > On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am building a J2EE project. My WAR file includes all the
> > dependency
> > > > jars
> > > > > (including the common jars and ejb jars) in the WEB-INF/lib
> > directory.
> > > > > This
> > > > > creates additional copies of jar files within the EAR file and the
> > > > size of
> > > > > the WAR file gets huge. Is there a way to avoid bundling of the
> > > > > dependencies
> > > > > within the WAR file? The scope attribute value (provided/runtime)
> > > > doesnt
> > > > > seem to have an effect on this behaviour.
> > > > >
> > > > > Thanks and regards,
> > > > > Karthik.
> > > > >
> > > > >
> > >
> > >
> >
> >
> >
> >
> >   --
> > > > .::You're welcome ::.
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> --
> .::You're welcome ::.
>
>

Re: [m2] - WAR file generation

Posted by Stephane Nicoll <st...@gmail.com>.
Well this does not sound a mistake to me.  What are you actually expecting
from Maven?

s/

On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
>
> Oops . Didn't know attachements arent accepted. Details below:
>
> Folder structure
> remo
> --------- applications
>                -----------------DotCom
> ----------modules
>               ------------------ContentManager
>                ------------------DotComCommon
>                ------------------PrivacyWeb
>
> PrivacyWeb POM:
> <project>
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>remo.gtvx2</groupId>
>    <artifactId>PrivacyWeb</artifactId>
>    <packaging>war</packaging>
>    <version>1.0</version>
>    <name>Privacy Web</name>
>
>    <dependencies>
>       <dependency>
>          <groupId>remo.gtvx2</groupId>
>          <artifactId>DotComCommon</artifactId>
>          <version>1.0</version>
>          <scope>provided</scope>
>       </dependency>
>       <dependency>
>          <groupId>remo.gtvx2</groupId>
>          <artifactId>ContentManager</artifactId>
>          <version>1.0</version>
>          <scope>provided</scope>
>       </dependency>
>
>
>     <dependency>
>       <groupId>javax.servlet</groupId>
>       <artifactId>servlet-api</artifactId>
>       <version>2.3</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>javax.mail</groupId>
>       <artifactId>mail</artifactId>
>       <version>1.3.3</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>javax.activation</groupId>
>       <artifactId>activation</artifactId>
>       <version>1.0.2</version>
>       <scope>provided</scope>
>     </dependency>
>
>      <dependency>
>       <groupId>commons-beanutils</groupId>
>       <artifactId>commons-beanutils</artifactId>
>       <version>1.7.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>log4j</groupId>
>       <artifactId>log4j</artifactId>
>       <version>1.2.8</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>struts</groupId>
>       <artifactId>struts</artifactId>
>       <version>1.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>commons-collections</groupId>
>       <artifactId>commons-collections</artifactId>
>       <version>2.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>commons-logging</groupId>
>       <artifactId>commons-logging</artifactId>
>       <version>1.0.2</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>commons-lang</groupId>
>       <artifactId>commons-lang</artifactId>
>       <version>1.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>commons-fileupload</groupId>
>       <artifactId>commons-fileupload</artifactId>
>       <version>1.0</version>
>       <scope>provided</scope>
>     </dependency>
>     <dependency>
>       <groupId>commons-digester</groupId>
>       <artifactId>commons-digester</artifactId>
>       <version>1.0</version>
>       <scope>provided</scope>
>     </dependency>
>
>    </dependencies>
>
>    <build>
>       <plugins>
>          <plugin>
>             <artifactId>maven-war-plugin</artifactId>
>             <version>2.0-beta-2</version>
>             <configuration>
>                <archive>
>                   <manifest>
>                      <addClasspath>true</addClasspath>
>                   </manifest>
>                </archive>
>             </configuration>
>          </plugin>
>       </plugins>
>    </build>
>
> </project>
>
> DotCom POM:
> <project>
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>remo.gtvx2</groupId>
>    <artifactId>DotComEar</artifactId>
>    <packaging>ear</packaging>
>    <version>1.0</version>
>    <name>Dot Com EAR</name>
>    <dependencies>
>       <dependency>
>          <groupId>remo.gtvx2</groupId>
>          <artifactId>ContentManager</artifactId>
>          <version>1.0</version>
>          <type>ejb</type>
>       </dependency>
>       <dependency>
>          <groupId>remo.gtvx2</groupId>
>          <artifactId>PrivacyWeb</artifactId>
>          <version>1.0</version>
>          <type>war</type>
>       </dependency>
>       <dependency>
>          <groupId>remo.gtvx2</groupId>
>          <artifactId>DotComCommon</artifactId>
>          <version>1.0</version>
>       </dependency>
>    </dependencies>
>    <build>
>       <plugins>
>          <plugin>
>             <artifactId>maven-ear-plugin</artifactId>
>             <version>2.0</version>
>             <configuration>
>                <archive>
>                   <manifest>
>                      <addClasspath>true</addClasspath>
>                   </manifest>
>                </archive>
>             </configuration>
>          </plugin>
>       </plugins>
>    </build>
> </project>
>
> remo POM:
> <project>
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>remo</groupId>
>    <version>1.0</version>
>    <artifactId>gtvx</artifactId>
>    <packaging>pom</packaging>
>    <name>gtvx .com Build</name>
>    <modules>
>       <module>applications</module>
>       <module>modules</module>
>    </modules>
>    <build>
>       <plugins>
>          <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-javadoc-plugin</artifactId>
>          </plugin>
>       </plugins>
>    </build>
> </project>
>
> DotComCommon POM:
>
> <project>
>    <modelVersion>4.0.0</modelVersion>
>    <groupId>remo.gtvx2</groupId>
>    <artifactId>DotComCommon</artifactId>
>    <packaging>jar</packaging>
>    <version>1.0</version>
>    <name>Dot Com Common Components</name>
>    <dependencies>
>
>     <dependency>
>       <groupId>remo.gtvx2</groupId>
>       <artifactId>ContentManager</artifactId>
>       <version>1.0</version>
>     </dependency>
>     <dependency>
>       <groupId>javax.servlet</groupId>
>       <artifactId>servlet-api</artifactId>
>       <version>2.3</version>
>     </dependency>
>     <dependency>
>       <groupId>javax.mail</groupId>
>       <artifactId>mail</artifactId>
>       <version>1.3.3</version>
>     </dependency>
>     <dependency>
>       <groupId>javax.activation</groupId>
>       <artifactId>activation</artifactId>
>       <version>1.0.2</version>
>     </dependency>
>     <dependency>
>       <groupId>commons-beanutils</groupId>
>       <artifactId>commons-beanutils</artifactId>
>       <version>1.7.0</version>
>     </dependency>
>     <dependency>
>       <groupId>log4j</groupId>
>       <artifactId>log4j</artifactId>
>       <version>1.2.8</version>
>     </dependency>
>
>
>    </dependencies>
>    <build>
>       <plugins>
>          <plugin>
>             <artifactId>maven-ejb-plugin</artifactId>
>             <version>2.0</version>
>             <configuration>
>                <archive>
>                   <manifest>
>                      <addClasspath>true</addClasspath>
>                   </manifest>
>                </archive>
>             </configuration>
>          </plugin>
>       </plugins>
>    </build>
> </project>
>
> In my case the coomon jars between DotComCommon and PrivacyWeb are
> replicated. Also DotComCommon jar is replicated once within the WAR file.
>
> Thanks and regards,
> Karthik.
>
>
>
>
>
> On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> >
> > Hi,
> >
> > I have attached the POMs as reference.
> >
> > The modules DotComCommon (jar), ContentManager (ejb jar) and other
> > dependency jars get included once in the EAR and within lib directory of
> the
> > WAR file for PrivacyWeb (war) too.
> >
> > Thanks and regards,
> > Karthik.
> >
> >
> >  On 12/20/05, Stephane Nicoll <st...@gmail.com> wrote:
> > >
> > > Could you please describe a bit more your situation. You have an WAR
> > > inside
> > > an EAR and librarires got duplicated?
> > >
> > > Maybe show your poms.
> > >
> > > s/
> > >
> > > On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I am building a J2EE project. My WAR file includes all the
> dependency
> > > jars
> > > > (including the common jars and ejb jars) in the WEB-INF/lib
> directory.
> > > > This
> > > > creates additional copies of jar files within the EAR file and the
> > > size of
> > > > the WAR file gets huge. Is there a way to avoid bundling of the
> > > > dependencies
> > > > within the WAR file? The scope attribute value (provided/runtime)
> > > doesnt
> > > > seem to have an effect on this behaviour.
> > > >
> > > > Thanks and regards,
> > > > Karthik.
> > > >
> > > >
> >
> >
>
>
>
>
>   --
> > > .::You're welcome ::.
> > >
> > >
> >
> >
>
>


--
.::You're welcome ::.

Re: [m2] - WAR file generation

Posted by Karthik Manimaran <mk...@gmail.com>.
Oops . Didn't know attachements arent accepted. Details below:

Folder structure
remo
--------- applications
               -----------------DotCom
----------modules
              ------------------ContentManager
               ------------------DotComCommon
               ------------------PrivacyWeb

PrivacyWeb POM:
<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>remo.gtvx2</groupId>
   <artifactId>PrivacyWeb</artifactId>
   <packaging>war</packaging>
   <version>1.0</version>
   <name>Privacy Web</name>

   <dependencies>
      <dependency>
         <groupId>remo.gtvx2</groupId>
         <artifactId>DotComCommon</artifactId>
         <version>1.0</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>remo.gtvx2</groupId>
         <artifactId>ContentManager</artifactId>
         <version>1.0</version>
         <scope>provided</scope>
      </dependency>


    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.3.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.0.2</version>
      <scope>provided</scope>
    </dependency>

     <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.7.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.8</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>struts</groupId>
      <artifactId>struts</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>

   </dependencies>

   <build>
      <plugins>
         <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.0-beta-2</version>
            <configuration>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                  </manifest>
               </archive>
            </configuration>
         </plugin>
      </plugins>
   </build>

</project>

DotCom POM:
<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>remo.gtvx2</groupId>
   <artifactId>DotComEar</artifactId>
   <packaging>ear</packaging>
   <version>1.0</version>
   <name>Dot Com EAR</name>
   <dependencies>
      <dependency>
         <groupId>remo.gtvx2</groupId>
         <artifactId>ContentManager</artifactId>
         <version>1.0</version>
         <type>ejb</type>
      </dependency>
      <dependency>
         <groupId>remo.gtvx2</groupId>
         <artifactId>PrivacyWeb</artifactId>
         <version>1.0</version>
         <type>war</type>
      </dependency>
      <dependency>
         <groupId>remo.gtvx2</groupId>
         <artifactId>DotComCommon</artifactId>
         <version>1.0</version>
      </dependency>
   </dependencies>
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.0</version>
            <configuration>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                  </manifest>
               </archive>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>

remo POM:
<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>remo</groupId>
   <version>1.0</version>
   <artifactId>gtvx</artifactId>
   <packaging>pom</packaging>
   <name>gtvx .com Build</name>
   <modules>
      <module>applications</module>
      <module>modules</module>
   </modules>
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
         </plugin>
      </plugins>
   </build>
</project>

DotComCommon POM:

<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>remo.gtvx2</groupId>
   <artifactId>DotComCommon</artifactId>
   <packaging>jar</packaging>
   <version>1.0</version>
   <name>Dot Com Common Components</name>
   <dependencies>

    <dependency>
      <groupId>remo.gtvx2</groupId>
      <artifactId>ContentManager</artifactId>
      <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.3.3</version>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.0.2</version>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.7.0</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.8</version>
    </dependency>


   </dependencies>
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-ejb-plugin</artifactId>
            <version>2.0</version>
            <configuration>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                  </manifest>
               </archive>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>

In my case the coomon jars between DotComCommon and PrivacyWeb are
replicated. Also DotComCommon jar is replicated once within the WAR file.

Thanks and regards,
Karthik.





On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
>
> Hi,
>
> I have attached the POMs as reference.
>
> The modules DotComCommon (jar), ContentManager (ejb jar) and other
> dependency jars get included once in the EAR and within lib directory of the
> WAR file for PrivacyWeb (war) too.
>
> Thanks and regards,
> Karthik.
>
>
>  On 12/20/05, Stephane Nicoll <st...@gmail.com> wrote:
> >
> > Could you please describe a bit more your situation. You have an WAR
> > inside
> > an EAR and librarires got duplicated?
> >
> > Maybe show your poms.
> >
> > s/
> >
> > On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > I am building a J2EE project. My WAR file includes all the dependency
> > jars
> > > (including the common jars and ejb jars) in the WEB-INF/lib directory.
> > > This
> > > creates additional copies of jar files within the EAR file and the
> > size of
> > > the WAR file gets huge. Is there a way to avoid bundling of the
> > > dependencies
> > > within the WAR file? The scope attribute value (provided/runtime)
> > doesnt
> > > seem to have an effect on this behaviour.
> > >
> > > Thanks and regards,
> > > Karthik.
> > >
> > >
>
>




  --
> > .::You're welcome ::.
> >
> >
>
>

Re: [m2] - WAR file generation

Posted by Stephane Nicoll <st...@gmail.com>.
Could you please describe a bit more your situation. You have an WAR inside
an EAR and librarires got duplicated?

Maybe show your poms.

s/

On 12/20/05, Karthik Manimaran <mk...@gmail.com> wrote:
>
> Hi,
>
> I am building a J2EE project. My WAR file includes all the dependency jars
> (including the common jars and ejb jars) in the WEB-INF/lib directory.
> This
> creates additional copies of jar files within the EAR file and the size of
> the WAR file gets huge. Is there a way to avoid bundling of the
> dependencies
> within the WAR file? The scope attribute value (provided/runtime) doesnt
> seem to have an effect on this behaviour.
>
> Thanks and regards,
> Karthik.
>
>


--
.::You're welcome ::.