Author: hardy.ferentschik
Date: 2009-04-21 11:40:24 -0400 (Tue, 21 Apr 2009)
New Revision: 16384
Added:
validator/trunk/hibernate-validator-tck-runner/src/jboss-as/
validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.properties
validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.xml
validator/trunk/hibernate-validator-tck-runner/src/test/resources/jndi.properties
Modified:
beanvalidation/trunk/validation-tck/impl/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
validator/trunk/hibernate-validator-tck-runner/pom.xml
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java
Log:
Setting up the framework for the TCK
Modified:
beanvalidation/trunk/validation-tck/impl/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/impl/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-04-21
14:02:32 UTC (rev 16383)
+++
beanvalidation/trunk/validation-tck/impl/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-04-21
15:40:24 UTC (rev 16384)
@@ -28,6 +28,7 @@
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import org.testng.annotations.Test;
@@ -38,6 +39,7 @@
* @author Hardy Ferentschik
*/
@Artifact
+@IntegrationTest
@Resources({
@Resource(destination = "WEB-INF/classes/META-INF/validation.xml", source =
"validation.xml")
})
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java 2009-04-21
14:02:32 UTC (rev 16383)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java 2009-04-21
15:40:24 UTC (rev 16384)
@@ -65,7 +65,7 @@
}
private static final Logger log = LoggerFactory.make();
- private static final String VALIDATION_XML_FILE = "/META-INF/validation.xml";
+ private static final String VALIDATION_XML_FILE = "META-INF/validation.xml";
private static final String VALIDATION_CONFIGURATION_XSD =
"META-INF/validation-configuration-1.0.xsd";
private final MessageInterpolator defaultMessageInterpolator = new
ResourceBundleMessageInterpolator();
Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-04-21 14:02:32 UTC (rev
16383)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-04-21 15:40:24 UTC (rev
16384)
@@ -75,7 +75,7 @@
</suiteXmlFiles>
<argLine>-Xmx128m</argLine>
<forkMode>pertest</forkMode>
-
<redirectTestOutputToFile>true</redirectTestOutputToFile>
+
<!--redirectTestOutputToFile>true</redirectTestOutputToFile-->
</configuration>
</plugin>
<plugin>
@@ -167,7 +167,7 @@
</property>
<property>
<name>org.jboss.testharness.container.extraConfigurationDir</name>
- <value>../jboss-as</value>
+ <value>src/jboss-as</value>
</property>
<property>
<name>org.jboss.testharness.container.forceRestart</name>
Added: validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.properties
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.properties
(rev 0)
+++
validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.properties 2009-04-21
15:40:24 UTC (rev 16384)
@@ -0,0 +1,13 @@
+# Container a number of properties associated with installing Web Beans into JBoss AS and
running the TCK in JBoss AS
+jboss.home=/opt/java/jboss-5
+org.jboss.testharness.container.javaOpts=-Xms128m -Xmx384m -XX:MaxPermSize=128m
-Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
+
+# time to allow before attempting to restart JBoss AS
+# org.jboss.testharness.container.shutdownDelay=15000
+
+# maximum number of TCK tests to deploy before restarting JBoss AS
+# jboss.deployments.restart = 25
+webbeans-ri-int.version=5.2.0.Beta2
+webbeans.version=1.0.0.PREVIEW1
+jboss-ejb3.version=1.0.0
+
Added: validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.xml
(rev 0)
+++ validator/trunk/hibernate-validator-tck-runner/src/jboss-as/build.xml 2009-04-21
15:40:24 UTC (rev 16384)
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<project name="JBoss5DeployerInstall" default="update"
basedir="." xmlns:artifact="urn:maven-artifact-ant">
+
+ <path id="maven-ant-tasks.classpath"
path="../lib/maven-ant-tasks.jar" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"
/>
+
+ <property name="maven.dir" location="${basedir}/lib/maven" />
+
+ <property file="build.properties" />
+ <property file="local.build.properties" />
+
+ <target name="clean" description="Clean up after the JBoss
updater">
+ <delete dir="target" failonerror="false" />
+ </target>
+
+ <target name="update" depends="install-webbeans.deployer"
description="Update JBoss 5 for the Web Beans RI" />
+
+ <target name="install-webbeans.deployer">
+
+ <fail unless="jboss.home" message="Please pass in
-Djboss.home=..." />
+
+ <delete dir="${jboss.home}/server/default/deployers/webbeans.deployer"
failonerror="false" />
+ <delete dir="target" failonerror="false" />
+
+ <artifact:dependencies filesetId="webbeans.deployer.fileset"
versionsId="webbeans.deployer.versions" >
+ <dependency groupId="org.jboss.webbeans.integration"
artifactId="webbeans-jboss-int-deployer"
version="${webbeans-ri-int.version}" type="zip" />
+ <dependency groupId="org.jboss.webbeans"
artifactId="webbeans-core" version="${webbeans.version}" />
+ <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
+ <remoteRepository id="snapshots.jboss.org"
url="http://snapshots.jboss.org/maven2" />
+ </artifact:dependencies>
+
+ <mkdir dir="target/dependency/lib" />
+ <copy todir="target/dependency/lib">
+ <fileset refid="webbeans.deployer.fileset" />
+ <chainedmapper>
+ <flattenmapper />
+ <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${webbeans.deployer.versions}" to="flatten" />
+ </chainedmapper>
+ </copy>
+
+ <unzip dest="target"
src="target/dependency/lib/webbeans-jboss-int-deployer.zip" />
+
+ <copy todir="target/webbeans.deployer/lib-int/"
overwrite="true">
+ <fileset dir="target/dependency/lib">
+ <include name="webbeans-core.jar" />
+ </fileset>
+ </copy>
+
+ <delete dir="target/dependency" />
+
+ <copy
todir="${jboss.home}/server/default/deployers/webbeans.deployer">
+ <fileset dir="target/webbeans.deployer">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+
+
+ </target>
+
+ <target name="install-jboss-ejb3-update">
+
+ <fail unless="jboss.home" message="Please pass in
-Djboss.home=..." />
+
+ <artifact:dependencies filesetId="jboss.ejb3.plugin.fileset"
versionsId="jboss.ejb3.plugin.versions">
+ <dependency groupId="org.jboss.ejb3"
artifactId="jboss-ejb3-plugin" version="${jboss-ejb3.version}"
classifier="installer" />
+ <remoteRepository id="repository.jboss.org"
url="http://repository.jboss.org/maven2" />
+ </artifact:dependencies>
+
+ <mkdir dir="target/ejb3.plugin" />
+ <copy todir="target/ejb3.plugin">
+ <fileset refid="jboss.ejb3.plugin.fileset" />
+ <chainedmapper>
+ <flattenmapper />
+ <mapper classpathref="maven-ant-tasks.classpath"
classname="org.apache.maven.artifact.ant.VersionMapper"
from="${jboss.ejb3.plugin.versions}" to="flatten" />
+ </chainedmapper>
+ </copy>
+ <java jar="target/ejb3.plugin/jboss-ejb3-plugin-installer.jar"
fork="true" failonerror="true">
+ <arg line="${jboss.home}" />
+ </java>
+ </target>
+
+ <macrodef name="maven">
+ <attribute name="target" />
+ <attribute name="basedir" />
+ <element name="args" implicit="true" optional="true"
/>
+ <sequential>
+ <java classname="org.codehaus.classworlds.Launcher" fork="true"
dir="@{basedir}" failonerror="true">
+ <classpath>
+ <fileset dir="${maven.dir}/boot">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="${maven.dir}/bin">
+ <include name="*.*" />
+ </fileset>
+ </classpath>
+ <sysproperty key="classworlds.conf"
value="${maven.dir}/bin/m2.conf" />
+ <sysproperty key="maven.home" value="${maven.dir}" />
+ <args />
+ <arg line="@{target}" />
+ </java>
+ </sequential>
+ </macrodef>
+
+</project>
Added: validator/trunk/hibernate-validator-tck-runner/src/test/resources/jndi.properties
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/src/test/resources/jndi.properties
(rev 0)
+++
validator/trunk/hibernate-validator-tck-runner/src/test/resources/jndi.properties 2009-04-21
15:40:24 UTC (rev 16384)
@@ -0,0 +1,4 @@
+#jboss JNDI properties
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file