Author: mauro
Date: Wed Nov 21 03:18:42 2007
New Revision: 597039
URL: http://svn.apache.org/viewvc?rev=597039&view=rev
Log:
Made junit and testNG artifact names configurable and defaulting to junit:junit
and org.testng:testng
Modified:
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
Modified:
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=597039&r1=597038&r2=597039&view=diff
==============================================================================
---
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
(original)
+++
maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
Wed Nov 21 03:18:42 2007
@@ -323,7 +323,21 @@
* @parameter
*/
private File[] suiteXmlFiles;
-
+
+ /**
+ * Allows you to specify the name of the JUnit artifact. If not set,
<code>junit:junit</code> will be used.
+ *
+ * @parameter expression="${junitArtifactName}" default-value="junit:junit"
+ */
+ private String junitArtifactName;
+
+ /**
+ * Allows you to specify the name of the TestNG artifact. If not set,
<code>org.testng:testng</code> will be used.
+ *
+ * @parameter expression="${testNGArtifactName}"
default-value="org.testng:testng"
+ */
+ private String testNGArtifactName;
+
/**
* (TestNG only) The attribute thread-count allows you to specify how many
threads should be allocated for this execution. Only
* makes sense to use in conjunction with parallel.
@@ -526,10 +540,10 @@
{
addArtifact( surefireBooter, surefireArtifact );
- junitArtifact = (Artifact) projectArtifactMap.get( "junit:junit" );
+ junitArtifact = (Artifact) projectArtifactMap.get(
junitArtifactName );
// TODO: this is pretty manual, but I'd rather not require the
plugin > dependencies section right now
- testNgArtifact = (Artifact) projectArtifactMap.get(
"org.testng:testng" );
+ testNgArtifact = (Artifact) projectArtifactMap.get(
testNGArtifactName );
if ( testNgArtifact != null )
{