You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "David Boden (JIRA)" <ji...@codehaus.org> on 2006/01/06 13:38:01 UTC

[jira] Commented: (MWAR-18) Need to declare dependencies as resources outside of WEB-INF in WARs

    [ http://jira.codehaus.org/browse/MWAR-18?page=comments#action_55081 ] 

David Boden commented on MWAR-18:
---------------------------------

I've written a new goal as part of the webstart plugin.

First, I use the webstart plugin to package up my webstart application and all its dependencies into a zip artifact.

Then, from my web application, I run my goal to pull in the artifact and extract the zip into my web application.

I would have thought that this simple scenario should be handled by the war plugin. 



Here's my webapp's pom.xml. Look for the addWebstartArtifact plugin section:

{{
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>SalesStation</groupId>
        <artifactId>SSBuild</artifactId>
        <version>SNAPSHOT</version>
        <relativePath>../SSBuild/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>SalesStation</groupId>
    <artifactId>SS</artifactId>
    <packaging>war</packaging>
    <version>SNAPSHOT</version>
    <name>SalesStation SS webapp</name>
    
    <build>
        <sourceDirectory>WEB-INF/src</sourceDirectory>
        <finalName>SS</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <warSourceDirectory>.</warSourceDirectory>
                    <excludes>target/**</excludes>
                    <!-- The ../SS is in there to fix a Maven Bug :o( -->
                    <webXml>../SS/WEB-INF/maven-web.xml</webXml>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>webstart-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addWebstartArtifact</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <webstartSubdirectory>webstart</webstartSubdirectory>
                    <webstartArtifact>
                        <groupId>SalesStation</groupId>
                        <artifactId>sales_station_applet</artifactId>
                        <version>SNAPSHOT</version>
                        <type>zip</type>
                    </webstartArtifact>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <!-- Servlet classes come from sales_station_lib -->
        <dependency>
            <groupId>SalesStation</groupId>
            <artifactId>sales_station_lib</artifactId>
            <version>SNAPSHOT</version>
        </dependency>
        
        <!-- Sun's JnlpDownladServlet takes the template jnlp file and inserts
             relevant values for codebase and other parameters -->
        <dependency>
          <groupId>com.sun.java.jnlp</groupId>
          <artifactId>jnlp-servlet</artifactId>
          <version>5.0</version>
          <scope>runtime</scope>
        </dependency>
    </dependencies>
</project>
}}

> Need to declare dependencies as resources outside of WEB-INF in WARs
> --------------------------------------------------------------------
>
>          Key: MWAR-18
>          URL: http://jira.codehaus.org/browse/MWAR-18
>      Project: Maven 2.x War Plugin
>         Type: Improvement

>     Reporter: Mark Hobson

>
>
> Need to be able to declare maven dependencies as resources within WARs.  Currently all dependencies are placed within WEB-INF/lib.
> Typical use-case is for a war project to pull in an applet from the repo to be included in the package.  Would need to specify the whereabouts of the applet in the WAR.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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