use maven:pluginVar to retrieve reference to junit
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a22fa33dfe
commit
6d309fa82e
@ -437,15 +437,10 @@
|
||||
<!-- Finally, if there are unit tests and we still do not have a specific
|
||||
dependency on jUnit, use the version from the test plugin. -->
|
||||
<j:if test="${unitTestSourcesPresent and junitArtifact == null}" >
|
||||
<!-- This goal forces the test plugin to be loaded.
|
||||
TODO: In Maven beta 9, use the special test:eclipse tag instead. -->
|
||||
<attainGoal name="test:prepare-filesystem" />
|
||||
<j:set var="testPluginProject" value="${pom.getPluginContext('maven-test-plugin').getVariable('plugin')}"/>
|
||||
<j:forEach var="testPluginArtifact" items="${testPluginProject.artifacts}">
|
||||
<j:if test="${testPluginArtifact.dependency.artifactId == 'junit'}">
|
||||
<j:set var="junitArtifact" value="${testPluginArtifact}"/>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
|
||||
<maven:pluginVar var="testPlugin" plugin='maven-test-plugin' property='plugin' />
|
||||
<j:set var="junitArtifact">${testPlugin.getDependency('junit')}</j:set>
|
||||
|
||||
<jbuilder:generateArtifactLibrary
|
||||
artifact="${junitArtifact}"
|
||||
userHome="${jbUserHome}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user