Author: dennisl
Date: Sat Aug 5 15:10:16 2006
New Revision: 429066
URL: http://svn.apache.org/viewvc?rev=429066&view=rev
Log:
o Set EOL style to native.
Modified:
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt
(contents, props changed)
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=429066&r1=429065&r2=429066&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:10:16 2006
@@ -1,108 +1,108 @@
- ------
- Maven 2 War Plugin - Creating Skinny WARs
- ------
- Mike Perham
- ------
- July 2006
-
-~~ Copyright 2006 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.
-
-~~ NOTE: For help with the syntax of this file, see:
-~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-
-Creating Skinny WARs
-
- In a typical J2EE environment, a WAR is packaged within an EAR for
deployment. The
- WAR can contain all its dependent JARs in <<<WEB-INF/lib>>> but then the EAR
can quickly grow
- very large if there are multiple WARs, due to the presence of duplicate JARs.
Instead
- the J2EE specification allows WARs to reference external JARs packaged within
the EAR
- via the <<<Class-Path>>> setting in their <<<MANIFEST.MF>>>.
-
- The Maven WAR and EAR plugins do not directly support this mode of operation
but
- we can fake it through some POM and configuration magic. First you need to
tell
- Maven to exclude the dependent JARs and add references to them in the
<<<MANIFEST.MF>>>
- instead. This goes into your WAR's <<<pom.xml>>>:
-
-+-----------------+
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <!-- This is broken in maven-war-plugin 2.0, works in 2.0.1 -->
- <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
-+-----------------+
-
- Next we need to change the EAR's <<<pom.xml>>> to package those dependent
JARs in the EAR.
- Notice that we package everything into a lib/ directory within the EAR. This
is
- just my own personal preference to distinguish between J2EE modules (which
will
- be packaged in the root of the EAR) and Java libraries (which are packaged in
lib/).
-
-+-----------------+
- <plugins>
- <plugin>
- <artifactId>maven-ear-plugin</artifactId>
- <configuration>
- <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
- </configuration>
- </plugin>
- </plugins>
-+-----------------+
-
- Now the painful part. Your EAR's <<<pom.xml>>> needs to list every
dependency that the WAR has.
- This is because Maven assumes fat WARs and does not include transitive
dependencies
- of WARs within the EAR.
-
-+-----------------+
- <dependencies>
- <dependency>
- <groupId>com.acme</groupId>
- <artifactId>shared-jar</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>com.acme</groupId>
- <artifactId>war1</artifactId>
- <version>1.0.0</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>com.acme</groupId>
- <artifactId>war2</artifactId>
- <version>1.0.0</version>
- <type>war</type>
- </dependency>
- </dependencies>
-+-----------------+
-
- Your EAR will contain something like this:
-
-+-----------------+
- .
- |-- META-INF
- | |-- application.xml
- |-- lib
- | |-- shared-jar-1.0.0.jar
- |-- war1-1.0.0.war
- |-- war2-1.0.0.war
-+-----------------+
+ ------
+ Maven 2 War Plugin - Creating Skinny WARs
+ ------
+ Mike Perham
+ ------
+ July 2006
+
+~~ Copyright 2006 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Creating Skinny WARs
+
+ In a typical J2EE environment, a WAR is packaged within an EAR for
deployment. The
+ WAR can contain all its dependent JARs in <<<WEB-INF/lib>>> but then the EAR
can quickly grow
+ very large if there are multiple WARs, due to the presence of duplicate JARs.
Instead
+ the J2EE specification allows WARs to reference external JARs packaged within
the EAR
+ via the <<<Class-Path>>> setting in their <<<MANIFEST.MF>>>.
+
+ The Maven WAR and EAR plugins do not directly support this mode of operation
but
+ we can fake it through some POM and configuration magic. First you need to
tell
+ Maven to exclude the dependent JARs and add references to them in the
<<<MANIFEST.MF>>>
+ instead. This goes into your WAR's <<<pom.xml>>>:
+
++-----------------+
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <!-- This is broken in maven-war-plugin 2.0, works in 2.0.1 -->
+ <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
++-----------------+
+
+ Next we need to change the EAR's <<<pom.xml>>> to package those dependent
JARs in the EAR.
+ Notice that we package everything into a lib/ directory within the EAR. This
is
+ just my own personal preference to distinguish between J2EE modules (which
will
+ be packaged in the root of the EAR) and Java libraries (which are packaged in
lib/).
+
++-----------------+
+ <plugins>
+ <plugin>
+ <artifactId>maven-ear-plugin</artifactId>
+ <configuration>
+ <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
+ </configuration>
+ </plugin>
+ </plugins>
++-----------------+
+
+ Now the painful part. Your EAR's <<<pom.xml>>> needs to list every
dependency that the WAR has.
+ This is because Maven assumes fat WARs and does not include transitive
dependencies
+ of WARs within the EAR.
+
++-----------------+
+ <dependencies>
+ <dependency>
+ <groupId>com.acme</groupId>
+ <artifactId>shared-jar</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.acme</groupId>
+ <artifactId>war1</artifactId>
+ <version>1.0.0</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>com.acme</groupId>
+ <artifactId>war2</artifactId>
+ <version>1.0.0</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
++-----------------+
+
+ Your EAR will contain something like this:
+
++-----------------+
+ .
+ |-- META-INF
+ | |-- application.xml
+ |-- lib
+ | |-- shared-jar-1.0.0.jar
+ |-- war1-1.0.0.war
+ |-- war2-1.0.0.war
++-----------------+
Propchange:
maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt
------------------------------------------------------------------------------
svn:eol-style = native