openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r943147 - in /openjpa/trunk/openjpa-integration/validation: pom.xml src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java
Date Tue, 11 May 2010 15:38:44 GMT
Author: dwoods
Date: Tue May 11 15:38:44 2010
New Revision: 943147

URL: http://svn.apache.org/viewvc?rev=943147&view=rev
Log:
OPENJPA-1660 Add support to test with Apache Bean Validation provider and make it the default
provider.

Modified:
    openjpa/trunk/openjpa-integration/validation/pom.xml
    openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java

Modified: openjpa/trunk/openjpa-integration/validation/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/pom.xml?rev=943147&r1=943146&r2=943147&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/validation/pom.xml (original)
+++ openjpa/trunk/openjpa-integration/validation/pom.xml Tue May 11 15:38:44 2010
@@ -47,33 +47,26 @@
     </properties>
 
     <profiles>
-        <!-- Profile for testing with Agimatec validation provider -->
+        <!-- Default profile for testing with Apache BVAL provider -->
+        <!-- See http://incubator.apache.org/projects/beanvalidation.html -->
         <profile>
-            <id>agimatec</id>
+            <id>bval</id>
             <activation>
+                <activeByDefault>true</activeByDefault>
                 <property>
-                    <name>agimatec</name>
+                    <name>bval</name>
                 </property>
             </activation>
             <dependencies>
-                <!-- See http://code.google.com/p/agimatec-validation/wiki/GettingStarted
-->
-                <!-- Validation API RI, which we'll test with the RI
-                <dependency>
-                    <groupId>javax.validation</groupId>
-                    <artifactId>validation-api</artifactId>
-                    <version>1.0.0.GA</version>
-                    <scope>test</scope>
-                </dependency>
-                -->
                 <dependency>
                     <groupId>org.apache.geronimo.specs</groupId>
                     <artifactId>geronimo-validation_1.0_spec</artifactId>
                     <scope>test</scope>
                 </dependency>
                 <dependency>
-                    <groupId>com.agimatec</groupId>
-                    <artifactId>agimatec-jsr303</artifactId>
-                    <version>0.9.6</version>
+                    <groupId>org.apache.bval</groupId>
+                    <artifactId>bval-jsr303</artifactId>
+                    <version>0.1-incubating-SNAPSHOT</version>
                     <scope>test</scope>
                     <exclusions>
                         <!-- force usage of the geronimo-validation_1.0_spec -->
@@ -81,23 +74,12 @@
                             <groupId>javax.validation</groupId>
                             <artifactId>validation-api</artifactId>
                         </exclusion>
-                        <!-- use our level of the geronimo-jpa_2.0_spec -->
-                        <exclusion>
-                            <groupId>javax.validation</groupId>
-                            <artifactId>validation-api</artifactId>
-                        </exclusion>
                     </exclusions>
                 </dependency>
                 <dependency>
-                    <groupId>com.agimatec</groupId>
-                    <artifactId>agimatec-validation</artifactId>
-                    <version>0.9.6</version>
-                    <scope>test</scope>
-                </dependency>
-                <dependency>
                     <groupId>commons-beanutils</groupId>
                     <artifactId>commons-beanutils</artifactId>
-                    <version>1.8.2</version>
+                    <version>1.8.3</version>
                     <scope>test</scope>
                 </dependency>
                 <dependency>
@@ -107,30 +89,12 @@
                     <scope>test</scope>
                 </dependency>
             </dependencies>
-            <repositories>
-                <repository>
-                    <id>agimatec.oss.sonatype.org</id>
-                    <name>Sonatype OSS Repository</name>
-                    <url>http://oss.sonatype.org/content/repositories/agimatec</url>
-                    <layout>default</layout>
-                    <snapshots>
-                        <enabled>true</enabled>
-                        <checksumPolicy>ignore</checksumPolicy>
-                        <updatePolicy>daily</updatePolicy>
-                    </snapshots>
-                    <releases>
-                        <enabled>true</enabled>
-                        <checksumPolicy>fail</checksumPolicy>
-                    </releases>
-                </repository>
-            </repositories>
         </profile>
 
