Author: brett
Date: Thu Jul  6 22:56:54 2006
New Revision: 419813

URL: http://svn.apache.org/viewvc?rev=419813&view=rev
Log:
[MWAR-48] apply some more documentation contributions
Submitted by: Pete Marvin King

Added:
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt
      - copied unchanged from r419812, 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
Removed:
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/example-overlay.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/exploded.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/inplace.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/introduction.apt
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/war.apt
Modified:
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt
    maven/plugins/trunk/maven-war-plugin/src/site/site.xml

Modified: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt?rev=419813&r1=419812&r2=419813&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
 (original)
+++ 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
 Thu Jul  6 22:56:54 2006
@@ -49,7 +49,7 @@
      `-- main
          |-- java
          |   `-- com
-         |       `-- ideal
+         |       `-- example
          |           `-- projects
          |               `-- SampleAction.java
          |-- resources
@@ -71,14 +71,14 @@
  |-- META-INF
  |   |-- MANIFEST.MF
  |   `-- maven
- |       `-- com.ideal.projects
+ |       `-- com.example.projects
  |           `-- documentedproject
  |               |-- pom.properties
  |               `-- pom.xml
  |-- WEB-INF
  |   |-- classes
  |   |   |-- com
- |   |   |   `-- ideal
+ |   |   |   `-- example
  |   |   |       `-- projects
  |   |   |           `-- SampleAction.class
  |   |   `-- images
@@ -210,7 +210,7 @@
      `-- main
          |-- java
          |   `-- com
-         |       `-- ideal
+         |       `-- example
          |           `-- projects
          |               `-- SampleAction.java
          |-- resources
@@ -275,14 +275,14 @@
  |-- META-INF
  |   |-- MANIFEST.MF
  |   `-- maven
- |       `-- com.ideal.projects
+ |       `-- com.example.projects
  |           `-- documentedproject
  |               |-- pom.properties
  |               `-- pom.xml
  |-- WEB-INF
  |   |-- classes
  |   |   |-- com
- |   |   |   `-- ideal
+ |   |   |   `-- example
  |   |   |       `-- projects
  |   |   |           `-- SampleAction.class
  |   |   `-- images
@@ -339,14 +339,14 @@
  |-- META-INF
  |   |-- MANIFEST.MF
  |   `-- maven
- |       `-- com.ideal.projects
+ |       `-- com.example.projects
  |           `-- documentedproject
  |               |-- pom.properties
  |               `-- pom.xml
  |-- WEB-INF
  |   |-- classes
  |   |   |-- com
- |   |   |   `-- ideal
+ |   |   |   `-- example
  |   |   |       `-- projects
  |   |   |           `-- SampleAction.class
  |   |   `-- images

