MPANT-14 fix

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115185 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier 2004-05-04 00:18:10 +00:00
parent 8347ca55f9
commit eca727336d
3 changed files with 88 additions and 46 deletions

View File

@ -62,6 +62,16 @@
<role>Release Manager</role>
</roles>
</developer>
<developer>
<name>Arnaud Heritier</name>
<id>aheritier</id>
<email>aheritier@apache.org</email>
<organization/>
<roles>
<role>Java Developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>
<dependencies>
<dependency>

View File

@ -73,6 +73,7 @@
<mkdir dir="$${classesdir}"/>
<j:if test="${sourcesPresent}">
<javac
destdir="$${classesdir}"
excludes="**/package.html"
@ -88,6 +89,7 @@
</fileset>
</classpath>
</javac>
</j:if>
<!--
| Copy any resources that must be present in the deployed
@ -95,7 +97,17 @@
-->
<j:forEach var="resource" items="${pom.build.resources}">
<copy todir="$${classesdir}">
<j:choose trim="true">
<j:when test="${(resource.targetPath != null) &amp;&amp; (!resource.targetPath.equals(''))}">
<j:set var="outputDir" value="$${classesdir}/${resource.targetPath}"/>
<mkdir dir="$${classesdir}/${resource.targetPath}"/>
</j:when>
<j:otherwise>
<j:set var="outputDir" value="$${classesdir}"/>
</j:otherwise>
</j:choose>
<copy todir="${outputDir}">
<maven:makeRelativePath var="dir" basedir="${basedir}" path="${resource.directory}" separator="/"/>
@ -119,7 +131,17 @@
<!-- Copy any resources required for unit testing -->
<j:forEach var="resource" items="${pom.build.unitTest.resources}">
<copy todir="$${testclassesdir}">
<j:choose trim="true">
<j:when test="${(resource.targetPath != null) &amp;&amp; (!resource.targetPath.equals(''))}">
<j:set var="outputDir" value="$${testclassesdir}/${resource.targetPath}"/>
<mkdir dir="$${testclassesdir}/${resource.targetPath}"/>
</j:when>
<j:otherwise>
<j:set var="outputDir" value="$${testclassesdir}"/>
</j:otherwise>
</j:choose>
<copy todir="${outputDir}">
<maven:makeRelativePath var="dir" basedir="${basedir}" path="${resource.directory}" separator="/"/>
@ -259,18 +281,27 @@
</j:if>
<j:if test="${maven.has.test.resource.patterns}">
<copy todir="$${testclassesdir}">
<fileset dir="${pom.build.unitTestSourceDirectory}">
<j:forEach var="resource" items="${pom.build.unitTest.resources}">
<j:choose trim="true">
<j:when test="${(resource.targetPath != null) &amp;&amp; (!resource.targetPath.equals(''))}">
<j:set var="outputDir" value="$${testclassesdir}/${resource.targetPath}"/>
<mkdir dir="$${testclassesdir}/${resource.targetPath}"/>
</j:when>
<j:otherwise>
<j:set var="outputDir" value="$${testclassesdir}"/>
</j:otherwise>
</j:choose>
<copy todir="${outputDir}">
<fileset dir="${pom.build.unitTestSourceDirectory}">
<j:forEach var="res" items="${resource.includes}">
<include name="${res}"/>
</j:forEach>
<j:forEach var="res" items="${resource.excludes}">
<exclude name="${res}"/>
</j:forEach>
</j:forEach>
</fileset>
</copy>
</j:forEach>
</j:if>
</j:if>
</target>

View File

@ -25,6 +25,7 @@
</properties>
<body>
<release version="1.7" date="in CVS">
<action dev="aheritier" type="fix" issue="MPANT-14">Resources are correctly copied to the specified targetPath.</action>
<action dev="aheritier" type="fix" issue="MPANT-13">Corrects also NumberFormatException. <code>pom.build.unitTest.resources</code> is made up of several <code>resource</code> elements.</action>
<action dev="aheritier" type="fix" issue="MPANT-12">Remove NumberFormatException if <code>pom.build.unitTest.resources</code> doesn't exist.</action>
<action dev="dion" type="fix" issue="MPANT-11">Change plugin tests to use 'assert' tags</action>