Author: brett
Date: Mon Jul  3 23:37:16 2006
New Revision: 418927

URL: http://svn.apache.org/viewvc?rev=418927&view=rev
Log:
[MWAR-48] documentation improvements
Submitted by: Pete Marvin King

Added:
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
   (with props)
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
   (with props)
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt  
 (with props)
    maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/
    
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
   (with props)
    maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt   (with props)
Modified:
    
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/war.apt
    maven/plugins/trunk/maven-war-plugin/src/site/site.xml

Added: 
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=418927&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
 Mon Jul  3 23:37:16 2006
@@ -0,0 +1,371 @@
+ ------
+ Maven 2 War Plugin - adding and filtering external web resources
+ ------
+ Pete Marvin King
+ ------
+ 19 June 2006
+ 
+Introduction
+
+ The default resource directory for all maven2 projects is 
<<<src/main/resources>>> which
+ will end up in <<<target/classes>>> and in <<<WEB-INF/classes>>> in the war. 
The directory
+ structure will be preserved in the process.
+ 
+ The war plugin is also capable of including resources not found in the 
default resource
+ directory through the <<<webResources>>> parameter of the war plugin. 
+ 
+*POM configuration
+ 
++-------+
+[...]
+  <plugins>
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-war-plugin</artifactId>
+      <version>2.0</version>
+      <configuration>
+        <webResources>
+          <resource>
+            <!-- this is relative to the pom.xml directory -->
+            <directory>resource2</directory>
+          </resource>
+        </webResources>
+       </configuration>
+     </plugin>
+  </plugins>
+[...]  
++-------+
+
+ Using our sample project in the basic usage section with an added external 
resource
+ 
++----------+
+ .
+ |-- pom.xml
+ |-- resource2
+ |   |-- external-resource.jpg
+ |   `-- image2
+ |       `-- external-resource2.jpg
+ `-- src
+     `-- main
+         |-- java
+         |   `-- com
+         |       `-- ideal
+         |           `-- projects
+         |               `-- SampleAction.java
+         |-- resources
+         |   |-- images
+         |   |   `-- sampleimage.jpg
+         |   `-- sampleresource
+         `-- webapp
+             |-- WEB-INF
+             |   `-- web.xml
+             |-- index.jsp
+             `-- jsp
+                 `-- websource.jsp
++----------+
+
+ would end up in the war as
+ 
++----------+
+documentedproject-1.0-SNAPSHOT.war 
+ |-- META-INF
+ |   |-- MANIFEST.MF
+ |   `-- maven
+ |       `-- com.ideal.projects
+ |           `-- documentedproject
+ |               |-- pom.properties
+ |               `-- pom.xml
+ |-- WEB-INF
+ |   |-- classes
+ |   |   |-- com
+ |   |   |   `-- ideal
+ |   |   |       `-- projects
+ |   |   |           `-- SampleAction.class
+ |   |   `-- images
+ |   |       `-- sampleimage.jpg
+ |   `-- web.xml
+ |-- external-resource.jpg
+ |-- image2
+ |   `-- external-resource2.jpg
+ |-- index.jsp
+ `-- jsp
+     `-- websource.jsp
++----------+
+ 
+ <<<external-resource2.jpg>>> and <<<image2>>> are copied to the root of the 
war, preserving the
+ directory structure.
+ 
+*Configuring webResources
+ 
+ <<<webResources>>> is a list of resources. All options of resource is 
supported.
+ 
+ A web resource
+ 
+  * can have inclusion/exclusion 
+    
+  * can be filtered  
+  
+  * is not limited to the default destination - the root of the war.  
+  
+**Inclusion/Exclusion for webResources
+
+ using our pom configuration above we can add
+ 
++----------+  
+ [..]
+      <configuration>
+        <webResources>        
+          <resource>
+            <!-- this is relative to the pom.xml directory -->
+            <directory>resource2</directory>
+            <!-- the list has a default value of ** -->
+            <includes>
+               <include>**/*.jpg</include>
+            <includes>                  
+          </resource>
+        </webResources>
+      </configuration  
+  [...]
++----------+  
+  
+  to include all jpgs to the war or
+  
++----------+  
+ [..]
+      <configuration>
+        <webResources>
+          <resource>
+            <!-- this is relative to the pom.xml directory -->
+            <directory>resource2</directory>
+            <!-- there's no default value for this -->
+            <excludes>
+               <exclude>**/image2</exlude>                     
+            </excludes>
+          </resource>
+        </webResources>
+  [...]
++----------+    
+  
+ to exclude the image2 directory from the the war. Be careful when mixing 
include and exclude,
+ exclude will have a higher priority. Include can not override exclude if a 
resource matches
+ both.
+  
+ Having this configuration 
+  
++----------+  
+ [...]
+    <configuration>
+      <webResources>
+        <resource>
+          <!-- this is relative to the pom.xml directory -->
+          <directory>resource2/</directory>
+          <!-- the list has a default value of ** -->
+          <includes>
+             <include>image2/*.jpg</include>
+          <includes>          
+          <!-- there's no default value for this -->
+          <excludes>
+             <exclude>**/*.jpg</exlude>
+          </excludes>
+        </resource>
+      </webResources>
+    </configuration>  
+  [...]
++----------+    
+  
+  will exclude all jpgs from the war. Another example of how to specify 
include and exclude patterns :
+  
++----------+  
+  [...]   
+    <!-- the default value is ** -->
+    <includes>
+       <include>**/pattern1</include>
+       <include>*pattern2</include>
+    <includes>   
+    <!-- there's no default value for this -->
+    <excludes>
+       <exclude>*pattern3/pattern3</exclude>
+       <exclude>pattern4/pattern4</exclude>
+    </exludes>
+  [...]
++----------+      
+  
+**Filtering webResources
+
+  Using our example above, we can also configure filters for our resources.
+  We will add a hypothetical configuration directory on our project
+  
++----------+
+ .
+ |-- configurations
+ |   |-- config.cfg
+ |   `-- properties
+ |       `-- config.prop
+ |-- pom.xml
+ |-- resource2
+ |   |-- external-resource.jpg
+ |   `-- image2
+ |       `-- external-resource2.jpg
+ `-- src
+     `-- main
+         |-- java
+         |   `-- com
+         |       `-- ideal
+         |           `-- projects
+         |               `-- SampleAction.java
+         |-- resources
+         |   |-- images
+         |   |   `-- sampleimage.jpg
+         |   `-- sampleresource
+         `-- webapp
+             |-- WEB-INF
+             |   `-- web.xml
+             |-- index.jsp
+             `-- jsp
+                 `-- websource.jsp  
++----------+    
+
+***with the following in our pom.xml :
+ 
++----------+    
+ [...]
+    <configuration>
+       <!-- the default value is the filter list under build -->
+       <!-- specifying a filter will override the filter list under build -->  
  
+       <filters>
+         <filter>properties/config.prop</filters>
+       </filters    
+       <webResources>
+         <resource>
+           <directory>resource2</directory>
+           <!-- it's not a good idea to filter binary files -->
+           <filtering>false</filtering>
+         </resource>
+         <resource>
+           <directory>configurations</directory>
+           <!-- enable filtering -->
+           <filtering>true</filtering>
+           <excludes>
+              <exclude>**/properties<exclude>
+           </excludes>
+         </resource>
+       </webResources>
+    </configuration>
+ [...]
++----------+    
+
+***with <<<config.prop>>>
+
++----------+    
+   interpolated_property=some_config_value
++----------+      
+
+***with <<<configuration.cfg>>>
+ 
++----------+      
+<another_ioc_container>
+   <configuration>${interpolated_property}</configuration>
+</another_ioc_container>   
++----------+      
+
+ the resulting war would be
+ 
++----------+      
+documentedproject-1.0-SNAPSHOT.war
+ |-- META-INF
+ |   |-- MANIFEST.MF
+ |   `-- maven
+ |       `-- com.ideal.projects
+ |           `-- documentedproject
+ |               |-- pom.properties
+ |               `-- pom.xml
+ |-- WEB-INF
+ |   |-- classes
+ |   |   |-- com
+ |   |   |   `-- ideal
+ |   |   |       `-- projects
+ |   |   |           `-- SampleAction.class
+ |   |   `-- images
+ |   |       `-- sampleimage.jpg
+ |   `-- web.xml
+ |-- config.cfg
+ |-- external-resource.jpg
+ |-- image2
+ |   `-- external-resource2.jpg
+ |-- index.jsp
+ `-- jsp
+     `-- websource.jsp 
++----------+       
+
+ with <<<config.cfg>>> content of
+
++----------+
+<another_ioc_container>
+   <configuration>some_config_value</configuration>
+</another_ioc_container>   
++----------+
+
+**Overriding the default destination directory of a web resource
+
+ By default web resources are copied to the root of the war, as shown in the 
previous example. 
+ To override the default destination directory, specify the target path.
+ 
++----------+  
+ [...]
+    <configuration>
+      <webResources>
+        <resource>
+         [...]
+         <resource>
+           <directory>configurations</directory>
+           <!-- override the destination directory for this resource -->   
+           <targetPath>WEB-INF</targetPath>
+           <!-- enable filtering -->
+           <filtering>true</filtering>
+           <excludes>
+              <exclude>**/properties<exclude>
+           </excludes>
+         </resource>        
+        </resource>
+      </webResources>
+    </configuration>  
+  [...]
++----------+    
+
+ using the sample project the resulting war would look like this
+ 
++----------+      
+documentedproject-1.0-SNAPSHOT.war
+ |-- META-INF
+ |   |-- MANIFEST.MF
+ |   `-- maven
+ |       `-- com.ideal.projects
+ |           `-- documentedproject
+ |               |-- pom.properties
+ |               `-- pom.xml
+ |-- WEB-INF
+ |   |-- classes
+ |   |   |-- com
+ |   |   |   `-- ideal
+ |   |   |       `-- projects
+ |   |   |           `-- SampleAction.class
+ |   |   `-- images
+ |   |       `-- sampleimage.jpg
+ |   |-- config.cfg
+ |   `-- web.xml
+ |-- external-resource.jpg
+ |-- image2
+ |   `-- external-resource2.jpg
+ |-- index.jsp
+ `-- jsp
+     `-- websource.jsp
++----------+       
+
+  
+ 
+  
+  
+ 
+ 
+ 
+ 
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/example-overlay.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/example-overlay.apt?rev=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/example-overlay.apt 
(original)
+++ 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/example-overlay.apt 
Mon Jul  3 23:37:16 2006
@@ -1,7 +0,0 @@
- ------
- Maven 2 War Plugin: Overlay Example
- ------
- Pete Marvin King
- <[EMAIL PROTECTED]>
- ------
- June 19, 2006
\ No newline at end of file

Added: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt?rev=418927&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
 Mon Jul  3 23:37:16 2006
@@ -0,0 +1,46 @@
+ ------
+ Maven 2 War Plugin - War Manifest customization
+ ------
+ Pete Marvin King
+ ------
+ 19 June 2006
+ 
+War Manifest Customization
+
+ The manifest can be customized by configuring the war plugin's archiver.
+    
++--------------------+
+[...]
+  <plugins>
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-war-plugin</artifactId>
+      <version>2.0</version>
+      <configuration>
+         <archiver>    
+            <manifest_entr>value</manifest_entry>
+         <archiver>             
+      </configuration>
+    </plugin>
+    [...]
+  </plugins>
+[...]  
++--------------------+   
+ 
+  The <<<pom.xml>>> would generate this <<<META-INF/MANIFEST.MF>>> in your war.
+  
++--------------------+   
+Manifest-Version: 1.0
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven
+Built-By: <current_user>
+Build-Jdk: <jdk version>
+Extension-Name: <artifactId>
+Specification-Vendor: MyCompany Inc
+Implementation-Vendor: MyCompany Inc
+Implementation-Title: <artifactId>
+Implementation-Version: <version>
+manifest_entry: value
++--------------------+   
+ 
+  check the {{{http://maven.apache.org/guides/mini/guide-manifest.html}Guide 
to manifest customization}} for more examples.
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
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=418927&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt 
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt 
Mon Jul  3 23:37:16 2006
@@ -0,0 +1,189 @@
+ ------
+ Maven 2 War Plugin - manipulating war overlays
+ ------
+ Pete Marvin King
+ ------
+ 28 June 2006
+ 
+Introduction
+
+ Normally all artifact dependencies are collected in <<<WEB-INF/lib>>> except
+ for war artifacts. Instead, war artifacts are overlayed on the war source. 
+ No configurations is necessary.
+ 
+ <<Warning : Overlayed war files will overwrite the files in your war.>> 
+ 
+ To demonstrate, given a project structure
+ 
++-----------------+
+ .
+ |-- pom.xml
+ `-- src
+     `-- main
+         |-- java
+         |   `-- com
+         |       `-- ideal
+         |           `-- projects
+         |               `-- SampleAction.java
+         |-- resources
+         |   |-- images
+         |   |   `-- sampleimage.jpg
+         |   `-- sampleresource
+         `-- webapp
+             |-- WEB-INF
+             |   `-- web.xml
+             |-- index.jsp
+             `-- jsp
+                 `-- websource.jsp
++-----------------+
+
+ which depends on <<<documentedprojectdependency-1.0-SNAPSHOT.war>>>.
+ 
++-----------------+
+documentedprojectdependency-1.0-SNAPSHOT.war  
+ |-- META-INF
+ |   |-- MANIFEST.MF
+ |   `-- maven
+ |       `-- com.ideal.projects
+ |           `-- documentedprojectdependency
+ |               |-- pom.properties
+ |               `-- pom.xml
+ |-- WEB-INF
+ |   |-- classes
+ |   |   |-- com
+ |   |   |   `-- ideal
+ |   |   |       `-- projects
+ |   |   |           `-- SampleActionDependency.class
+ |   |   |-- images
+ |   |   |   `-- sampleimage-dependency.jpg
+ |   |   |-- images-dependency
+ |   |   |   `-- sampleimage.jpg
+ |   |   |-- sampleresource
+ |   |   |   `-- someresource-dependency.css
+ |   |   `-- sampleresource-dependency
+ |   |       `-- someresource-dependency.css
+ |   `-- web.xml
+ |-- index-dependency.jsp
+ |-- jsp
+ |   `-- websource-dependency.jsp
+ `-- jsp-dependency
+     `-- websource.jsp
++-----------------+
+
+ Assuming that you've declared the war artifact as a dependency in your 
<<<pom.xml>>>.
+ 
++-----------------+
+  [...]
+    <dependencies>
+      <dependency>
+         <groupId>com.ideal.projects</groupId>
+         <artifactId>documentedprojectdependency</artifactId>
+         <version>1.0-SNAPSHOT</version>
+         <type>war</type>
+         <scope>runtime</scope>
+      </dependency>
+      [...]
+    </dependencies>    
+  [...]  
++-----------------+ 
+
+ the resulting jar would end up like this
+ 
++-----------------+ 
+
+ |-- META-INF
+ |   |-- MANIFEST.MF
+ |   `-- maven
+ |       `-- com.ideal.projects
+ |           |-- documentedproject
+ |           |   |-- pom.properties
+ |           |   `-- pom.xml
+ |           `-- documentedprojectdependency
+ |               |-- pom.properties
+ |               `-- pom.xml
+ |-- WEB-INF
+ |   |-- classes
+ |   |   |-- com
+ |   |   |   `-- ideal
+ |   |   |       `-- projects
+ |   |   |           |-- SampleAction.class
+ |   |   |           `-- SampleActionDependency.class
+ |   |   |-- images
+ |   |   |   |-- sampleimage-dependency.jpg
+ |   |   |   `-- sampleimage.jpg
+ |   |   |-- images-dependency
+ |   |   |   `-- sampleimage.jpg
+ |   |   |-- sampleresource
+ |   |   |   `-- someresource-dependency.css
+ |   |   `-- sampleresource-dependency
+ |   |       `-- someresource-dependency.css
+ |   `-- web.xml
+ |-- index-dependency.jsp
+ |-- index.jsp
+ |-- jsp
+ |   |-- websource-dependency.jsp
+ |   `-- websource.jsp
+ `-- jsp-dependency
+     `-- websource.jsp
++-----------------+  
+ 
+Configuring the war overlay
+
+   The plugin parameters below can be used to modify the behaviour of the war 
overlay.
+ 
+   *dependentWarIncludes - patterns used for matching files to be included 
from the war dependency.
+   
++-----------------+  
+  [...]
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <!-- default value is ** -->
+          <dependentWarIncludes>**/IncludeME,**/images</dependentWarIncludes>  
 
