Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 42121 invoked from network); 1 Mar 2009 15:37:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2009 15:37:52 -0000 Received: (qmail 18611 invoked by uid 500); 1 Mar 2009 15:37:52 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 18541 invoked by uid 500); 1 Mar 2009 15:37:52 -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 18531 invoked by uid 99); 1 Mar 2009 15:37:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 07:37:52 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Sun, 01 Mar 2009 15:37:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 20CB72388995; Sun, 1 Mar 2009 15:37:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r749046 - in /maven/plugins/trunk/maven-ear-plugin/src: main/java/org/apache/maven/plugin/ear/ site/apt/ test/java/org/apache/maven/plugin/ear/it/ test/resources/projects/project-056/ test/resources/projects/project-056/expected-META-INF/ Date: Sun, 01 Mar 2009 15:37:30 -0000 To: commits@maven.apache.org From: snicoll@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090301153731.20CB72388995@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: snicoll Date: Sun Mar 1 15:37:29 2009 New Revision: 749046 URL: http://svn.apache.org/viewvc?rev=749046&view=rev Log: MEAR-100: Activated altDeploymentDescriptor for 1.3 and 1.4 Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/application.xml maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/pom.xml Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java?rev=749046&r1=749045&r2=749046&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java (original) +++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java Sun Mar 1 15:37:29 2009 @@ -206,8 +206,6 @@ * to the application's root directory. * * @return the alternative deployment descriptor for this module - * - * @since JavaEE 5 */ public String getAltDeploymentDescriptor() { @@ -231,16 +229,16 @@ /** * Writes the alternative deployment descriptor if necessary. - *

- * Only writes it if the descriptor is specified and version is JavaEE 5. * - * @param writer the writer to use + * @param writer the writer to use * @param version the java EE version in use */ - protected void writeAltDeploymentDescriptor( XMLWriter writer, String version) { - if (GenerateApplicationXmlMojo.VERSION_5.equals(version) && getAltDeploymentDescriptor() != null) { - writer.startElement( ALT_DD); - writer.writeText( getAltDeploymentDescriptor()); + protected void writeAltDeploymentDescriptor( XMLWriter writer, String version ) + { + if ( getAltDeploymentDescriptor() != null ) + { + writer.startElement( ALT_DD ); + writer.writeText( getAltDeploymentDescriptor() ); writer.endElement(); } } Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt?rev=749046&r1=749045&r2=749046&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt (original) +++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt Sun Mar 1 15:37:29 2009 @@ -111,7 +111,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * {ejbModule} Properties @@ -145,7 +145,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * {jarModule} Properties @@ -179,7 +179,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * <> - set to true to if you want to generate an entry of this module in <<>>. Default is false. @@ -216,7 +216,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * {rarModule} Properties @@ -250,7 +250,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * {sarModule} Properties @@ -315,7 +315,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * <> - sets the context root of this web artifact. @@ -351,7 +351,7 @@ to its uri. Default is false. * <> - sets the alternative deployment descriptor for - this module. (Java EE5). + this module. * {harModule} Properties Modified: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java?rev=749046&r1=749045&r2=749046&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java (original) +++ maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java Sun Mar 1 15:37:29 2009 @@ -595,4 +595,14 @@ doTestProject( "project-055", new String[]{"jar-sample-one-1.0.jar", "jar-sample-two-1.0.jar", "jar-sample-three-with-deps-1.0.jar"} ); } + + /** + * Builds an EAR with deployment descriptor configuration for J2EE 1.4 and + * an alternative deployment descriptor. + */ + public void testProject056() + throws Exception + { + doTestProject( "project-056", new String[]{"ejb-sample-one-1.0.jar"} ); + } } Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/application.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/application.xml?rev=749046&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/application.xml (added) +++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/expected-META-INF/application.xml Sun Mar 1 15:37:29 2009 @@ -0,0 +1,26 @@ + + + + maven-ear-plugin-test-project-056 + + ejb-sample-one-1.0.jar + sample-one-ejb-jar.xml + + \ No newline at end of file Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/pom.xml?rev=749046&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/pom.xml (added) +++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-056/pom.xml Sun Mar 1 15:37:29 2009 @@ -0,0 +1,57 @@ + + + + + 4.0.0 + ear + maven-ear-plugin-test-project-056 + 99.0 + Maven + ear + + + eartest + ejb-sample-one + 1.0 + ejb + + + + + + org.apache.maven.plugins + maven-ear-plugin + @project.version@ + + UTF-8 + 1.4 + + + eartest + ejb-sample-one + sample-one-ejb-jar.xml + + + + + + +