Modified: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt?rev=419813&r1=419812&r2=419813&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt 
(original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt 
Thu Jul  6 22:56:54 2006
@@ -22,7 +22,7 @@
      `-- main
          |-- java
          |   `-- com
-         |       `-- ideal
+         |       `-- example
          |           `-- projects
          |               `-- SampleAction.java
          |-- resources
@@ -44,14 +44,14 @@
  |-- META-INF
  |   |-- MANIFEST.MF
  |   `-- maven
- |       `-- com.ideal.projects
+ |       `-- com.example.projects
  |           `-- documentedprojectdependency
  |               |-- pom.properties
  |               `-- pom.xml
  |-- WEB-INF
  |   |-- classes
  |   |   |-- com
- |   |   |   `-- ideal
+ |   |   |   `-- example
  |   |   |       `-- projects
  |   |   |           `-- SampleActionDependency.class
  |   |   |-- images
@@ -76,7 +76,7 @@
   [...]
     <dependencies>
       <dependency>
-         <groupId>com.ideal.projects</groupId>
+         <groupId>com.example.projects</groupId>
          <artifactId>documentedprojectdependency</artifactId>
          <version>1.0-SNAPSHOT</version>
          <type>war</type>
@@ -94,7 +94,7 @@
  |-- META-INF
  |   |-- MANIFEST.MF
  |   `-- maven
- |       `-- com.ideal.projects
+ |       `-- com.example.projects
  |           |-- documentedproject
  |           |   |-- pom.properties
  |           |   `-- pom.xml
@@ -104,7 +104,7 @@
  |-- WEB-INF
  |   |-- classes
  |   |   |-- com
- |   |   |   `-- ideal
+ |   |   |   `-- example
  |   |   |       `-- projects
  |   |   |           |-- SampleAction.class
  |   |   |           `-- SampleActionDependency.class

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt?rev=419813&r1=419812&r2=419813&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt Thu Jul  6 
22:56:54 2006
@@ -5,24 +5,35 @@
  ------
  27 June 2006
 
-Introduction
+Basic Usage
 
- The war plugin is responsible for collecting all artifact dependencies, 
classes
- and resources of the web application and packaging them into a web 
application archive.
+ There are 4 ways to use the war plugin :
  
-Basic Usage
+ *using the package phase with the project package type as war
+ 
+ *invocation of the <<<war:war>>> goal.
+ 
+ *invocation of the <<<war:exploded>>> goal
+ 
+ *invocation of the <<<war:inplace>>> goal
 
- Given the <<<pom.xml>>>
-  
+ <<When using the war goals it is assumed that the compile phase is already 
done. The war plugin is not responsible
+   for compiling the java sources or copying of the resources.>> 
+
+*Using the package phase with the project package type as war / invocation of 
the <<<war:war>>> goal
+
+ This is the common way to use the war plugin. 
+ To illustrate, given the <<<pom.xml>>>
+    
 +----------+
   <project>
      [...]
-     <groupId>com.ideal.projects</groupId>
+     <groupId>com.example.projects</groupId>
      <artifactId>documentedproject</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>Documented Project</name>
-     <url>http://ideal.com</url>
+     <url>http://example.com</url>
      [...]
   </project>
 +----------+
@@ -36,7 +47,7 @@
      `-- main
          |-- java
          |   `-- com
-         |       `-- ideal
+         |       `-- example
          |           `-- projects
          |               `-- SampleAction.java
          |-- resources
@@ -57,6 +68,12 @@
    mvn package
 +----------+
 
+ or
+
++----------+
+   mvn compile war:war
++----------+ 
+
  generates the war file <<<target/documentedproject-1.0-SNAPSHOT.war>>>.
   
 +----------+
@@ -64,14 +81,14 @@
   |-- META-INF
   |   |-- MANIFEST.MF
   |   `-- maven
-  |       `-- com.ideal.projects
+  |       `-- com.example.projects
   |           `-- documentedproject
   |               |-- pom.properties
   |               `-- pom.xml
   |-- WEB-INF
   |   |-- classes
   |   |   |-- com
-  |   |   |   `-- ideal
+  |   |   |   `-- example
   |   |   |       `-- projects
   |   |   |           `-- SampleAction.class
   |   |   `-- images
@@ -81,12 +98,104 @@
   `-- jsp
       `-- websource.jsp
 +----------+    
-  
-Related links
 
- {{{http://maven.apache.org/guides/mini/guide-manifest.html}Guide to manifest 
customization}}
+*Invocation of <<<war:exploded>>> goal
  
- 
{{{http://maven.apache.org/guides/mini/guide-archive-configuration.html}Exclusion
 of Maven Descriptors}}
+ To speed up testing during the developement phase, war:explode can be use to 
generate the war in exploded
+ form.
+ Using the same project above and invoking 
+ 
++----------+
+   mvn compile mvn:exploded
++----------+
 
+ would generate an exploded version of the war in 
<<<target/documentedproject-1.0-SNAPSHOT>>>
+ 
++----------+
+   documentedproject-1.0-SNAPSHOT
+   |-- META-INF
+   |-- WEB-INF
+   |   |-- classes
+   |   |   |-- com
+   |   |   |   `-- example
+   |   |   |       `-- projects
+   |   |   |           `-- SampleAction.class
+   |   |   `-- images
+   |   |       `-- sampleimage.jpg
+   |   `-- web.xml
+   |-- index.jsp
+   `-- jsp
+       `-- websource.jsp
++----------+ 
+
+ The default directory for the exploded war is <<<target/\<finalName\>>>>. The 
finalName is usually in the form
+ of \<artifact\>-\<version\>. 
+ This default directory can be overridden by specifying the webAppDirectory 
plugin parameter.
   
++-------+
+[...]
+  <plugins>
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-war-plugin</artifactId>
+      <version>2.0</version>
+      <configuration>
+         
<webAppDirectory>/sample/servlet/container/deploy/directory<webAppDirectory>    
+      </configuration>
+    </plugin>
+  </plugins>
+[...]  
++-------+  
+
+*Invocation of <<<war:inplace>>> goal
+ 
+ Another variation of the <<<war:exploded>>> is the <<<war:inplace>>>. In 
<<<war:inplace>>> the exploded war is created
+ in the webapp source which defaults to <<<src/main/webapp>>>. 
+ Using our sample project above, invoking
+ 
++----------+
+   mvn compile mvn:exploded
++----------+
+
+ would result to
+ 
++----------+
+ .
+ |-- pom.xml
+ |-- src
+ |   `-- main
+ |       |-- java
+ |       |   `-- com
+ |       |       `-- ideal
+ |       |           `-- projects
+ |       |               `-- SampleAction.java
+ |       |-- resources
+ |       |   |-- images
+ |       |   |   `-- sampleimage.jpg
+ |       |   `-- sampleresource
+ |       `-- webapp
+ |           |-- META-INF
+ |           |-- WEB-INF
+ |           |   |-- classes
+ |           |   |   |-- com
+ |           |   |   |   `-- ideal
+ |           |   |   |       `-- projects
+ |           |   |   |           `-- SampleAction.class
+ |           |   |   `-- images
+ |           |   |       `-- sampleimage.jpg
+ |           |   `-- web.xml
+ |           |-- index.jsp
+ |           `-- jsp
+ |               `-- websource.jsp
+ `-- target
+     `-- classes
+         |-- com
+         |   `-- ideal
+         |       `-- projects
+         |           `-- SampleAction.class
+         `-- images
+             `-- sampleimage.jpg
++----------+ 
+ 
+ 
   

Modified: maven/plugins/trunk/maven-war-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/site.xml?rev=419813&r1=419812&r2=419813&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/site.xml Thu Jul  6 22:56:54 
2006
@@ -32,19 +32,15 @@
       <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
     </links>
     <menu name="Overview">
-      <item name="Introduction" href="plugin-info.html"/>
-      <item name="HOWTO" href="usage.html"/>
-      <!-- When we later have FAQs...
-      <item name="FAQ" href="faq.html"/>
-      -->
+      <item name="Introduction" href="overview.html"/>
+      <item name="Usage" href="usage.html"/>
+      <!--<item name="FAQ" href="faq.html"/> -->
     </menu>
-    <menu name="Advance Configuration">
+    <menu name="Examples">
       <item name="Adding web resources" 
href="examples/adding-filtering-webresources.html"/>   
       <item name="Adding external web sources" 
href="examples/war-overlay.html"/>
       <item name="War manifest customization" 
href="examples/war-manifest-guide.html"/>
-    </menu>
-    <menu name="Tips">
-      <item name="Rapid testing using jetty6" 
href="tips/rapid-testing-jetty6-plugin.html"/>
+      <item name="Rapid testing using jetty6" 
href="examples/rapid-testing-jetty6-plugin.html"/>
     </menu>
     ${reports}
   </body>


Reply via email to