You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Piotr Bzdyl <pi...@bzdyl.net> on 2005/11/02 12:40:54 UTC
[m2] Artifact with web resources (images, css etc.)
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
Re: [m2] Artifact with web resources (images, css etc.)
Posted by Mark Hobson <ma...@gmail.com>.
On 02/11/05, Piotr Bzdyl <pi...@bzdyl.net> wrote:
> Actually, I already added my comment on this
> (http://jira.codehaus.org/browse/MNG-896#action_49155), but I am asking
> here because maybe somebody solve this problem in other way.
So you did, that'll teach me to read properly.. :)
I currently get around the applet problem via a custom ant script that
uses the maven ant targets to download the applet to the webapp target
dir. Although I can't run the ant script via antrun due to another
issue (MNG-1017) ..
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Artifact with web resources (images, css etc.)
Posted by Piotr Bzdyl <pi...@bzdyl.net>.
Hi Mark,
> 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.
>
Actually, I already added my comment on this
(http://jira.codehaus.org/browse/MNG-896#action_49155), but I am asking
here because maybe somebody solve this problem in other way.
Best regards,
Piotrek
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Artifact with web resources (images, css etc.)
Posted by Mark Hobson <ma...@gmail.com>.
On 02/11/05, Piotr Bzdyl <pi...@bzdyl.net> wrote:
>
> > http://jira.codehaus.org/browse/MNG-896
> >
> BTW: when is it expected to be solved?
It's destined for 2.0.1, so hopefully soonish.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Artifact with web resources (images, css etc.)
Posted by Piotr Bzdyl <pi...@bzdyl.net>.
> http://jira.codehaus.org/browse/MNG-896
>
BTW: when is it expected to be solved?
Best regards,
Piotrek
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Artifact with web resources (images, css etc.)
Posted by Mark Hobson <ma...@gmail.com>.
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 <pi...@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