You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Labhishetty <ba...@jpmchase.com> on 2007/12/17 22:19:46 UTC

Adding resouces (images/css) to web project

Hi,

I want to create a separate project which contains web resources
(images,css,etc) so i can use the same across all web projects.

I am able to go through the plugin (maven-war-plugin), but using this plugin
we can add resources from a folder and not from other project. Pelase let me
know if anybody is having other ideas.

Thanks & Regards,
Bala Labhishetty

-- 
View this message in context: http://www.nabble.com/Adding-resouces-%28images-css%29-to-web-project-tp14374046s177p14374046.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Adding resources (images/css) to web project

Posted by Michael McCallum <gh...@apache.org>.
yes you need to set the *type* to war

<dependency>
<groupId>com.mygroup</groupId>
<artifactId>com.mygroup.underlay.web</artifactId>
<version>[1,2-!)</version>
<type>war</type>
</dependency>


If your underlay defines depedencies then i found it better to do it like 
this... build the underlay way with a classifier so the war ends up as an 
attachment to the main artifact, depend apon the main artifact and the war 
file... you get dependency resolution (normally masked by war depedency) as 
well as the underlay

<dependency>
<groupId>com.mygroup</groupId>
<artifactId>com.mygroup.underlay.web</artifactId>
<version>[1,2-!)</version>

</dependency>
<dependency>
<groupId>com.mygroup</groupId>
<artifactId>com.mygroup.underlay.web</artifactId>
<version>[1,2-!)</version>
<type>war</type>
<classifier>underlay</classifier>
</dependency>
On Tue, 18 Dec 2007 13:09:42 Jan Torben Heuer wrote:
> Michael McCallum wrote:
> > create a war project with just those images css...
> >
> > depend apon it from all your other war projects... the war plugin will
> > cleverly use the image/css war as a base when building...
>
> Recently I tried to depend on a war project - but it was not possible to
> download it - maven always searched the .jar-file in the repository? Did I
> do something wrong?
>
> Jan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



-- 
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org

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


Re: Adding resources (images/css) to web project

Posted by Jan Torben Heuer <jt...@mail2003.dnsalias.org>.
Michael McCallum wrote:

> create a war project with just those images css...
> 
> depend apon it from all your other war projects... the war plugin will
> cleverly use the image/css war as a base when building...

Recently I tried to depend on a war project - but it was not possible to
download it - maven always searched the .jar-file in the repository? Did I
do something wrong?

Jan



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


Re: Adding resources (images/css) to web project

Posted by Michael McCallum <gh...@apache.org>.
create a war project with just those images css...

depend apon it from all your other war projects... the war plugin will 
cleverly use the image/css war as a base when building...

just be careful that the template/underlay war has not depedencies or that you 
set a rule to exclude them as you can get conflicts.

On Tue, 18 Dec 2007 10:21:35 Labhishetty wrote:
> Hi,
>
> I want to create a separate project which contains web resources
> (images,css,etc) so i can use the same across all web projects.
>
> I am able to go through the plugin (maven-war-plugin), but using this
> plugin we can add resources from a folder and not from other project.
> Pelase let me know if anybody is having other ideas.
>
> Thanks & Regards,
> Bala Labhishetty



-- 
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org

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