You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/15 03:32:51 UTC
svn commit: r507783 -
/incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java
Author: jboynes
Date: Wed Feb 14 18:32:50 2007
New Revision: 507783
URL: http://svn.apache.org/viewvc?view=rev&rev=507783
Log:
more mojo documentation
add a property for setting the harness component's name
Modified:
incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java
Modified: incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java?view=diff&rev=507783&r1=507782&r2=507783
==============================================================================
--- incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java (original)
+++ incubator/tuscany/java/sca/runtime/itest/plugin/src/main/java/org/apache/tuscany/sca/plugin/itest/TuscanyITestMojo.java Wed Feb 14 18:32:50 2007
@@ -58,12 +58,17 @@
import org.apache.tuscany.spi.model.Operation;
/**
+ * Integration-tests an SCA composite by running it in local copy of Apache Tuscany
+ * and calling JUnit-based test components to exercise it.
+ *
* @version $Rev$ $Date$
* @goal test
* @phase integration-test
*/
public class TuscanyITestMojo extends AbstractMojo {
/**
+ * The directory where reports will be written.
+ *
* @parameter expression="${project.build.directory}/surefire-reports"
*/
public File reportsDirectory;
@@ -85,13 +90,6 @@
public File testClassesDirectory;
/**
- * @parameter expression="${project.testClasspathElements}"
- * @required
- * @readonly
- */
- public List testClassPath;
-
- /**
* The SCA domain in which to deploy the test components.
*
* @parameter expression="itest://localhost/testDomain/"
@@ -100,26 +98,40 @@
public String testDomain;
/**
- * @parameter
- */
- public List includes = new ArrayList();
-
- /**
- * @parameter
+ * The name of the component that will be implemented by the test harness composite.
+ *
+ * @parameter expression="testHarness"
+ * @required
*/
- public List excludes = new ArrayList();
+ public String testComponentName;
/**
+ * The location if the SCDL that defines the test harness composite.
+ * The source for this would normally be placed in the test/resources
+ * directory and be copied by the resource plugin; this allows property
+ * substitution if required.
+ *
* @parameter expression="${project.build.testOutputDirectory}/itest.scdl"
*/
public File testScdl;
/**
+ * The location of the SCDL that configures the Apache Tuscany runtime.
+ * This allows the default runtime configuration supplied in this plugin
+ * to be overridden.
+ *
* @parameter
*/
public URL systemScdl;
/**
+ * @parameter expression="${project.testClasspathElements}"
+ * @required
+ * @readonly
+ */
+ public List testClassPath;
+
+ /**
* Used to look up Artifacts in the remote repository.
*
* @parameter expression="${component.org.apache.maven.artifact.resolver.ArtifactResolver}"
@@ -180,7 +192,14 @@
try {
// fixme this should probably be an isolated classloader
ClassLoader testClassLoader = createTestClassLoader(getClass().getClassLoader());
+
URI name = URI.create(testDomain);
+ String harnessComponentName = testComponentName;
+ if (!harnessComponentName.endsWith("/")) {
+ harnessComponentName = harnessComponentName + '/';
+ }
+ name = name.resolve(harnessComponentName);
+
CompositeImplementation impl = new CompositeImplementation();
impl.setScdlLocation(testScdl.toURI().toURL());
impl.setClassLoader(testClassLoader);
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org