Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7615A17DAE for ; Wed, 1 Oct 2014 20:11:08 +0000 (UTC) Received: (qmail 21409 invoked by uid 500); 1 Oct 2014 20:11:08 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 21348 invoked by uid 500); 1 Oct 2014 20:11:08 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 21339 invoked by uid 99); 1 Oct 2014 20:11:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 20:11:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 20:10:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 00D7F23888FE; Wed, 1 Oct 2014 20:10:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1628828 - /maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm Date: Wed, 01 Oct 2014 20:10:43 -0000 To: commits@maven.apache.org From: khmarbaise@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141001201044.00D7F23888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: khmarbaise Date: Wed Oct 1 20:10:43 2014 New Revision: 1628828 URL: http://svn.apache.org/r1628828 Log: [MWAR-312] - Updated documentation about skinny-wars. Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm Modified: maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm?rev=1628828&r1=1628827&r2=1628828&view=diff ============================================================================== --- maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm (original) +++ maven/plugins/trunk/maven-war-plugin/src/site/apt/examples/skinny-wars.apt.vm Wed Oct 1 20:10:43 2014 @@ -2,8 +2,9 @@ Creating Skinny WARs ------ Mike Perham + Karl-Heinz Marbaise ------ - 2008-08-03 + 2014-10-01 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one @@ -34,69 +35,11 @@ Creating Skinny WARs the J2EE specification allows WARs to reference external JARs packaged within the EAR via the <<>> setting in their <<>>. - 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 <<>> - instead. This goes into your WAR project's <<>>: + The Maven EAR Plugin has direct support for creating skinny wars which simply + means to {{{http://maven.apache.org/plugins/maven-ear-plugin/examples/skinny-wars.html}configure the maven-ear-plugin}} + accordingly. -+-----------------+ - - ... - - - - maven-war-plugin - ${project.version} - - - WEB-INF/lib/*.jar - - - true - lib/ - - - - - - - ... - -+-----------------+ - - Here's another variant of the above example, but this time we use - <<<\>>> to select a few JARs to be included in the WAR. - This is useful when there is a need to package a small, but non-empty, subset - of JARs into the WAR. When making an EAR of skinny WARs, one wants to package - all of the JARs into the EAR. Sometimes a list of JARs must be packaged into - the WAR though in order for it to work properly, like with tag libraries. - -+-----------------+ - - ... - - - - maven-war-plugin - ${project.version} - - - WEB-INF/lib/my-tag-library.jar,**/*.xml,**/*.properties,**/*.class,**/*.png,**/*.css,**/*.js,**/*.jsp - - - true - lib/ - - - - - - - ... - -+-----------------+ - - Next we need to change the EAR project's <<>> to package those dependent JARs in the EAR. + You need to change the EAR project's <<>> to package those dependent JARs in the EAR. Notice that we package everything into a <<>> 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 <<>>). @@ -107,9 +50,10 @@ Creating Skinny WARs maven-ear-plugin - 2.3.2 + 2.9.1 lib/ + true @@ -161,4 +105,4 @@ Creating Skinny WARs * Alternatives Our users have submitted alternatives to the above recipe on - {{{http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem}the Wiki}}. \ No newline at end of file + {{{http://docs.codehaus.org/display/MAVENUSER/Solving+the+Skinny+Wars+problem}the Wiki}}.