Author: felipeal Date: Thu Mar 10 18:54:28 2005 New Revision: 157034 URL: http://svn.apache.org/viewcvs?view=rev&rev=157034 Log: MPEAR-39: Improved how dependencies are copied into the EAR file
Modified: maven/maven-1/plugins/trunk/ear/plugin.jelly maven/maven-1/plugins/trunk/ear/xdocs/changes.xml Modified: maven/maven-1/plugins/trunk/ear/plugin.jelly URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ear/plugin.jelly?view=diff&r1=157033&r2=157034 ============================================================================== --- maven/maven-1/plugins/trunk/ear/plugin.jelly (original) +++ maven/maven-1/plugins/trunk/ear/plugin.jelly Thu Mar 10 18:54:28 2005 @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- /* - * Copyright 2001-2004 The Apache Software Foundation. + * Copyright 2001-2005 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. @@ -93,14 +93,25 @@ <j:if test="${dep.getProperty('ear.bundle')=='true' || dep.getProperty('ear.module')=='true'}"> <!-- - We know that this dep "wants" to be bundled. + We know that this dep "wants" to be bundled. Now we need to decide how it is copied into the + EAR --> - <ear:setPath lib="${lib}" var="bundledPath"/> - <echo>Dependency ${lib.file.name} will be bundled as ${bundledPath}</echo> + <j:set var="originalPath" value="${lib.file.name}"/> + <ear:setPath lib="${lib}" var="bundledPath"/> - <!-- after the definitions, copy the dependency --> - <ant:copy file="${lib.file.parent}/${lib.file.name}" tofile="${tmpDependenciesDir}/${bundledPath}"/> + + <j:choose> + <j:when test="${originalPath.equals(bundledPath)}"> + <ant:fileset dir="${lib.file.parent}"> + <ant:include name="${originalPath}"/> + </ant:fileset> + </j:when> + <j:otherwise> + <echo>Dependency ${originalPath} will be bundled as ${bundledPath}</echo> + <ant:copy file="${lib.file.parent}/${originalPath}" tofile="${tmpDependenciesDir}/${bundledPath}"/> + </j:otherwise> + </j:choose> </j:if> </j:forEach> Modified: maven/maven-1/plugins/trunk/ear/xdocs/changes.xml URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ear/xdocs/changes.xml?view=diff&r1=157033&r2=157034 ============================================================================== --- maven/maven-1/plugins/trunk/ear/xdocs/changes.xml (original) +++ maven/maven-1/plugins/trunk/ear/xdocs/changes.xml Thu Mar 10 18:54:28 2005 @@ -2,7 +2,7 @@ <!-- /* - * Copyright 2001-2004 The Apache Software Foundation. + * Copyright 2001-2005 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. @@ -25,6 +25,8 @@ </properties> <body> <release version="1.7-SNAPSHOT" date="on CVS"> + <action dev="felipeal" type="fix" issue="MPEAR-39">Improved how dependencies are copied into the EAR file. + </action> <action dev="felipeal" type="add" issue="MPEAR-25">Added property <code>maven.ear.final.name</code>. </action> <action dev="felipeal" type="remove" issue="MPEAR-37">Removed checking introduced by MPEAR-9, as the fix introduced more bugs than it solved. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]