MPEAR-39: Improved how dependencies are copied into the EAR file

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@157034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
felipeal
2005-03-11 02:54:28 +00:00
parent 3b67f08f92
commit fb3ed15452
2 changed files with 20 additions and 7 deletions

View File

@@ -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>

View File

@@ -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.