[hibernate-commits] Hibernate SVN: r18034 - beanvalidation/tck/trunk/src/main/assembly and 3 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Nov 24 11:12:57 EST 2009


Author: hardy.ferentschik
Date: 2009-11-24 11:12:57 -0500 (Tue, 24 Nov 2009)
New Revision: 18034

Added:
   beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml
Modified:
   beanvalidation/tck/trunk/changelog.txt
   beanvalidation/tck/trunk/pom.xml
   beanvalidation/tck/trunk/src/main/assembly/assembly.xml
   beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml
   beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml
   beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml
   beanvalidation/tck/trunk/src/main/resources/validation-api.sig
   validator/trunk/hibernate-validator-tck-runner/pom.xml
Log:
BVTCK-4 
Added sigtest file
Udated the documentation and assembly

Modified: beanvalidation/tck/trunk/changelog.txt
===================================================================
--- beanvalidation/tck/trunk/changelog.txt	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/changelog.txt	2009-11-24 16:12:57 UTC (rev 18034)
@@ -6,6 +6,9 @@
 1.0.2.GA
 ----------------------
 
+** Task
+    * [BVTCK-3] - Create release notes for the distribution package
+    * [BVTCK-4] - Add signature test file to TCK distribution package 
 
 
 1.0.1.GA (28-10-2009)

Modified: beanvalidation/tck/trunk/pom.xml
===================================================================
--- beanvalidation/tck/trunk/pom.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/pom.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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">
+<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">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.hibernate.jsr303.tck</groupId>
     <artifactId>jsr303-tck</artifactId>
@@ -55,23 +57,23 @@
             <groupId>org.jboss.test-harness</groupId>
             <artifactId>jboss-test-harness-api</artifactId>
             <version>1.0.0</version>
-	        <exclusions>
-	            <exclusion>
-	                <groupId>log4j</groupId>
-	                <artifactId>log4j</artifactId>
-	            </exclusion>
-	         </exclusions>
+            <exclusions>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.jboss.test-harness</groupId>
             <artifactId>jboss-test-harness</artifactId>
             <version>1.0.0</version>
-	        <exclusions>
-	            <exclusion>
-	                <groupId>log4j</groupId>
-	                <artifactId>log4j</artifactId>
-	            </exclusion>
-	         </exclusions>
+            <exclusions>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
 
@@ -85,7 +87,48 @@
             </extension>
         </extensions>
         <plugins>
-           <plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0.2</version>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>1.0-alpha-4</version>
+                <executions>
+                    <execution>
+                        <id>enforce</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <version>2.0.9</version>
+                                </requireMavenVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.jboss.maven.plugins</groupId>
                 <artifactId>maven-jdocbook-plugin</artifactId>
                 <version>2.2.0</version>
@@ -221,7 +264,9 @@
                 <configuration>
                     <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                     <remoteTagging>true</remoteTagging>
-                    <goals>deploy org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:resources org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:generate assembly:assembly</goals>
+                    <goals>deploy org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:resources
+                        org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.0:generate assembly:assembly
+                    </goals>
                 </configuration>
             </plugin>
             <plugin>
@@ -234,61 +279,16 @@
                 </configuration>
             </plugin>
         </plugins>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.0.2</version>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <configuration>
-                        <archive>
-                            <manifest>
-                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-                            </manifest>
-                        </archive>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-enforcer-plugin</artifactId>
-                    <version>1.0-alpha-4</version>
-                    <executions>
-                        <execution>
-                            <id>enforce</id>
-                            <goals>
-                                <goal>enforce</goal>
-                            </goals>
-                            <configuration>
-                                <rules>
-                                    <requireMavenVersion>
-                                        <version>2.0.9</version>
-                                    </requireMavenVersion>
-                                </rules>
-                            </configuration>
-                        </execution>
-                    </executions>
-                </plugin>
-            </plugins>
-        </pluginManagement>
     </build>
 
     <ciManagement>
         <system>Hudson</system>
-        <url />
+        <url/>
     </ciManagement>
 
     <issueManagement>
         <system>JIRA</system>
-        <url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
+        <url>http://opensource.atlassian.com/projects/hibernate/browse/BVTCK</url>
     </issueManagement>
 
     <inceptionYear>2008</inceptionYear>
@@ -302,7 +302,8 @@
 
     <scm>
         <connection>scm:svn:http://anonsvn.jboss.org/repos/hibernate/beanvalidation/tck/trunk</connection>
-        <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/beanvalidation/tck/trunk</developerConnection>
+        <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/beanvalidation/tck/trunk
+        </developerConnection>
     </scm>
 
     <distributionManagement>
@@ -343,18 +344,19 @@
                         <executions>
                             <execution>
                                 <id>process_annotations</id>
-                                <phase>process-test-resources</phase>
+                                <phase>process-resources</phase>
                                 <configuration>
                                     <tasks>
