Return-Path: Delivered-To: apmail-maven-commits-archive@www.apache.org Received: (qmail 81039 invoked from network); 1 Mar 2006 02:00:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Mar 2006 02:00:01 -0000 Received: (qmail 22881 invoked by uid 500); 1 Mar 2006 01:59:59 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 22809 invoked by uid 500); 1 Mar 2006 01:59:59 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 22778 invoked by uid 99); 1 Mar 2006 01:59:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2006 17:59:59 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 28 Feb 2006 17:59:58 -0800 Received: (qmail 80770 invoked by uid 65534); 1 Mar 2006 01:59:37 -0000 Message-ID: <20060301015937.80769.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r381869 - /maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java Date: Wed, 01 Mar 2006 01:59:37 -0000 To: commits@maven.apache.org From: brett@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: brett Date: Tue Feb 28 17:59:36 2006 New Revision: 381869 URL: http://svn.apache.org/viewcvs?rev=381869&view=rev Log: cleanup line endings Modified: maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java Modified: maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java URL: http://svn.apache.org/viewcvs/maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java?rev=381869&r1=381868&r2=381869&view=diff ============================================================================== --- maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java (original) +++ maven/plugins/branches/maven-surefire-plugin-testng/src/main/java/org/apache/maven/test/SurefirePlugin.java Tue Feb 28 17:59:36 2006 @@ -52,15 +52,15 @@ * @parameter expression="${maven.test.skip}" */ private boolean skip; - + /** * Set this to 'true' to force all tests to be run using TestNG. This should be safe to do in almost all * circumstances as TestNG is capable of running JUnit and TestNG tests. - * + * * @parameter expression="${maven.test.forcetestng}" */ private boolean forceTestNG; - + /** * Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion. * @@ -110,12 +110,12 @@ /** * The test source directory containing test class sources. - * + * * @parameter expression="${project.build.testSourceDirectory}" * @required */ private File testSourceDirectory; - + /** * Specify this parameter if you want to use the test regex notation to select tests to run. * The regular expression will be used to create an include pattern formatted like **/${test}.java @@ -217,17 +217,17 @@ /** * Additional environments to set on the command line. * - * @parameter + * @parameter */ private Map environmentVariables = new HashMap(); - + /** * Command line working directory. * - * @parameter + * @parameter */ private File workingDirectory; - + /** * Option to specify the jvm (or path to the java executable) to use with * the forking options. For the default we will assume that java is in the path. @@ -236,51 +236,51 @@ * default-value="true" */ private boolean childDelegation; - + /** - * TestNG included groups for this test. Only classes/methods/etc decorated with one of the + * TestNG included groups for this test. Only classes/methods/etc decorated with one of the * groups specified here will be included in test run, if specified. - * + * * @parameter expression="${groups}" */ private String groups; - + /** * TestNG excluded groups. Any methods/classes/etc with one of the groups specified in this * list will specifically not be run. - * + * * @parameter expression="${excludedGroups}" */ private String excludedGroups; - + /** * List of TestNG suite xml file locations, seperated by commas. It should be noted that * if suiteXmlFiles is specified, no other tests will be run, effectively making * any other parameters, like include/exclude useless. - * + * * @parameter */ private List suiteXmlFiles; - + /** - * The attribute thread-count allows you to specify how many threads should be allocated + * The attribute thread-count allows you to specify how many threads should be allocated * for this execution. Makes most sense to use in conjunction with parallel. - * + * * @parameter expression="${threadCount}" * default-value="0" */ private int threadCount; - + /** - * When you use the parallel attribute, TestNG will try to run all your test methods in - * separate threads, except for methods that depend on each other, which will be run in + * When you use the parallel attribute, TestNG will try to run all your test methods in + * separate threads, except for methods that depend on each other, which will be run in * the same thread in order to respect their order of execution. - * + * * @parameter expression="${parallel}" * default-value="false" */ private boolean parallel; - + public void execute() throws MojoExecutionException { @@ -305,25 +305,25 @@ SurefireBooter surefireBooter = new SurefireBooter(); surefireBooter.setForceTestNG(forceTestNG); - + surefireBooter.setGroups(groups); - + surefireBooter.setExcludedGroups(excludedGroups); - + surefireBooter.setThreadCount(threadCount); - + surefireBooter.setParallel(parallel); - + surefireBooter.setTestSourceDirectory(testSourceDirectory.getPath()); - + // ---------------------------------------------------------------------- // Reporting - // ---------------------------------------------------------------------- + // ---------------------------------------------------------------------- getLog().info( "Setting reports dir: " + reportsDirectory ); surefireBooter.setReportsDirectory( reportsDirectory ); - + if (suiteXmlFiles != null && suiteXmlFiles.size() > 0) { for (int i = 0; i < suiteXmlFiles.size(); i++) { String filePath = (String)suiteXmlFiles.get(i); @@ -334,7 +334,7 @@ } } } - + // ---------------------------------------------------------------------- // Check to see if we are running a single test. The raw parameter will // come through if it has not been set. @@ -370,7 +370,7 @@ { excludes = new ArrayList( Arrays.asList( new String[]{"**/Abstract*Test.java", "**/Abstract*TestCase.java", "**/*$*"} ) ); } - + surefireBooter.addBattery( "org.apache.maven.surefire.battery.DirectoryBattery", new Object[]{testClassesDirectory, includes, excludes} ); } @@ -396,33 +396,33 @@ surefireBooter.addClassPathUrl( classpathElement ); } - + boolean jvm15 = false; if (System.getProperty("java.version").indexOf("1.5") > -1) jvm15 = true; - + for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); ) { Artifact artifact = (Artifact) i.next(); - + // TODO: this is crude for now. We really want to get "surefire-booter" and all its dependencies, but the // artifacts don't keep track of their children. We could just throw all of them in, but that would add an // unnecessary maven-artifact dependency which is precisely the reason we are isolating the classloader if ( "junit".equals( artifact.getArtifactId() ) || "surefire".equals( artifact.getArtifactId() ) || "surefire-booter".equals( artifact.getArtifactId() ) || "plexus-utils".equals( artifact.getArtifactId() ) || - ("testng-jdk14".equals( artifact.getArtifactId() ) + ("testng-jdk14".equals( artifact.getArtifactId() ) && !jvm15) || - ("testng-jdk15".equals( artifact.getArtifactId() ) + ("testng-jdk15".equals( artifact.getArtifactId() ) && jvm15) ) { getLog().debug( "Adding to surefire test classpath: " + artifact.getFile().getAbsolutePath() ); - + surefireBooter.addClassPathUrl( artifact.getFile().getAbsolutePath() ); } } - + addReporters( surefireBooter ); - + processSystemProperties(); // ---------------------------------------------------------------------- @@ -496,7 +496,7 @@ String value = (String) systemProperties.get( key ); - System.setProperty( key, value ); + System.setProperty( key, value ); getLog().debug( "Setting system property [" + key + "]=[" + value + "]" ); }