Author: bdaw
Date: 2007-11-14 14:51:43 -0500 (Wed, 14 Nov 2007)
New Revision: 8930
Added:
modules/test/trunk/test/opends/
modules/test/trunk/test/opends/pom.xml
modules/test/trunk/test/opends/resources/
modules/test/trunk/test/opends/resources/META-INF/
modules/test/trunk/test/opends/resources/META-INF/jboss-service.xml
Modified:
modules/test/trunk/build/pom.xml
modules/test/trunk/pom.xml
modules/test/trunk/test/agent/pom.xml
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java
modules/test/trunk/tooling/core/src/main/java/org/jboss/unit/tooling/JavaBuilder.java
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/TestSuiteExecutor.java
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/configuration/Testsuite.java
Log:
couple of changes...
Modified: modules/test/trunk/build/pom.xml
===================================================================
--- modules/test/trunk/build/pom.xml 2007-11-14 19:22:16 UTC (rev 8929)
+++ modules/test/trunk/build/pom.xml 2007-11-14 19:51:43 UTC (rev 8930)
@@ -54,7 +54,7 @@
<version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
<version.apache.httpclient>3.0.1</version.apache.httpclient>
<version.cargo>0.9-portal</version.cargo>
- <version.sun.opends>1.0.0-BUILD04</version.sun.opends>
+ <version.sun.opends>legacy</version.sun.opends>
<version.jboss.hibernate>3.2.3.GA</version.jboss.hibernate>
<version.dom4j>1.6.1</version.dom4j>
<version.jboss.jbossas.core-libs>4.0.4.GA</version.jboss.jbossas.core-libs>
@@ -62,6 +62,8 @@
<version.ant>1.6.5</version.ant>
<version.maven>2.0.6</version.maven>
<version.junit>3.8.1</version.junit>
+ <version.log4j>1.2.14</version.log4j>
+ <version.sleepycat>3.0.12</version.sleepycat>
</properties>
@@ -361,6 +363,16 @@
<artifactId>junit</artifactId>
<version>${version.junit}</version>
</dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${version.log4j}</version>
+ </dependency>
+ <dependency>
+ <groupId>sleepycat</groupId>
+ <artifactId>je</artifactId>
+ <version>${version.sleepycat}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: modules/test/trunk/pom.xml
===================================================================
--- modules/test/trunk/pom.xml 2007-11-14 19:22:16 UTC (rev 8929)
+++ modules/test/trunk/pom.xml 2007-11-14 19:51:43 UTC (rev 8930)
@@ -32,6 +32,7 @@
<module>mc</module>
<module>remote</module>
<module>test/core</module>
+ <module>test/opends</module>
<module>test/generic</module>
<module>test/jboss</module>
<module>test/agent</module>
Modified: modules/test/trunk/test/agent/pom.xml
===================================================================
--- modules/test/trunk/test/agent/pom.xml 2007-11-14 19:22:16 UTC (rev 8929)
+++ modules/test/trunk/test/agent/pom.xml 2007-11-14 19:51:43 UTC (rev 8930)
@@ -71,6 +71,8 @@
</resource>
</resources>
+
+
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Added: modules/test/trunk/test/opends/pom.xml
===================================================================
--- modules/test/trunk/test/opends/pom.xml (rev 0)
+++ modules/test/trunk/test/opends/pom.xml 2007-11-14 19:51:43 UTC (rev 8930)
@@ -0,0 +1,101 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-portal-modules-test</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>opends</artifactId>
+ <packaging>jboss-sar</packaging>
+ <name>JBoss Portal Modules Test OpenDS</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>sun-opends</groupId>
+ <artifactId>opends-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${version.log4j}</version>
+ </dependency>
+ <dependency>
+ <groupId>sleepycat</groupId>
+ <artifactId>je</artifactId>
+ <version>${version.sleepycat}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>portal-test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>resources</directory>
+ </resource>
+ </resources>
+
+ <!--<sourceDirectory>../src/main/java</sourceDirectory>-->
+
+ <plugins>
+ <!--<plugin>-->
+ <!--<artifactId>maven-compiler-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<includes>-->
+
<!--<include>org/jboss/portal/test/framework/embedded/opends/**</include>-->
+ <!--</includes>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <excludes>
+ <exclude>jboss:jboss-jmx</exclude>
+ <exclude>jboss:jboss-backport-concurrent</exclude>
+ <exclude>jboss:jboss-common-logging-spi</exclude>
+
<exclude>org.jboss.portal.common:jboss-portal-modules-common</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>jboss:jboss-remoting</exclude>
+
<exclude>jboss.jbossas.core-libs:jboss-local-jdbc</exclude>
+ <exclude>javax.servlet:servlet-api</exclude>
+ <exclude>ant:ant</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss</exclude>
+ <exclude>jboss.jbossas.core-libs:jnpserver</exclude>
+ <exclude>ant:ant-launcher</exclude>
+ <exclude>jboss:jboss-common-core</exclude>
+ <exclude>jboss:jboss-j2ee</exclude>
+ <exclude>jboss:jboss-system</exclude>
+ <exclude>ant:ant-nodeps</exclude>
+ <exclude>javax.activation:activation</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss-jca</exclude>
+ <exclude>cargo:core</exclude>
+ <exclude>hibernate:hibernate3</exclude>
+ <exclude>apache-xerces:xml-apis</exclude>
+
<exclude>jboss.jbossas.core-libs:jboss-transaction</exclude>
+ <exclude>dom4j:dom4j</exclude>
+ <exclude>oswego-concurrent:concurrent</exclude>
+ <exclude>apache-slide:webdavlib</exclude>
+ <exclude>apache-httpclient:commons-httpclient</exclude>
+ <exclude>apache-log4j:log4j</exclude>
+ <exclude>org.codehaus.cargo:cargo-core-uberjar</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ <exclude>ant:ant-junit</exclude>
+ </excludes>
+
<libDirectory>${project.build.directory}/${project.build.finalName}</libDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+
+ </properties>
+</project>
\ No newline at end of file
Added: modules/test/trunk/test/opends/resources/META-INF/jboss-service.xml
===================================================================
--- modules/test/trunk/test/opends/resources/META-INF/jboss-service.xml
(rev 0)
+++ modules/test/trunk/test/opends/resources/META-INF/jboss-service.xml 2007-11-14
19:51:43 UTC (rev 8930)
@@ -0,0 +1,31 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+ <!-- OpenDS service (LDAP) -->
+ <mbean
+ code="org.jboss.portal.test.framework.embedded.opends.OpenDSService"
+ name="portal.test:service=OpenDSService">
+ </mbean>
+</server>
\ No newline at end of file
Modified:
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java
===================================================================
---
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java 2007-11-14
19:22:16 UTC (rev 8929)
+++
modules/test/trunk/test/src/main/java/org/jboss/portal/test/framework/embedded/opends/OpenDSService.java 2007-11-14
19:51:43 UTC (rev 8930)
@@ -72,7 +72,7 @@
{
//TODO:
- //DirectoryServer.restart(getClass().getName(), "DS restart");
+ DirectoryServer.restart(getClass().getName(), "DS restart");
}
public void create() throws Exception
@@ -115,8 +115,8 @@
public void stopService() throws Exception
{
//TODO:
- //log.info("Asking DS to shutdown");
- //DirectoryServer.shutDown(getClass().getName(), "Shut down DS");
+ log.info("Asking DS to shutdown");
+ DirectoryServer.shutDown(getClass().getName(), "Shut down DS");
}
public void destroy() throws Exception
Modified:
modules/test/trunk/tooling/core/src/main/java/org/jboss/unit/tooling/JavaBuilder.java
===================================================================
---
modules/test/trunk/tooling/core/src/main/java/org/jboss/unit/tooling/JavaBuilder.java 2007-11-14
19:22:16 UTC (rev 8929)
+++
modules/test/trunk/tooling/core/src/main/java/org/jboss/unit/tooling/JavaBuilder.java 2007-11-14
19:51:43 UTC (rev 8930)
@@ -38,7 +38,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.LinkedList;
-import java.util.Hashtable;
+
import static org.jboss.unit.tooling.ToolingConstants.*;
/**
@@ -62,7 +62,7 @@
private Set<String> excludeKeywords = new HashSet<String>();
- private boolean jpda = false;
+ private boolean jPDA = false;
private boolean fork = true;
@@ -119,13 +119,13 @@
java.addAssertions(assertions);
// Beginning of jpda option implementation, need to improve it
- if (jpda)
+ if (jPDA)
{
Environment.Variable javaDotCompilerProperty = new Environment.Variable();
javaDotCompilerProperty.setKey("java.compiler");
javaDotCompilerProperty.setValue("NONE");
java.addSysproperty(javaDotCompilerProperty);
- java.setJvmargs("-Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000");
+ java.setJvmargs("-Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9000");
}
// Set fork
@@ -420,14 +420,14 @@
this.excludeKeywords = excludeKeywords;
}
- public boolean isJpda()
+ public boolean isJPDA()
{
- return jpda;
+ return jPDA;
}
- public void setJpda(boolean jpda)
+ public void setJPDA(boolean jPDA)
{
- this.jpda = jpda;
+ this.jPDA = jPDA;
}
public boolean isFork()
Modified:
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/TestSuiteExecutor.java
===================================================================
---
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/TestSuiteExecutor.java 2007-11-14
19:22:16 UTC (rev 8929)
+++
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/TestSuiteExecutor.java 2007-11-14
19:51:43 UTC (rev 8930)
@@ -40,7 +40,7 @@
import java.io.File;
import java.io.FileReader;
import java.util.Arrays;
-import java.util.Hashtable;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -133,25 +133,57 @@
// Apply task classpath
- for (Artifact artifact : (Set<Artifact>)project.getArtifacts())
+// System.out.println("Creating classpath: ");
+
+ for (Artifact artifact :
(Collection<Artifact>)project.getCompileArtifacts())
{
+ System.out.println("Compile Artifact: " + artifact.getGroupId() +
":" + artifact.getArtifactId());
path.createPathElement().setLocation(artifact.getFile());
}
- for (Artifact artifact : (List<Artifact>)project.getTestArtifacts())
+ for (Artifact artifact :
(Collection<Artifact>)project.getTestArtifacts())
{
+// System.out.println("Test Artifact: " + artifact.getGroupId() +
":" + artifact.getArtifactId());
path.createPathElement().setLocation(artifact.getFile());
}
- for (Resource resource : (List<Resource>)project.getTestResources())
+ for (Artifact artifact :
(Collection<Artifact>)project.getRuntimeArtifacts())
{
+// System.out.println("Runtime Artifact: " + artifact.getGroupId() +
":" + artifact.getArtifactId());
+ path.createPathElement().setLocation(artifact.getFile());
+ }
+
+ for (Artifact artifact :
(Collection<Artifact>)project.getSystemArtifacts())
+ {
+// System.out.println("System Artifact: " + artifact.getGroupId() +
":" + artifact.getArtifactId());
+ path.createPathElement().setLocation(artifact.getFile());
+ }
+
+ for (Artifact artifact :
(Collection<Artifact>)project.getDependencyArtifacts())
+ {
+// System.out.println("Dependency Artifact: " +
artifact.getGroupId() + ":" + artifact.getArtifactId());
+ path.createPathElement().setLocation(artifact.getFile());
+ }
+
+ // getSystemPath returns null...
+// for (Dependency dependency :
(List<Dependency>)project.getTestDependencies())
+// {
+// path.createPathElement().setLocation(new
File(dependency.getSystemPath()));
+// }
+
+
+
+ for (Resource resource :
(Collection<Resource>)project.getTestResources())
+ {
+// System.out.println("Test Resource: " + resource.getDirectory());
path.createPathElement().setLocation(new File(resource.getDirectory()));
}
try
{
- for (String element :
(List<String>)project.getTestClasspathElements())
+ for (String element :
(Collection<String>)project.getTestClasspathElements())
{
+// System.out.println("TestClasspathElement: " + element);
path.createPathElement().setLocation(new File(element));
}
}
@@ -188,7 +220,7 @@
javaBuilder.setHtmlReportDir(reports.getHtml());
}
- javaBuilder.setJpda(testsuite.isJpda());
+ javaBuilder.setJPDA(testsuite.isJPDA());
for (CasesDescription include : testsuite.getIncludes())
{
Modified:
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/configuration/Testsuite.java
===================================================================
---
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/configuration/Testsuite.java 2007-11-14
19:22:16 UTC (rev 8929)
+++
modules/test/trunk/tooling/maven2/src/main/java/org/jboss/unit/tooling/maven2/configuration/Testsuite.java 2007-11-14
19:51:43 UTC (rev 8930)
@@ -59,10 +59,8 @@
/**
* @parameter
*/
- boolean jpda = false;
+ boolean jPDA = false;
-
-
public String getConfig()
{
return config;
@@ -93,8 +91,8 @@
return parameters;
}
- public boolean isJpda()
+ public boolean isJPDA()
{
- return jpda;
+ return jPDA;
}
}