MAVEN-247: Add JUnit to classpath as required
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -34,8 +34,10 @@
|
||||
</j:file>
|
||||
|
||||
<echo>Creating ${basedir}/.classpath ...</echo>
|
||||
|
||||
<j:file name="${basedir}/.classpath" prettyPrint="true" xmlns="dummy">
|
||||
<j:set var="maven-eclipse-junit"
|
||||
value="${pom.getPluginContext('maven-eclipse-plugin').getVariable('maven.eclipse.junit')}"/>
|
||||
<echo>${pom.getPluginContext('maven-eclipse-plugin').getVariables()}</echo>
|
||||
<j:file name="${basedir}/.classpath" prettyPrint="true" xmlns="dummy">
|
||||
<classpath>
|
||||
|
||||
<j:if test="${sourcesPresent}">
|
||||
@@ -44,6 +46,10 @@
|
||||
|
||||
<j:if test="${unitTestSourcesPresent}">
|
||||
<classpathentry kind="src" path="${pom.build.unitTestSourceDirectory}"/>
|
||||
|
||||
<j:if test="${pom.getPluginContext('maven-eclipse-plugin').getVariable('maven.eclipse.junit') != ''}">
|
||||
<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-${pom.getPluginContext('maven-eclipse-plugin').getVariable('maven.eclipse.junit')}.jar"/>
|
||||
</j:if>
|
||||
</j:if>
|
||||
|
||||
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
# This accepts two values: 'all' for all the goals,
|
||||
# and 'plugins' to generate only the plugins' default goals.
|
||||
maven.eclipse.goals = plugins
|
||||
maven.eclipse.junit = 3.8.1
|
||||
@@ -29,6 +29,15 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.eclipse.junit</td>
|
||||
<td>Yes (default=3.8.1)</td>
|
||||
<td>
|
||||
The version of JUnit you want added to your project. If this
|
||||
property is set to an empty string, JUnit will not be added to your
|
||||
build classpath.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
Note that you will need to defined a <code>MAVEN_REPO</code> Java
|
||||
|
||||
Reference in New Issue
Block a user