+        </configuration>
+       </plugin>
+    </plugins>  
+  [...]
++-----------------+     
+   
+   *dependentWarExcludes - patterns used for matching files to be excluded 
from the war dependency.
+   
++-----------------+  
+  [...]
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <!-- no default value -->
+          <dependentWarExcludes>WEB-INF/web.xml,index.*</dependentWarExcludes> 
  
+        </configuration>
+       </plugin>
+    </plugins>  
+  [...]
++-----------------+     
+
+   
+   *workDirectory - directory where the war files will be temporarily 
extracted.
+   
++-----------------+  
+  [...]
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <!-- default value is target/war/work -->
+          <workDirectory>/tmp/extract_here</workDirectory>
+        </configuration>
+       </plugin>
+    </plugins>  
+  [...]
++-----------------+     
+
+   
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/exploded.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/exploded.apt?rev=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/exploded.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/exploded.apt Mon Jul  3 
23:37:16 2006
@@ -1,118 +0,0 @@
- ------
- Maven 2 War Plugin: war:exploded
- ------
- Pete Marvin King
- <[EMAIL PROTECTED]>
- ------
- June 19, 2006
- 
- Exploded war files gives the webapp project rapid testing capability,
- war files can be deployed in the web container in exploded form. 
-
- War file generation of large webapp projects normally take time, using
- the exploded goal can speed up the processing of the war by only
- updating the modified files or resources on the exploded war. 
-
-Default Phase ( recommended )
-
- <<package>>
- 
-Basic Usage
-
- To explicitly execute the goal
-        
-+-----+
-  m2 war:exploded
-+-----+
-       
- or with the added configuration line on your pom.xml
-       
-+----------+
-  <project>
-         ...
-         <build>
-            <plugins>
-              <plugin>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                <version>2.1</version>     
-                <goals>
-                  <goal>exploded</goal>
-                </goals>    
-              </plugin>
-            <plugins>  
-            ...
-            ...
-         </build>   
-         ...
-  </project>
-+----------+
-       
- specifying the package phase would achieve the same result
-       
-+------+
-  mvn package
-+------+
-
-Sample Configuration
-
- Given the project structure
-       
-+-------+
-   /project_root
-   /project_root/pom.xml
-   /project_root/src/main/java/package/source
-   /project_root/src/main/resource/someresource
-   /project_root/src/main/webapp/WEB-INF/jsp/anotherwebsource   
-   /project_root/src/main/webapp/WEB-INF/somewebsource 
-   /project_root/src/main/webapp/websources
-+-------+  
-
- with pom.xml
-
-+--------+
-   <project>
-      <modelVersion>4.0.0</modelVersion>
-      <groupId>com.somecompany.webapp<gropuId>
-      <artifactId>webapp-service</artifactId>
-      <version>0.0</version>
-      <packaging>war</packaging>
-      <name>Some Company Webapp Service</name>
-      <dependencies>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>runtimedependency</artifactId>
-            <version>0.0</version>
-            <scope>runtime<scope>
-         </dependency>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>normaldependency</artifactId>
-            <version>0.0</version>
-            <!-- if no scope is defined, it defaults to compile -->
-         </dependency>
-      </dependencies>     
-   </project>  
-+--------+
-
- executing the command
-       
-+--------+
-   mvn war:exploded
-+--------+
-
- would assemble the exploded webapp on "target/webapp-service"
-
-+--------+
- target/webapp-service/META-INF/MANIFEST.MF
- 
target/webapp-service/META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.xml
- 
target/webapp-service/META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.properties
- target/webapp-service/WEB-INF/lib/runtimedependency-0.0.jar
- target/webapp-service/WEB-INF/classes/<generated classes from "src/main/java">
- target/webapp-service/WEB-INF/jsp/anotherwebsource
- target/webapp-service/WEB-INF/somewebsource            
- target/webapp-service/websources                                              
      
