From 4d67c57d7489f4d91f60aaa456cffb2902b54401 Mon Sep 17 00:00:00 2001 From: Emmanuel Venisse Date: Thu, 3 Mar 2005 09:04:36 +0000 Subject: [PATCH] Initialization of war plugin. It doesn't work but don't break ci.sh and it's for Brett debugging. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163449 13f79535-47bb-0310-9956-ffa450edef68 --- maven-mboot2/src/main/java/MBoot.java | 3 +- maven-plugins/maven-war-plugin/.cvsignore | 8 ++ maven-plugins/maven-war-plugin/pom.xml | 49 +++++++ .../apache/maven/plugin/war/ExplodedMojo.java | 120 ++++++++++++++++++ 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 maven-plugins/maven-war-plugin/.cvsignore create mode 100644 maven-plugins/maven-war-plugin/pom.xml create mode 100644 maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/ExplodedMojo.java diff --git a/maven-mboot2/src/main/java/MBoot.java b/maven-mboot2/src/main/java/MBoot.java index b1a50984cb..ae524780cb 100644 --- a/maven-mboot2/src/main/java/MBoot.java +++ b/maven-mboot2/src/main/java/MBoot.java @@ -97,7 +97,8 @@ public class MBoot "maven-plugins/maven-plugin-plugin", "maven-plugins/maven-pom-plugin", "maven-plugins/maven-resources-plugin", - "maven-plugins/maven-surefire-plugin" }; + "maven-plugins/maven-surefire-plugin", + "maven-plugins/maven-war-plugin" }; // ---------------------------------------------------------------------- // Standard locations for resources in Maven projects. diff --git a/maven-plugins/maven-war-plugin/.cvsignore b/maven-plugins/maven-war-plugin/.cvsignore new file mode 100644 index 0000000000..cce9515ca7 --- /dev/null +++ b/maven-plugins/maven-war-plugin/.cvsignore @@ -0,0 +1,8 @@ +target +*~ +*.log +.classpath +.project +*.ipr +*.iws +*.iml diff --git a/maven-plugins/maven-war-plugin/pom.xml b/maven-plugins/maven-war-plugin/pom.xml new file mode 100644 index 0000000000..ac50ea0513 --- /dev/null +++ b/maven-plugins/maven-war-plugin/pom.xml @@ -0,0 +1,49 @@ + + + + 4.0.0 + + maven + maven-plugin-parent + 2.0-SNAPSHOT + + maven + maven-war-plugin + plugin + Maven War Plugin + 1.0-SNAPSHOT + org.apache.maven.plugin.war + + + maven + maven-jar-plugin + 1.0-SNAPSHOT + plugin + + + plexus + plexus-container-default + 1.0-alpha-2-SNAPSHOT + + + plexus + plexus-archiver + 1.0-alpha-1-SNAPSHOT + + + maven + maven-artifact + 2.0-SNAPSHOT + + + maven + maven-core + 2.0-SNAPSHOT + + + maven + maven-model + 2.0-SNAPSHOT + + + diff --git a/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/ExplodedMojo.java b/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/ExplodedMojo.java new file mode 100644 index 0000000000..ec50491c1f --- /dev/null +++ b/maven-plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/ExplodedMojo.java @@ -0,0 +1,120 @@ +package org.apache.maven.plugin.war; + +/* + * Copyright 2001-2005 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. + */ + +import org.apache.maven.plugin.AbstractPlugin; +import org.apache.maven.plugin.PluginExecutionRequest; +import org.apache.maven.plugin.PluginExecutionResponse; +import org.apache.maven.project.MavenProject; + +/** + * @goal exploded + * @phase process-classes + * + * @description build a jar + * + * @parameter + * name="jarName" + * type="String" + * required="true" + * validator="" + * expression="#project.build.finalName" + * description="" + * @parameter + * name="compress" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.compress" + * default="true" + * description="" + * @parameter + * name="index" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.index" + * default="false" + * description="" + * @parameter + * name="manifest" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.manifest" + * description="" + * @parameter + * name="mainClass" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.mainClass" + * description="" + * @parameter + * name="addClasspath" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.addClasspath" + * default="false" + * description="" + * @parameter + * name="addExtensions" + * type="String" + * required="false" + * validator="" + * expression="#maven.jar.addExtensions" + * default="false" + * description="" + * @parameter + * name="outputDirectory" + * type="String" + * required="true" + * validator="" + * expression="#project.build.output" + * description="" + * @parameter + * name="basedir" + * type="String" + * required="true" + * validator="" + * expression="#project.build.directory" + * description="" + * @parameter + * name="project" + * type="org.apache.maven.project.MavenProject" + * required="true" + * validator="" + * expression="#project" + * description="current MavenProject instance" + * + * @author Emmanuel Venisse + * @version $Id$ + */ +public class ExplodedMojo + extends AbstractPlugin +{ + public void execute( PluginExecutionRequest request, PluginExecutionResponse response ) + throws Exception + { + // ---------------------------------------------------------------------- + // + // ---------------------------------------------------------------------- +System.out.println("webapp"); + + } +} \ No newline at end of file