Author: snicoll Date: Mon Apr 17 08:22:05 2006 New Revision: 394695 URL: http://svn.apache.org/viewcvs?rev=394695&view=rev Log: MPWAR-32: Fixed inclusion of LICENSE file in war
Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/ (with props) maven/maven-1/plugins/trunk/war/src/plugin-test/test02/LICENSE.txt maven/maven-1/plugins/trunk/war/src/plugin-test/test02/maven.xml maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.properties maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.xml maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/index.html Modified: maven/maven-1/plugins/trunk/war/plugin.jelly Modified: maven/maven-1/plugins/trunk/war/plugin.jelly URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/plugin.jelly?rev=394695&r1=394694&r2=394695&view=diff ============================================================================== --- maven/maven-1/plugins/trunk/war/plugin.jelly (original) +++ maven/maven-1/plugins/trunk/war/plugin.jelly Mon Apr 17 08:22:05 2006 @@ -62,6 +62,9 @@ destfile="${maven.war.build.dir}/${maven.war.final.name}" basedir="${maven.war.webapp.dir}" index="${maven.war.index}"> + + <j:set var="licenseFileName"><license:fileName/></j:set> + <util:file name="${licenseFileName}" var="licenseFile"/> <ant:metainf dir="${licenseFile.canonicalFile.parent}"> <ant:include name="${licenseFile.canonicalFile.name}"/> </ant:metainf> Propchange: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Apr 17 08:22:05 2006 @@ -0,0 +1 @@ +target Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/LICENSE.txt URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/src/plugin-test/test02/LICENSE.txt?rev=394695&view=auto ============================================================================== --- maven/maven-1/plugins/trunk/war/src/plugin-test/test02/LICENSE.txt (added) +++ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/LICENSE.txt Mon Apr 17 08:22:05 2006 @@ -0,0 +1 @@ +Sample license \ No newline at end of file Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/maven.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/src/plugin-test/test02/maven.xml?rev=394695&view=auto ============================================================================== --- maven/maven-1/plugins/trunk/war/src/plugin-test/test02/maven.xml (added) +++ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/maven.xml Mon Apr 17 08:22:05 2006 @@ -0,0 +1,39 @@ +<!-- +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> +<project xmlns:j="jelly:core" + xmlns:assert="assert" + xmlns:u="jelly:util"> + + <goal name="testPlugin" prereqs="test-war"/> + + <goal name="test-war" prereqs="clean"> + <attainGoal name="war"/> + <j:set var="warFile" value="${maven.build.dir}/${pom.artifactId}.war"/> + <j:set var="warDir" value="${maven.build.dir}/${pom.artifactId}"/> + <assert:assertFileExists file="${warFile}"/> + <assert:assertFileExists file="${warDir}/WEB-INF/lib/commons-logging-1.0.4.jar"/> + + <!-- check for LICENSE file --> + <j:set var="unzipDir" value="${maven.build.dir}/unzippedWar"/> + <mkdir dir="${unzipDir}"/> + <unzip src="${warFile}" dest="${unzipDir}"/> + + <!-- check for the LICENSE --> + <assert:assertFileExists file="${unzipDir}/META-INF/LICENSE.txt"/> + </goal> +</project> \ No newline at end of file Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.properties URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.properties?rev=394695&view=auto ============================================================================== --- maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.properties (added) +++ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.properties Mon Apr 17 08:22:05 2006 @@ -0,0 +1 @@ + Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.xml?rev=394695&view=auto ============================================================================== --- maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.xml (added) +++ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/project.xml Mon Apr 17 08:22:05 2006 @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> + + +<project> + <pomVersion>3</pomVersion> + <id>test-maven-war-plugin-license</id> + <name>Maven War Plugin 02</name> + <groupId>maven</groupId> + <currentVersion>1.0</currentVersion> + <organization> + <name>Apache Software Foundation</name> + <url>http://www.apache.org/</url> + <logo>http://maven.apache.org/images/apache-maven-project.png</logo> + </organization> + <inceptionYear>2001</inceptionYear> + <package>org.apache.maven</package> + <logo>http://maven.apache.org/images/maven.gif</logo> + <description>Test for Maven War plugin, tests property maven.war.manifest</description> + <shortDescription>test for maven.war.manifest</shortDescription> + <url>http://maven.apache.org/maven-1.x/plugins/war/</url> + <siteDirectory>/www/maven.apache.org/maven-1.x/plugins/war/</siteDirectory> + <repository> + <connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/war/</connection> + <url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/war/</url> + </repository> + <dependencies> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <url>http://jakarta.apache.org/commons/logging.html</url> + <properties> + <war.bundle>true</war.bundle> + <war.manifest.classpath>true</war.manifest.classpath> + </properties> + </dependency> + </dependencies> +</project> Added: maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/index.html URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/index.html?rev=394695&view=auto ============================================================================== --- maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/index.html (added) +++ maven/maven-1/plugins/trunk/war/src/plugin-test/test02/src/webapp/index.html Mon Apr 17 08:22:05 2006 @@ -0,0 +1,25 @@ +<!-- +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + --> +<html> + <body> + <h1>Simple WebApp Home</h1> + <p> + This is a html page for Simple Web App + </p> + </body> +</html> \ No newline at end of file