-                                        <javac srcdir="src/main/java" destdir="/target/classes" failonerror="false" excludes="test/**">
-                                            <compilerarg value="-proc:only" />
-                                            <compilerarg value="-AauditXml=${basedir}/src/main/resources/tck-audit.xml" />
+                                        <javac srcdir="${basedir}/src/main/java"
+                                               destdir="${basedir}/target/classes"
+                                               failonerror="true">
+                                            <compilerarg value="-proc:only"/>
+                                            <compilerarg value="-AauditXml=${basedir}/src/main/resources/tck-audit.xml"/>
                                             <classpath>
-                                                <path refid="maven.test.classpath" />
+                                                <path refid="maven.compile.classpath"/>
                                             </classpath>
                                         </javac>
                                     </tasks>
-                                    <sourceRoot>generate</sourceRoot>
                                 </configuration>
                                 <goals>
                                     <goal>run</goal>

Modified: beanvalidation/tck/trunk/src/main/assembly/assembly.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/assembly/assembly.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/src/main/assembly/assembly.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -18,7 +18,7 @@
    <fileSets>
       <fileSet>
          <directory>target</directory>
-         <outputDirectory/>
+         <outputDirectory>artifacts</outputDirectory>
          <excludes>
             <exclude>*-javadoc.jar</exclude>
             <exclude>*-sources.jar</exclude>
@@ -47,21 +47,17 @@
       </fileSet>
       <fileSet>
          <directory>${project.basedir}/src/main/resources</directory>
-         <outputDirectory>/</outputDirectory>
+         <outputDirectory>/artifacts</outputDirectory>
          <includes>
+            <include>tck-audit.xml</include>
             <include>tck-tests.xml</include>
+            <include>validation-api.sig</include>
+            <include>readme.txt</include> 
          </includes>
       </fileSet>
       <fileSet>
-         <directory>${project.basedir}/src/main/resources</directory>
-         <outputDirectory>/</outputDirectory>
-         <includes>
-            <include>tck-audit.xml</include>
-         </includes>
-      </fileSet>
-      <fileSet>
          <directory>${project.basedir}/target</directory>
-         <outputDirectory>/</outputDirectory>
+         <outputDirectory>/artifacts</outputDirectory>
          <includes>
             <include>coverage.html</include>
          </includes>

Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/installation.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -71,7 +71,7 @@
     source into a subfolder ri. This will allow you to run the TCK against
     Hibernate Validator.</para>
 
-    <programlisting>svn co http://anonsvn.jboss.org/repos/hibernate/validator/tags/v4_0_1_GA ri</programlisting>
+    <programlisting>svn co http://anonsvn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA ri</programlisting>
 
     <para>If you have downloaded the Hibernate Validator distribution, extract
     it into a sibling folder named hibernate-validator. The resulting folder

Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/part-execution.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -6,11 +6,14 @@
 
   <partintro>
     <para>In this part you learn how to execute the Bean Validation TCK on the
-    Bean validation reference implementation (Hibernate Validator). First, you
-    are walked through the steps necessary to execute the test suite on
-    Hibernate Validator. Then you discover how to modify the TCK runner to
-    execute the test suite on your own implementation. </para>
+    Bean validation reference implementation (Hibernate Validator). You are
+    walked through the steps necessary to execute the test suite against
+    Hibernate Validator and you discover how to modify the TCK runner to
+    execute the test suite against your own implementation. First, however,
+    you learn how to pass the Signature Test.</para>
   </partintro>
 
+  <xi:include href="sigtest.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
   <xi:include href="executing.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 </part>

Modified: beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/reporting.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -20,7 +20,7 @@
         <para><emphasis role="bold">Assertion Breadth
         Coverage</emphasis></para>
 
-        <para>The BEan Validation TCK provides at least 100% coverage of
+        <para>The Bean Validation TCK provides at least 100% coverage of
         identified assertions with test cases.</para>
       </listitem>
 
@@ -42,12 +42,6 @@
       </listitem>
 
       <listitem>
-        <para><emphasis role="bold">Method Coverage</emphasis></para>
-
-        <para>TODO</para>
-      </listitem>
-
-      <listitem>
         <para><emphasis role="bold">API Signature Coverage</emphasis></para>
 
         <para>The Bean Validation TCK covers 100% of all API public methods
@@ -309,8 +303,8 @@
         <para>The test suite detail report is very useful, but it borderlines
         on complex. As an alternative, you can have a look at the emailable
         report, which is a single HTML document that shows much of the same
-        information as the test suite detail report in a more compact layout.
-        </para>
+        information as the test suite detail report in a more compact
+        layout.</para>
       </section>
     </section>
   </section>

