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:
parent
8347ca55f9
commit
eca727336d
@ -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>
|
||||
|
||||
@ -73,53 +73,75 @@
|
||||
|
||||
<mkdir dir="$${classesdir}"/>
|
||||
|
||||
<javac
|
||||
destdir="$${classesdir}"
|
||||
excludes="**/package.html"
|
||||
debug="true"
|
||||
deprecation="true"
|
||||
optimize="false">
|
||||
<src>
|
||||
<pathelement location="${srcDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<fileset dir="$${libdir}">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
<j:if test="${sourcesPresent}">
|
||||
<javac
|
||||
destdir="$${classesdir}"
|
||||
excludes="**/package.html"
|
||||
debug="true"
|
||||
deprecation="true"
|
||||
optimize="false">
|
||||
<src>
|
||||
<pathelement location="${srcDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<fileset dir="$${libdir}">
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</javac>
|
||||
</j:if>
|
||||
|
||||
<!--
|
||||
| Copy any resources that must be present in the deployed
|
||||
| JAR file.
|
||||
-->
|
||||
<j:forEach var="resource" items="${pom.build.resources}">
|
||||
|
||||
<copy todir="$${classesdir}">
|
||||
|
||||
<maven:makeRelativePath var="dir" basedir="${basedir}" path="${resource.directory}" separator="/"/>
|
||||
|
||||
<j:if test="${empty dir}">
|
||||
<j:set var="dir" value="."/>
|
||||
</j:if>
|
||||
|
||||
<fileset dir="${dir}">
|
||||
|
||||
<j:forEach var="res" items="${resource.includes}">
|
||||
<include name="${res}"/>
|
||||
</j:forEach>
|
||||
<j:forEach var="res" items="${resource.excludes}">
|
||||
<exclude name="${res}"/>
|
||||
</j:forEach>
|
||||
</fileset>
|
||||
</copy>
|
||||
<j:choose trim="true">
|
||||
<j:when test="${(resource.targetPath != null) && (!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="/"/>
|
||||
|
||||
<j:if test="${empty dir}">
|
||||
<j:set var="dir" value="."/>
|
||||
</j:if>
|
||||
|
||||
<fileset dir="${dir}">
|
||||
|
||||
<j:forEach var="res" items="${resource.includes}">
|
||||
<include name="${res}"/>
|
||||
</j:forEach>
|
||||
<j:forEach var="res" items="${resource.excludes}">
|
||||
<exclude name="${res}"/>
|
||||
</j:forEach>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
</j:forEach>
|
||||
|
||||
<!-- 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) && (!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: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 var="resource" items="${pom.build.unitTest.resources}">
|
||||
<j:choose trim="true">
|
||||
<j:when test="${(resource.targetPath != null) && (!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>
|
||||
</fileset>
|
||||
</copy>
|
||||
</j:forEach>
|
||||
</j:if>
|
||||
</j:if>
|
||||
</target>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user