maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hobson <markhob...@gmail.com>
Subject Re: [m2] Artifact with web resources (images, css etc.)
Date Wed, 02 Nov 2005 13:06:24 GMT
Hi Piotr,

There's a similar issue open regarding including artifacts at the
root-level of a war:

http://jira.codehaus.org/browse/MNG-896

This would be for applets, JNLP apps, etc. but could be extended to
explode specified dependencies as well - maybe worth adding your use
case there to keep things together.

Cheers,

Mark

On 02/11/05, Piotr Bzdyl <piotr@bzdyl.net> wrote:
> Hi,
>
> How should I handle artifact with web resources? Lets assume that I
> create JSF web UI components which consists of Java classes packaged in
> the Jar file and web resources (images, css and javascript library
> files). Shouldn't be there something like web-resources packaging type
> (<packaging>web-resources</packaging>) and artifact called ie.
> my-component-1.0.web-resources (it could be simple jar/zip file with all
> resources which could be unzipped into root dir of the webapp)? Then I
> could specify three poms for my project:
>
> pom.xml for my-jsf-component root project:
> <project>
>   <groupId>com.mycompany</groupId>
>   <artifactId>my-jsf-component</artifactId>
>   <packaging>pom</packaging>
>   <modules>
>     <module>my-jsf-component-lib</module>
>     <module>my-jsf-component-resources</module>
>  </modules>
>   ......
> </project>
>
> pom.xml for my-jsf-component-resources:
> <project>
>   <parent>......</parent>
>   <artifactId>my-jsf-component-resources</artifactId>
>   <packaging>web-resources</packaging>
>   .....
> </project>
>
> pom.xml for my-jsf-component-lib:
> <project>
>   <parent>......</parent>
>   <artifactId>my-jsf-component-lib</artifactId>
>   <packaging>jar</packaging>
>   ......
>   <dependencyManagement>
>     <dependencies>
>       <dependency>
>         <groupId>com.mycompany</groupId>
>         <artifactId>my-jsf-component-resources</artifactId>
>         <version>1.0</version>
>         <type>web-resources</type>
>       </dependency>
>   </dependencyManagement>
> </project>
>
> pom.xml for my-jsf-component-resources:
> <project>
>   <parent>......</parent>
>   <artifactId>my-jsf-component-resources</artifactId>
>   <packaging>web-resources</packaging>
>   .....
> </project>
>
> Then maven-resources-plugin or maven-war-plugin could just fetch that
> jar/zip file from the repository and unzip it to the target webapp
> directory.
>
> Do you have better ideas?
>
> Best regards,
> Piotrek
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message