Added: beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml
===================================================================
--- beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml	                        (rev 0)
+++ beanvalidation/tck/trunk/src/main/docbook/en-US/sigtest.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="sigtest">
+  <title>Running the Signature Test</title>
+
+  <para>One of the requirements of an implementation passing the TCK is for it
+  to pass the Bean Validation signature test. This section describes how the
+  signature file is generated and how to run it against your
+  implementation.</para>
+
+  <section>
+    <title>Obtaining the sigtest tool</title>
+
+    <para>You can obtain the Sigtest tool (at the time of writing the TCK uses
+    version 2.1) from the Sigtest home page at <ulink
+    url="https://sigtest.dev.java.net/"></ulink>. The user guide can be found
+    at <ulink
+    url="http://java.sun.com/javame/sigtest/docs/sigtest2.1_usersguide.pdf"></ulink>.
+    The downloadable package contains the jar files used in the commands
+    below.</para>
+  </section>
+
+  <section>
+    <title>Creating the signature file</title>
+
+    <para>The TCK package contains the file
+    <filename>validation-api.sig</filename> (in the
+    <filename>artifacts</filename> directory) which was created using the
+    following command:</para>
+
+    <programlisting>java -jar sigtestdev.jar Setup -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-1.0.0.GA.jar -package javax.validation -filename validation-api.sig</programlisting>
+
+    <para>In order to pass the Bean Validation TCK you have to make sure that
+    your API passes the signature tests against
+    <filename>validation-api.sig.</filename></para>
+  </section>
+
+  <section>
+    <title>Running the signature test</title>
+
+    <para>To run the signature test use:</para>
+
+    <programlisting>java -jar sigtest.jar Test -classpath %JAVA_HOME%/jre/lib/rt.jar:lib/validation-api-1.0.0.GA.jar -static -package javax.validation -filename validation-api.sig</programlisting>
+
+    <para>In order to run against your own Bean Validation API replace
+    validation-api-1.0.0.GA.jar with your own API jar. You should get the
+    message <literal>"STATUS:Passed."</literal>.</para>
+  </section>
+
+  <section>
+    <title>Forcing a signature test failure</title>
+
+    <para>Just for fun (and to confirm that the signature test is working
+    correctly), you can try the following:</para>
+
+    <para>1) Edit validation-api.sig</para>
+
+    <para>2) Modify one of the class signatures - in the following example we
+    change one of the constructors for <literal>ValidationException</literal>
+    - here's the original:</para>
+
+    <programlisting>CLSS public javax.validation.ValidationException
+cons public ValidationException()
+cons public ValidationException(java.lang.String)
+cons public ValidationException(java.lang.String,java.lang.Throwable)
+cons public ValidationException(java.lang.Throwable)
+supr java.lang.RuntimeException</programlisting>
+
+    <para>Let's change the default (empty) constructor parameter to one with a
+    <literal>java.lang.Integer</literal>parameter instead:</para>
+
+    <programlisting>CLSS public javax.validation.ValidationException
+cons public ValidationException(java.lang.Integer)
+cons public ValidationException(java.lang.String)
+cons public ValidationException(java.lang.String,java.lang.Throwable)
+cons public ValidationException(java.lang.Throwable)
+supr java.lang.RuntimeException</programlisting>
+
+    <para>3) Now when we run the signature test using the above command, we
+    should get the following errors:</para>
+
+    <programlisting>Missing Constructors
+--------------------
+
+javax.validation.ValidationException:   constructor public javax.validation.ValidationException.ValidationException(java.lang.Integer)
+
+Added Constructors
+------------------
+
+javax.validation.ValidationException:   constructor public javax.validation.ValidationException.ValidationException()
+
+
+STATUS:Failed.2 errors
+</programlisting>
+  </section>
+</chapter>

Modified: beanvalidation/tck/trunk/src/main/resources/validation-api.sig
===================================================================
--- beanvalidation/tck/trunk/src/main/resources/validation-api.sig	2009-11-24 15:36:49 UTC (rev 18033)
+++ beanvalidation/tck/trunk/src/main/resources/validation-api.sig	2009-11-24 16:12:57 UTC (rev 18034)
@@ -11,6 +11,7 @@
 intf java.io.Serializable
 intf java.lang.Comparable<{java.lang.Enum%0}>
 meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException
+meth protected final void finalize()
 meth public final boolean equals(java.lang.Object)
 meth public final int compareTo({java.lang.Enum%0})
 meth public final int hashCode()

Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml	2009-11-24 15:36:49 UTC (rev 18033)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml	2009-11-24 16:12:57 UTC (rev 18034)
@@ -32,7 +32,7 @@
         <dependency>
             <groupId>org.hibernate.jsr303.tck</groupId>
             <artifactId>jsr303-tck</artifactId>
-            <version>1.0.1.GA</version>
+            <version>1.0.2-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.jboss.test-harness</groupId>



More information about the hibernate-commits mailing list