-        <!-- Default profile for testing with Hibernate Bean Validation RI -->
+        <!-- Profile for testing with Hibernate Bean Validation RI -->
         <profile>
             <id>hibernate</id>
             <activation>
-                <activeByDefault>true</activeByDefault>
                 <property>
                     <name>hibernate</name>
                 </property>
@@ -189,6 +153,77 @@
                 </repository>
             </repositories>
         </profile>
+
+        <!-- OLD Profile for testing with Agimatec validation provider -->
+        <profile>
+            <id>agimatec</id>
+            <activation>
+                <property>
+                    <name>agimatec</name>
+                </property>
+            </activation>
+            <dependencies>
+                <!-- See http://code.google.com/p/agimatec-validation/wiki/GettingStarted
-->
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-validation_1.0_spec</artifactId>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>com.agimatec</groupId>
+                    <artifactId>agimatec-jsr303</artifactId>
+                    <version>0.9.6</version>
+                    <scope>test</scope>
+                    <exclusions>
+                        <!-- force usage of the geronimo-validation_1.0_spec -->
+                        <exclusion>
+                            <groupId>javax.validation</groupId>
+                            <artifactId>validation-api</artifactId>
+                        </exclusion>
+                        <!-- use our level of the geronimo-jpa_2.0_spec -->
+                        <exclusion>
+                            <groupId>javax.validation</groupId>
+                            <artifactId>validation-api</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>com.agimatec</groupId>
+                    <artifactId>agimatec-validation</artifactId>
+                    <version>0.9.6</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>commons-beanutils</groupId>
+                    <artifactId>commons-beanutils</artifactId>
+                    <version>1.8.2</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>commons-lang</groupId>
+                    <artifactId>commons-lang</artifactId>
+                    <version>2.4</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+            <repositories>
+                <repository>
+                    <id>agimatec.oss.sonatype.org</id>
+                    <name>Sonatype OSS Repository</name>
+                    <url>http://oss.sonatype.org/content/repositories/agimatec</url>
+                    <layout>default</layout>
+                    <snapshots>
+                        <enabled>true</enabled>
+                        <checksumPolicy>ignore</checksumPolicy>
+                        <updatePolicy>daily</updatePolicy>
+                    </snapshots>
+                    <releases>
+                        <enabled>true</enabled>
+                        <checksumPolicy>fail</checksumPolicy>
+                    </releases>
+                </repository>
+            </repositories>
+        </profile>
     </profiles>
 
     <dependencies>

Modified: openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java?rev=943147&r1=943146&r2=943147&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java
(original)
+++ openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestTraversableResolver.java
Tue May 11 15:38:44 2010
@@ -238,13 +238,21 @@ public class TestTraversableResolver ext
         }
         if (PathImpl == null) {
             try {
+                PathImpl = Class.forName("org.apache.bval.jsr303.util.PathImpl",
+                    true, AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()));
+            } catch (ClassNotFoundException e) {
+                log.trace("getLeafNodeFromPath: Did not find org.apache.bval.jsr303.util.PathImpl");
+            }
+        }
+        if (PathImpl == null) {
+            try {
                 PathImpl = Class.forName("com.agimatec.validation.jsr303.util.PathImpl",
                     true, AccessController.doPrivileged(J2DoPrivHelper.getContextClassLoaderAction()));
             } catch (ClassNotFoundException e) {
                 log.trace("getLeafNodeFromPath: Did not find com.agimatec.validation.jsr303.util.PathImpl");
             }
         }
-        assertNotNull(PathImpl);
+        assertNotNull("Could not load a Bean Validation provider specific PathImpl", PathImpl);
         try {
             Method createPathFromString = PathImpl.getMethod("createPathFromString", String.class);
             assertNotNull(createPathFromString);



Mime
View raw message