You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2006/08/06 00:48:26 UTC

svn commit: r429069 - in /maven/plugins/trunk/maven-war-plugin/src: main/java/org/apache/maven/plugin/war/ site/ site/apt/ site/apt/examples/

Author: dennisl
Date: Sat Aug  5 15:48:25 2006
New Revision: 429069

URL: http://svn.apache.org/viewvc?rev=429069&view=rev
Log:
o Use standard titles for standard pages.
o Sync the titles for examples with links to them on the index page and in the menu.
o Add more context to the pom.xml examples.
o Fix typos.

Modified:
    maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
    maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/adding-filtering-webresources.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-overlay.apt
    maven/plugins/trunk/maven-war-plugin/src/site/apt/index.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/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java Sat Aug  5 15:48:25 2006
@@ -117,7 +117,7 @@
     private Resource[] webResources;
 
     /**
-     * Filters (property files) to include during the interpolation of the pom.xml
+     * Filters (property files) to include during the interpolation of the pom.xml.
      *
      * @parameter expression="${project.build.filters}"
      */
@@ -185,7 +185,7 @@
 
     /**
      * The comma separated list of tokens to exclude when doing
-     * a way overlay.
+     * a war overlay.
      *
      * @parameter
      */

Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java?rev=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java Sat Aug  5 15:48:25 2006
@@ -50,7 +50,7 @@
     private String outputDirectory;
 
     /**
-     * The name of the generated war.
+     * The name of the generated WAR.
      *
      * @parameter expression="${project.build.finalName}"
      * @required

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=429069&r1=429068&r2=429069&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 Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - adding and filtering external web resources
+ Adding and Filtering External Web Resources
  ------
  Pete Marvin King
  ------
@@ -22,7 +22,7 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
 
-Introduction
+Adding and Filtering External Web Resources
 
  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
@@ -34,26 +34,30 @@
 *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>
-[...]  
+<project>
+  [...]
+  <build>
+    <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>
+  </build>
+  [...]  
+</project>
 +-------+
 
- Using our sample project in the basic usage section with an added external resource
+ Using our sample project in the usage section with an added external resource
  
 +----------+
  .
@@ -126,7 +130,7 @@
   
 **Inclusion/Exclusion for webResources
 
- using our pom configuration above we can add
+ Using our pom configuration above we can add
  
 +----------+  
  [..]
@@ -210,7 +214,7 @@
 **Filtering webResources
 
   Using our example above, we can also configure filters for our resources.
-  We will add a hypothetical configuration directory on our project
+  We will add a hypothetical configurations directory on our project
   
 +----------+
  .

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt?rev=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/rapid-testing-jetty6-plugin.apt Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - Rapid testing using jetty6 plugin
+ Rapid Testing Using the Jetty6 Plugin
  ------
  Pete Marvin King
  ------
@@ -22,7 +22,7 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
 
-Rapid testing with the jetty6 plugin 
+Rapid Testing Using the Jetty6 Plugin
  
  Normally, testing a web application involves compiling java sources, creating a war and 
  deploying it to a web container. 
@@ -35,7 +35,9 @@
  To use the jetty6 plugin just add the following in your <<<pom.xml>>>:
  
 +-----------------+ 
+<project>
   [...]
+  <build>
     <plugins>
       <plugin>
          <groupId>org.mortbay.jetty</groupId>
@@ -53,7 +55,9 @@
       </plugin>
       [...]
     </plugins>    
+  </build>
   [...]  
+</project>
 +-----------------+ 
 
  then start Jetty:

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt?rev=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - Creating Skinny WARs
+ Creating Skinny WARs
  ------
  Mike Perham
  ------
@@ -36,6 +36,9 @@
  instead.  This goes into your WAR's <<<pom.xml>>>:
  
 +-----------------+ 
+<project>
+  [...]
+  <build>
     <plugins>
       <plugin>
          <artifactId>maven-war-plugin</artifactId>
@@ -51,6 +54,9 @@
          </configuration>       
       </plugin>
     </plugins>    
+  </build>
+  [...]  
+</project>
 +-----------------+ 
 
  Next we need to change the EAR's <<<pom.xml>>> to package those dependent JARs in the EAR.
@@ -59,6 +65,7 @@
  be packaged in the root of the EAR) and Java libraries (which are packaged in lib/).
 
 +-----------------+ 
+  <build>
     <plugins>
       <plugin>
         <artifactId>maven-ear-plugin</artifactId>
@@ -67,6 +74,7 @@
         </configuration>       
       </plugin>
     </plugins>    
+  </build>
 +-----------------+  
 
  Now the painful part.  Your EAR's <<<pom.xml>>> needs to list every dependency that the WAR has.

Modified: 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=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/war-manifest-guide.apt Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - War Manifest customization
+ War Manifest Customization
  ------
  Pete Marvin King
  ------
@@ -27,21 +27,25 @@
  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>    
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <archiver>    
             <manifest_entry>value</manifest_entry>
-         <archiver>             
-      </configuration>
-    </plugin>
-    [...]
-  </plugins>
-[...]  
+          <archiver>             
+        </configuration>
+      </plugin>
+      [...]
+    </plugins>
+  </build>
+  [...]  
+</project>
 +--------------------+   
  
   The <<<pom.xml>>> would generate this <<<META-INF/MANIFEST.MF>>> in your war.
@@ -62,32 +66,37 @@
 
 Generating a manifest classpath
 
-  Generating a manifest classpath for a war is similar to for a jar, but there are a couple of slight differences since you normally won't want a jar in both the manifest classpath and the WEB-INF/lib.  Customize the war plugin's archiver:
+  Generating a manifest classpath for a war is similar to for a jar, but there are a couple of slight differences since you normally don't want a jar in both the manifest classpath and the WEB-INF/lib.  Customize the war plugin's archiver:
 
 +--------------------+
-[...]
-  <plugins>
-    <plugin>
-      <groupId>org.apache.maven.plugins</groupId>
-      <artifactId>maven-war-plugin</artifactId>
-      <version>2.0</version>
-      <configuration>
-        <archive>
-          <manifest>
-            <addClasspath>true</addClasspath>
-          </manifest>
-       </archive>
-     </configuration>
-    </plugin>
-    [...]
-  </plugins>
-[...]
+<project>
+  [...]
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>true</addClasspath>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      [...]
+    </plugins>
+  </build>
+  [...]  
+</project>
 +--------------------+
 
   Now, you can control which dependencies are included in WEB-INF/lib and in the manifest classpath by following these examples.  Maven will follow the transitive dependency tree until it gets to artifacts scoped as "provided".  Note that no way is shown to include a dependency in WEB-INF/lib but not the manifest classpath.
 
 +--------------------+
-[...]
+<project>
+  [...]
   <dependencies>
     <dependency>
       <groupId>org.foo</groupId>
@@ -110,8 +119,9 @@
       <!-- excluded from manifest classpath, and excluded from WEB-INF/lib -->
     </dependency>
     [...]
-   </dependencies>
-[...]
+  </dependencies>
+  [...]
+</project>
 +--------------------+
 
 

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=429069&r1=429068&r2=429069&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 Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - manipulating war overlays
+ Manipulating WAR Overlays
  ------
  Pete Marvin King
  ------
@@ -22,7 +22,7 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
 
-Introduction
+Manipulating WAR Overlays
 
  Normally all artifact dependencies are collected in <<<WEB-INF/lib>>> except
  for war artifacts. Instead, war artifacts are overlayed on the war source. 

Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/index.apt?rev=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/apt/index.apt Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - Basic usage
+ Introduction
  ------
  Pete Marvin King
  ------
@@ -33,9 +33,9 @@
  * {{{war-mojo.html}war:war}} is the default goal invoked during the package phase for projects with a package type of war.
  
  * {{{exploded-mojo.html}war:exploded}} is generally used to speed up testing during the developement phase by creating
- an exploded war on specified directory.    
+ an exploded war in a specified directory.    
  
- * {{{inplace-mojo.html}war:inplace}} another variation of the war:explode the war is instead generated in the web source directory
+ * {{{inplace-mojo.html}war:inplace}} another variation of the war:explode where the war is instead generated in the web source directory
  which is <<<src/main/webapp>>> by default.
  
 * Usage
@@ -47,15 +47,15 @@
  To provide you with better understanding on some usages of the Maven WAR Plugin,
  you can take a look into the following examples:
  
- * {{{examples/adding-filtering-webresources.html}Adding and/or filtering webResources}}
+ * {{{examples/adding-filtering-webresources.html}Adding and Filtering External Web Resources}}
  
- * {{{examples/war-overlay.html}War overlays}}
+ * {{{examples/war-overlay.html}Manipulating WAR Overlays}}
  
- * {{{examples/war-manifest-guide.html}Managing your war manifest}}
+ * {{{examples/war-manifest-guide.html}War Manifest Customization}}
 
- * {{{examples/rapid-testing-jetty6-plugin.html}Rapid testing using jetty6}}
+ * {{{examples/rapid-testing-jetty6-plugin.html}Rapid Testing Using Jetty6}}
 
- * {{{examples/skinny-wars.html}Creating skinny wars}}
+ * {{{examples/skinny-wars.html}Creating Skinny WARs}}
  
 * Related links
  

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=429069&r1=429068&r2=429069&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 Sat Aug  5 15:48:25 2006
@@ -1,5 +1,5 @@
  ------
- Maven 2 War Plugin - Basic usage
+ Usage
  ------
  Pete Marvin King
  ------
@@ -22,7 +22,7 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/guides/mini/guide-apt-format.html
 
-Basic Usage
+Usage
 
  There are 4 ways to use the war plugin :
  
@@ -34,6 +34,8 @@
  
  *invocation of the <<<war:inplace>>> goal
 
+ []
+
  <<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.>> 
 
@@ -43,16 +45,16 @@
  To illustrate, given the <<<pom.xml>>>
     
 +----------+
-  <project>
-     [...]
-     <groupId>com.example.projects</groupId>
-     <artifactId>documentedproject</artifactId>
-     <packaging>war</packaging>
-     <version>1.0-SNAPSHOT</version>
-     <name>Documented Project</name>
-     <url>http://example.com</url>
-     [...]
-  </project>
+<project>
+  [...]
+  <groupId>com.example.projects</groupId>
+  <artifactId>documentedproject</artifactId>
+  <packaging>war</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Documented Project</name>
+  <url>http://example.com</url>
+  [...]
+</project>
 +----------+
 
  with a project structure
@@ -150,18 +152,22 @@
  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>
-[...]  
+<project>
+  [...]
+  <build>
+    <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>
+  </build>
+  [...]  
+</project>
 +-------+  
 
 *Invocation of <<<war:inplace>>> goal

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=429069&r1=429068&r2=429069&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/src/site/site.xml Sat Aug  5 15:48:25 2006
@@ -36,11 +36,11 @@
       <!--<item name="FAQ" href="faq.html"/> -->
     </menu>
     <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"/>
-      <item name="Rapid testing using jetty6" href="examples/rapid-testing-jetty6-plugin.html"/>
-      <item name="Creating skinny wars" href="examples/skinny-wars.html"/>
+      <item name="Adding and Filtering External Web Resources" href="examples/adding-filtering-webresources.html"/>   
+      <item name="Manipulating WAR Overlays" href="examples/war-overlay.html"/>
+      <item name="War Manifest Customization" href="examples/war-manifest-guide.html"/>
+      <item name="Rapid Testing Using Jetty6" href="examples/rapid-testing-jetty6-plugin.html"/>
+      <item name="Creating Skinny WARs" href="examples/skinny-wars.html"/>
     </menu>
     ${reports}
   </body>