Return-Path: Delivered-To: apmail-maven-m2-dev-archive@www.apache.org Received: (qmail 39891 invoked from network); 7 Mar 2005 21:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Mar 2005 21:46:16 -0000 Received: (qmail 58789 invoked by uid 500); 7 Mar 2005 21:46:16 -0000 Delivered-To: apmail-maven-m2-dev-archive@maven.apache.org Received: (qmail 58738 invoked by uid 500); 7 Mar 2005 21:46:16 -0000 Mailing-List: contact m2-dev-help@maven.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Maven 2 Developers List" Reply-To: "Maven 2 Developers List" Delivered-To: mailing list m2-dev@maven.apache.org Received: (qmail 58725 invoked by uid 500); 7 Mar 2005 21:46:16 -0000 Delivered-To: apmail-maven-components-cvs@apache.org Received: (qmail 58722 invoked by uid 99); 7 Mar 2005 21:46:16 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 07 Mar 2005 13:46:15 -0800 Received: (qmail 39867 invoked by uid 1238); 7 Mar 2005 21:46:14 -0000 Date: 7 Mar 2005 21:46:14 -0000 Message-ID: <20050307214614.39866.qmail@minotaur.apache.org> From: evenisse@apache.org To: maven-components-cvs@apache.org Subject: cvs commit: maven-components/maven-core-it/it0016/src/main/webapp index.html X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N evenisse 2005/03/07 13:46:14 Modified: maven-core-it integration-tests.txt maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war WarMojo.java Added: maven-core-it/it0016/src/main/webapp/WEB-INF web.xml maven-core-it/it0016/src/main/webapp index.html Log: Initial version of war plugin. Revision Changes Path 1.18 +1 -0 maven-components/maven-core-it/integration-tests.txt Index: integration-tests.txt =================================================================== RCS file: /home/cvs/maven-components/maven-core-it/integration-tests.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- integration-tests.txt 7 Mar 2005 08:54:14 -0000 1.17 +++ integration-tests.txt 7 Mar 2005 21:46:14 -0000 1.18 @@ -12,3 +12,4 @@ it0013 #it0014 it0015 +it0016 \ No newline at end of file 1.4 +14 -9 maven-components/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java Index: WarMojo.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- WarMojo.java 5 Mar 2005 14:52:11 -0000 1.3 +++ WarMojo.java 7 Mar 2005 21:46:14 -0000 1.4 @@ -82,7 +82,7 @@ * required="true" * validator="" * expression="#maven.war.src" - * default="#basedir/src/webapp" + * default="#basedir/src/main/webapp" * description="" * @parameter * name="warSourceIncludes" @@ -93,7 +93,7 @@ * default="**" * description="" * @parameter - * name="warSourceIncludes" + * name="warSourceExcludes" * type="String" * required="false" * validator="" @@ -112,7 +112,7 @@ * required="true" * validator="" * expression="#maven.war.webapp.dir" - * default="#project.build.output/#project.build.finalName" + * default="#project.build.directory/#project.build.finalName" * description="" * @parameter * name="mode" @@ -128,7 +128,7 @@ * required="true" * validator="" * expression="#maven.war.build.dir" - * default="#project.build.output" + * default="#project.build.directory" * description="" * @parameter * name="basedir" @@ -157,7 +157,7 @@ public class WarMojo extends AbstractPlugin { - public static final String WEB_INF = "WEB_INF"; + public static final String WEB_INF = "WEB-INF"; private PluginExecutionRequest request; @@ -190,7 +190,8 @@ if ( warSourceDirectory.exists() ) { - FileUtils.copyDirectory( sourceDirectory, webappDirectory, includes, excludes ); + //TODO : Use includes and excludes + FileUtils.copyDirectoryStructure( sourceDirectory, webappDirectory ); } if ( webXml != null && ! "".equals( webXml ) ) @@ -281,11 +282,15 @@ MavenArchiver archiver = new MavenArchiver(); - //archiver.setArchiver( new WarArchiver() ); + WarArchiver warArchiver = new WarArchiver(); + + archiver.setArchiver( warArchiver ); archiver.setOutputFile( warFile ); - archiver.getArchiver().addDirectory( webappDirectory, new String[] { "**/**" }, null ); + warArchiver.addDirectory( webappDirectory, new String[] { "**/**" }, new String[] { "**/WEB-INF/web.xml" } ); + + warArchiver.setWebxml( new File( webappDirectory, "WEB-INF/web.xml" ) ); // create archive archiver.createArchive( request ); 1.1 maven-components/maven-core-it/it0016/src/main/webapp/WEB-INF/web.xml Index: web.xml =================================================================== 1.1 maven-components/maven-core-it/it0016/src/main/webapp/index.html Index: index.html =================================================================== Hello World