-+--------+  
-
- You might wonder why the other dependency is not included in WEB-INF/lib, 
only dependencies
- with a runtime scope are included in the war file. 
\ No newline at end of file

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/inplace.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/inplace.apt?rev=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/inplace.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/inplace.apt Mon Jul  3 
23:37:16 2006
@@ -1,124 +0,0 @@
- ------
- Maven 2 War Plugin: war:inplace
- ------
- Pete Marvin King
- <[EMAIL PROTECTED]>
- ------
- June 19, 2006
- 
- This mode is similar to the exploded mode but the war will ge generated 
- in the webapp source tree.
-
-Default Phase ( recommended )
-
- <<package>>
- 
-Basic Usage
-
- To explicitly execute the goal
-        
-+-----+
-  m2 war:inplace
-+-----+
-       
- or with the added configuration line on your pom.xml
-       
-+----------+
-  <project>
-         ...
-         <build>
-            <plugins>
-              <plugin>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-war-plugin</artifactId>
-                <version>2.1</version>     
-                <goals>
-                  <goal>inplace</goal>
-                </goals>    
-              </plugin>
-            <plugins>  
-            ...
-            ...
-         </build>   
-         ...
-  </project>
-+----------+
-       
- specifying the package phase would achieve the same result
-       
-+------+
-  mvn package
-+------+
-
-Sample Configuration
-
- Given the project structure
-       
-+-------+
-   /project_root
-   /project_root/pom.xml
-   /project_root/src/main/java/package/source
-   /project_root/src/main/resource/someresource
-   /project_root/src/main/webapp/WEB-INF/jsp/anotherwebsource   
-   /project_root/src/main/webapp/WEB-INF/somewebsource 
-   /project_root/src/main/webapp/websources
-+-------+  
-
- with pom.xml
-
-+--------+
-   <project>
-      <modelVersion>4.0.0</modelVersion>
-      <groupId>com.somecompany.webapp<gropuId>
-      <artifactId>webapp-service</artifactId>
-      <version>0.0</version>
-      <packaging>war</packaging>
-      <name>Some Company Webapp Service</name>
-      <dependencies>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>runtimedependency</artifactId>
-            <version>0.0</version>
-            <scope>runtime<scope>
-         </dependency>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>normaldependency</artifactId>
-            <version>0.0</version>
-            <!-- if no scope is defined, it defaults to compile -->
-         </dependency>
-      </dependencies>     
-   </project>  
-+--------+
-
- executing the command
-       
-+--------+
-   mvn war:inplace
-+--------+
-
- or specifying the lifecycle phase package
-
-+--------+
-   mvn package
-+--------+
-
- would generate the exploded webapp in the source tree
-
-+--------+
- src/main/webapp
- src/main/webapp/META-INF/maven/com.somecompany.webapp/webapp-service/pom.xml
- 
src/main/webapp/META-INF/maven/com.somecompany.webapp/webapp-service/pom.properties
- src/main/webapp/WEB-INF/lib/runtimedependency-0.0.jar
- src/main/webapp/WEB-INF/classes/<contents of target/classes>
- src/main/webapp/WEB-INF/jsp/anotherwebsource
- src/main/webapp/WEB-INF/somewebsource          
- src/main/webapp/websources                                                  
-+--------+  
-
- You might wonder why the other dependency is not included in WEB-INF/lib, 
only dependencies
- with a runtime scope are included in the war file. 
- 
- If you use the lifecycle phase invocation, it will also generate the 
{{{war.html}war}} 
- - "target/webapp-service.war".
- 
\ No newline at end of file

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/introduction.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/introduction.apt?rev=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/introduction.apt 
(original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/introduction.apt Mon Jul  
3 23:37:16 2006
@@ -1,65 +0,0 @@
- ------
- Maven 2 War Plugin
- ------
- Stephane Nicoll
- <[EMAIL PROTECTED]>
- Pete Marvin King
- <[EMAIL PROTECTED]>
- ------
- July 19, 2006
-
-Introduction
-
- The War plugin is used for generating a war artifact from a web application,
- this takes care of the error-prone task of assembling all the dependencies
- and gathering and relocating all the necessary resources of the war artifact.
-
- It also allows packaging of web applications in different modes.
-
-*Modes and how to invoke them:
-
- {{{war.html}<<war>>}} (default) : generates the war artifact in war form
-
-+------+
-  m2 war:war
-+------+
-
- {{{inplace.html}<<inplace>>}} : generates the exploded war in the source tree
-
-+------+
-  m2 war:inplace
-+------+
-
- {{{exploded.html}<<exploded>>}} : generates an exploded version of the war
-
-+------+
-  m2 war:exploded
-+------+
-
-
- The plugin works transparently when declaring your artifact as war.
- The default mode is used.
-
-+--------+
-  <project>
-     ...
-     <groupId>com.somecompany.webapp<gropuId>
-     <artifactId>webapp-service</artifactId>
-     <version>0.0</version>
-     <<<packaging>war</packaging>>>
-     <name>Some Company Webapp Service</name>
-     ...
-  </project>
-+--------+
-
-*Default directories used by the War plugin
-
- <<webapp source>> - src/main/webapp
-
- <<webapp build destination>> - target/<artifactId>-<version>
-
- <<war plugin work directory>> - target/war/work
-
-
-
-

Added: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt?rev=418927&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
 Mon Jul  3 23:37:16 2006
@@ -0,0 +1,50 @@
+ ------
+ Maven 2 War Plugin - Rapid testing using jetty6 plugin
+ ------
+ Pete Marvin King
+ ------
+ 19 June 2006
+ 
+Rapid testing during development with the jetty6 plugin 
+ 
+ Normally, testing a web application involves compiling java sources, creating 
a war and 
+ deploying it to a web container. 
+ 
+ But using the jetty6 plugin enables you to quickly test your web application 
by skipping
+ the last two steps. By default the jetty6 plugin scans your 
<<<target/classes>>> for
+ any changes in your java sources and <<<src/main/webapp>>> for your web 
sources.
+ The jetty6 plugin will automatically reload the modified classes and web 
sources.
+ 
+ To use the jetty6 plugin just add the following in you <<<pom.xml>>>
+ 
++-----------------+ 
+  [...]
+    <plugins>
+      <plugin>
+         <groupId>org.mortbay.jetty</groupId>
+         <artifactId>maven-jetty6-plugin</artifactId>
+         <version>6.0.0beta17</version>
+         <configuration>
+           <scanIntervalSeconds>10</scanIntervalSeconds>
+           <connectors>
+             <connector 
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+               <port>8080</port>
+               <maxIdleTime>60000</maxIdleTime>
+             </connector>
+           </connectors>
+         </configuration>       
+      </plugin>
+      [...]
+    </plugins>    
+  [...]  
++-----------------+ 
+
+ then running 
+ 
++-----------------+ 
+  mvn jetty6:run
++-----------------+  
+
+ The command will block with the jetty6 listening on port <<<8080>>>.
+ 
+ Check the {{{http://jetty.mortbay.org/jetty6/maven-plugin/index.html}jetty6 
plugin documentation}} for more details.

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/site/apt/tips/rapid-testing-jetty6-plugin.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 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=418927&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt (added)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt Mon Jul  3 
23:37:16 2006
@@ -0,0 +1,92 @@
+ ------
+ Maven 2 War Plugin - Basic usage
+ ------
+ Pete Marvin King
+ ------
+ 27 June 2006
+
+Introduction
+
+ 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.
+ 
+Basic Usage
+
+ Given the <<<pom.xml>>>
+  
++----------+
+  <project>
+     [...]
+     <groupId>com.ideal.projects</groupId>
+     <artifactId>documentedproject</artifactId>
+     <packaging>war</packaging>
+     <version>1.0-SNAPSHOT</version>
+     <name>Documented Project</name>
+     <url>http://ideal.com</url>
+     [...]
+  </project>
++----------+
+
+ with a project structure
+ 
++----------+
+ .
+ |-- pom.xml
+ `-- src
+     `-- main
+         |-- java
+         |   `-- com
+         |       `-- ideal
+         |           `-- projects
+         |               `-- SampleAction.java
+         |-- resources
+         |   |-- images
+         |   |   `-- sampleimage.jpg
+         |   `-- sampleresource
+         `-- webapp
+             |-- WEB-INF
+             |   `-- web.xml
+             |-- index.jsp
+             `-- jsp
+                 `-- websource.jsp
++----------+
+
+ and invoking
+ 
++----------+
+   mvn package
++----------+
+
+ generates the war file <<<target/documentedproject-1.0-SNAPSHOT.war>>>.
+  
++----------+
+documentedproject-1.0-SNAPSHOT.war
+  |-- META-INF
+  |   |-- MANIFEST.MF
+  |   `-- maven
+  |       `-- com.ideal.projects
+  |           `-- documentedproject
+  |               |-- pom.properties
+  |               `-- pom.xml
+  |-- WEB-INF
+  |   |-- classes
+  |   |   |-- com
+  |   |   |   `-- ideal
+  |   |   |       `-- projects
+  |   |   |           `-- SampleAction.class
+  |   |   `-- images
+  |   |       `-- sampleimage.jpg
+  |   `-- web.xml
+  |-- index.jsp
+  `-- jsp
+      `-- websource.jsp
++----------+    
+  
+Related links
+
+ {{{http://maven.apache.org/guides/mini/guide-manifest.html}Guide to manifest 
customization}}
+ 
+ 
{{{http://maven.apache.org/guides/mini/guide-archive-configuration.html}Exclusion
 of Maven Descriptors}}
+
+  
+  

Propchange: maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-war-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/war.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/war.apt?rev=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/war.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/war.apt Mon Jul  3 
23:37:16 2006
@@ -1,119 +0,0 @@
- ------
- Maven 2 War Plugin: war:war
- ------
- Pete Marvin King
- <[EMAIL PROTECTED]>
- ------
- June 19, 2006
-
-Default Phase ( recommended )
-
- <<package>>
-
-Basic Usage
-
- To explicitly invoke the goal
-        
-+-----+
-  m2 war:war
-+-----+
-       
- If the artifact package is declared as war
-       
-+----------+
-  <project>
-     ...
-     <groupId>com.somecompany.webapp<gropuId>
-     <artifactId>webapp-service</artifactId>
-     <version>0.0</version>
-     <packaging>war</packaging>
-     <name>Some Company Webapp Service</name>
-     ...
-  </project>
-+----------+
-       
- Specifying the package phase would achieve the same result
-       
-+------+
-  mvn package
-+------+
-   
-  The manifest file can also be configured to contain user-defined values. 
-  see the {{{http://maven.apache.org/guides/mini/guide-manifest.html} Manifest 
Configuration Guide}}. 
-  
-  The maven descriptors can also be suppressed during war generation.
-  see the 
{{{http://maven.apache.org/guides/mini/guide-archive-configuration.html}Archive 
Configuration Guide}}.
-   
-Sample Configuration  
-
- Given the project structure
-       
-+-------+
-   /project_root
-   /project_root/pom.xml
-   /project_root/src/main/java/package/source
-   /project_root/src/main/resource/someresource
-   /project_root/src/main/webapp/WEB-INF/jsp/anotherwebsource   
-   /project_root/src/main/webapp/WEB-INF/somewebsource 
-   /project_root/src/main/webapp/websources
-+-------+
-
- with pom.xml
-
-+--------+
-   <project>
-      <modelVersion>4.0.0</modelVersion>
-      <groupId>com.somecompany.webapp<gropuId>
-      <artifactId>webapp-service</artifactId>
-      <version>0.0</version>
-      <packaging>war</packaging>
-      <name>Some Company Webapp Service</name>
-      <dependencies>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>runtimedependency</artifactId>
-            <version>0.0</version>
-            <scope>runtime<scope>
-         </dependency>
-         <dependency>
-            <groupId>com.closed.package</groupId>
-            <artifactId>normaldependency</artifactId>
-            <version>0.0</version>
-            <!-- if no scope is defined, it defaults to compile -->
-         </dependency>
-      </dependencies>     
-   </project>  
-+--------+
-       
- executing the command
-       
-+--------+
-   mvn war:war
-+--------+
-
- or
-       
-+--------+
-   mvn package
-+--------+
-
- generates the war file "target/webapp-service-0.0.war". 
-       
- The war file results to this
-       
-+--------------------------------------------------------------------------------------------+
-  webapp-service-0.0.war
-       |_
-         META-INF/MANIFEST.MF
-         
META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.xml
-         
META-INF/maven/org.apache.maven.repository/maven-repository-webapp/pom.properties
-         WEB-INF/lib/runtimedependency-0.0.jar
-         WEB-INF/classes/<generated classes from "src/main/java">
-         WEB-INF/jsp/anotherwebsource
-         WEB-INF/somewebsource          
-         websources                                                  
-+--------------------------------------------------------------------------------------------+
-       
- You might wonder why the other dependency is not included in WEB-INF/lib, 
only dependencies
- with a runtime scope are included in the war file. 
-       
\ No newline at end of file

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=418927&r1=418926&r2=418927&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/site.xml Mon Jul  3 23:37:16 
2006
@@ -31,20 +31,21 @@
     <links>
       <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
     </links>
-
     <menu name="Overview">
-      <item name="Introduction" href="introduction.html"/>
-    </menu>
-    <menu name="WAR Modes" href="usage.html">
-      <item name="war" href="war.html"/>
-      <item name="inplace" href="inplace.html"/>
-      <item name="exploded" href="exploded.html"/>
+      <item name="Introduction" href="plugin-info.html"/>
+      <item name="HOWTO" href="usage.html"/>
+      <!-- When we later have FAQs...
+      <item name="FAQ" href="faq.html"/>
+      -->
     </menu>
     <menu name="Advance Configuration">
-      <item name="With war dependencies" href="example/example-overlay.html"/>
-      <item name="Filtering war dependencies" 
href="example-webappdependency-filtering.html"/>
+      <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"/>
     </menu>
-    <menu name="FAQ" href="faq.html"/>
     ${reports}
   </body>
 </project>


Reply via email to