From 428d590c789ba22dc00235fefa920eaea73f427d Mon Sep 17 00:00:00 2001 From: snicoll Date: Tue, 1 May 2007 16:09:07 +0000 Subject: [PATCH] MPWAR-61: Introduced war.target.filename dependency's property to customize the bundle filename. Note that this property should be used wit the war.target.path property git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@534142 13f79535-47bb-0310-9956-ffa450edef68 --- war/plugin.jelly | 12 +++- war/src/plugin-test/test06/LICENSE.txt | 1 + war/src/plugin-test/test06/maven.xml | 33 +++++++++++ war/src/plugin-test/test06/project.properties | 8 +++ war/src/plugin-test/test06/project.xml | 56 +++++++++++++++++++ .../plugin-test/test06/src/webapp/index.html | 26 +++++++++ war/xdocs/changes.xml | 4 ++ war/xdocs/index.xml | 16 +++++- 8 files changed, 151 insertions(+), 5 deletions(-) create mode 100644 war/src/plugin-test/test06/LICENSE.txt create mode 100644 war/src/plugin-test/test06/maven.xml create mode 100644 war/src/plugin-test/test06/project.properties create mode 100644 war/src/plugin-test/test06/project.xml create mode 100644 war/src/plugin-test/test06/src/webapp/index.html diff --git a/war/plugin.jelly b/war/plugin.jelly index 1cad8b92..c6e5aff3 100644 --- a/war/plugin.jelly +++ b/war/plugin.jelly @@ -235,9 +235,15 @@ - - - + + + + + + + + + diff --git a/war/src/plugin-test/test06/LICENSE.txt b/war/src/plugin-test/test06/LICENSE.txt new file mode 100644 index 00000000..6192027b --- /dev/null +++ b/war/src/plugin-test/test06/LICENSE.txt @@ -0,0 +1 @@ +Sample license \ No newline at end of file diff --git a/war/src/plugin-test/test06/maven.xml b/war/src/plugin-test/test06/maven.xml new file mode 100644 index 00000000..d0629369 --- /dev/null +++ b/war/src/plugin-test/test06/maven.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/war/src/plugin-test/test06/project.properties b/war/src/plugin-test/test06/project.properties new file mode 100644 index 00000000..9bf0a69b --- /dev/null +++ b/war/src/plugin-test/test06/project.properties @@ -0,0 +1,8 @@ + +# +# Expand properties +maven.war.property.expansion=true + +# +# Property being replaced +my.cool.property=${pom.artifactId} diff --git a/war/src/plugin-test/test06/project.xml b/war/src/plugin-test/test06/project.xml new file mode 100644 index 00000000..733f2ae2 --- /dev/null +++ b/war/src/plugin-test/test06/project.xml @@ -0,0 +1,56 @@ + + + + + + 3 + test-maven-war-plugin-target-filename + Maven War Plugin 06 + maven + 1.0 + + Apache Software Foundation + http://www.apache.org/ + http://maven.apache.org/images/apache-maven-project.png + + 2001 + org.apache.maven + http://maven.apache.org/images/maven.gif + Test for Maven War plugin, tests maven.war.target.filename + test for maven.war.property.expansion + http://maven.apache.org/maven-1.x/plugins/war/ + /www/maven.apache.org/maven-1.x/plugins/war/ + + scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/war/ + http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/war/ + + + + commons-logging + commons-logging + 1.0.4 + http://jakarta.apache.org/commons/logging.html + + libs + commons-logging.jar + + + + diff --git a/war/src/plugin-test/test06/src/webapp/index.html b/war/src/plugin-test/test06/src/webapp/index.html new file mode 100644 index 00000000..a57c1fc5 --- /dev/null +++ b/war/src/plugin-test/test06/src/webapp/index.html @@ -0,0 +1,26 @@ + + + +

Simple WebApp Home

+

+ This is a html page for ${my.cool.property} +

+ + \ No newline at end of file diff --git a/war/xdocs/changes.xml b/war/xdocs/changes.xml index 9528cd6e..5e0fb117 100644 --- a/war/xdocs/changes.xml +++ b/war/xdocs/changes.xml @@ -25,6 +25,10 @@ + + Introduced war.target.filename dependency's property to customize the bundle filename. Note + that this property should be used wit the war.target.path property. + Added maven.war.expansion.excludes property to exclude files during a property expansion copy (Fixes corruption of binary files). Applied property expansion to web.xml handling for consistency. Introduced the maven.war.src.filtering diff --git a/war/xdocs/index.xml b/war/xdocs/index.xml index 0d69d2c7..8f8b755e 100644 --- a/war/xdocs/index.xml +++ b/war/xdocs/index.xml @@ -40,9 +40,12 @@ properties you can use.

/WEB-INF/lib war.target.pathThis bundles the dependency in the path specified relative to the base of the web application. +war.target.filenameThis specifies the filename of the +the dependency in the path specified by the war.target.path property. -

For example, the following adds commons-lang to /WEB-INF/lib and -myApplet to the /applets directory. +

For example, the following adds commons-lang to /WEB-INF/lib, +myApplet to the /applets directory and anotherApplet in +/applets/another-applet.jar.

@@ -59,6 +62,15 @@ myApplet to the /applets directory. applets + + + + anotherApplet + 1.2 + + applets + another-applet.jar + ]]>