You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/04/02 18:17:39 UTC

svn commit: r1308416 - in /incubator/syncope/trunk: core/ core/src/main/java/org/syncope/core/persistence/beans/ core/src/main/webapp/WEB-INF/ core/src/test/java/org/syncope/core/rest/ core/src/test/resources/jboss/ hibernate-enhancer/src/main/java/org...

Author: ilgrosso
Date: Mon Apr  2 16:17:38 2012
New Revision: 1308416

URL: http://svn.apache.org/viewvc?rev=1308416&view=rev
Log:
[SYNCOPE-29] Updating to cargo 1.2.1 and JBoss 7.1.1-Final

Modified:
    incubator/syncope/trunk/core/pom.xml
    incubator/syncope/trunk/core/src/main/java/org/syncope/core/persistence/beans/ReportExec.java
    incubator/syncope/trunk/core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
    incubator/syncope/trunk/core/src/test/java/org/syncope/core/rest/ReportTestITCase.java
    incubator/syncope/trunk/core/src/test/resources/jboss/persistence.properties
    incubator/syncope/trunk/hibernate-enhancer/src/main/java/org/syncope/hibernate/HibernateEnhancer.java
    incubator/syncope/trunk/parent/pom.xml

Modified: incubator/syncope/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/pom.xml?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/core/pom.xml (original)
+++ incubator/syncope/trunk/core/pom.xml Mon Apr  2 16:17:38 2012
@@ -498,7 +498,7 @@ under the License.
                 <groupId>org.codehaus.groovy</groupId>
                 <artifactId>groovy-all</artifactId>
               </dependency>
-            </dependencies>
+            </dependencies>            
           </container>
           <configuration>
             <type>standalone</type>
@@ -521,6 +521,7 @@ under the License.
               <deployable>
                 <location>${cargo.run.dir}</location>
                 <pingURL>http://localhost:${cargo.servlet.port}/syncope/rest/schema/user/list.xml</pingURL>
+                <pingTimeout>60000</pingTimeout>
                 <properties>
                   <context>syncope</context>
                 </properties>
@@ -1029,58 +1030,6 @@ under the License.
             </executions>
           </plugin>
 
-          <!--<plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>exec-maven-plugin</artifactId>
-            <inherited>true</inherited>
-            <executions>
-              <execution>
-                <id>start-derby</id>
-                <phase>pre-integration-test</phase>
-                <goals>
-                  <goal>exec</goal>
-                </goals>
-                <configuration>
-                  <executable>java</executable>
-                  <classpathScope>test</classpathScope>
-                  <arguments>
-                    <argument>-classpath</argument>
-                    <classpath>
-                      <dependency>org.apache.derby:derby</dependency>
-                      <dependency>org.apache.derby:derbynet</dependency>
-                    </classpath>
-                    <argument>org.apache.derby.drda.NetworkServerControl</argument>
-                    <argument>start</argument>
-                    <argument>-noSecurityManager</argument>
-                  </arguments>
-                  <workingDirectory>${project.build.directory}/target/derby</workingDirectory>
-                </configuration>
-              </execution>
-              <execution>
-                <id>stop-derby</id>
-                <phase>post-integration-test</phase>
-                <goals>
-                  <goal>exec</goal>
-                </goals>
-                <configuration>
-                  <executable>java</executable>
-                  <classpathScope>test</classpathScope>
-                  <arguments>
-                    <argument>-classpath</argument>
-                    <classpath>
-                      <dependency>org.apache.derby:derby</dependency>
-                      <dependency>org.apache.derby:derbynet</dependency>
-                    </classpath>
-                    <argument>org.apache.derby.drda.NetworkServerControl</argument>
-                    <argument>shutdown</argument>
-                    <argument>-noSecurityManager</argument>
-                  </arguments>
-                  <workingDirectory>${project.build.directory}/target/derby</workingDirectory>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>-->
-          
           <plugin>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-maven2-plugin</artifactId>
@@ -1104,7 +1053,7 @@ under the License.
 
     <profile>
       <id>jboss-it</id>
-
+      
       <dependencies>
         <dependency>
           <groupId>org.apache.syncope</groupId>
@@ -1151,7 +1100,7 @@ under the License.
             <executions>
               <execution>
                 <id>enhance-hibernate</id>
-                <phase>process-classes</phase>
+                <phase>test-compile</phase>
                 <goals>
                   <goal>exec</goal>
                 </goals>
@@ -1197,7 +1146,7 @@ under the License.
               <skipTests>true</skipTests>
             </configuration>
           </plugin>
-
+          
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-war-plugin</artifactId>
@@ -1215,7 +1164,7 @@ under the License.
               <container>
                 <containerId>jboss71x</containerId>
                 <zipUrlInstaller>
-                  <url>http://download.jboss.org/jbossas/7.1/jboss-as-7.1.0.Final/jboss-as-7.1.0.Final.zip</url>
+                  <url>http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip</url>
                   <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
                   <extractDir>${java.io.tmpdir}</extractDir>
                 </zipUrlInstaller>
@@ -1234,7 +1183,6 @@ under the License.
                 <phase>pre-integration-test</phase>
                 <goals>
                   <goal>start</goal>
-                  <goal>deploy</goal>
                 </goals>
               </execution>
               <execution>

Modified: incubator/syncope/trunk/core/src/main/java/org/syncope/core/persistence/beans/ReportExec.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/syncope/core/persistence/beans/ReportExec.java?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/syncope/core/persistence/beans/ReportExec.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/syncope/core/persistence/beans/ReportExec.java Mon Apr  2 16:17:38 2012
@@ -22,7 +22,9 @@ import javax.persistence.Basic;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.Id;
+import javax.persistence.Lob;
 import javax.persistence.ManyToOne;
+import org.apache.commons.lang.ArrayUtils;
 import org.syncope.types.ReportExecStatus;
 
 @Entity
@@ -42,8 +44,9 @@ public class ReportExec extends Abstract
     /**
      * Report execution result, stored as an XML stream.
      */
+    @Lob
     @Basic(fetch = FetchType.LAZY)
-    private byte[] execResult;
+    private Byte[] execResult;
 
     public Long getId() {
         return id;
@@ -58,11 +61,11 @@ public class ReportExec extends Abstract
     }
 
     public byte[] getExecResult() {
-        return execResult;
+        return execResult == null ? null : ArrayUtils.toPrimitive(execResult);
     }
 
     public void setExecResult(byte[] execResult) {
-        this.execResult = execResult;
+        this.execResult = execResult == null ? null : ArrayUtils.toObject(execResult);
     }
 
     public void setStatus(ReportExecStatus status) {

Modified: incubator/syncope/trunk/core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml (original)
+++ incubator/syncope/trunk/core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml Mon Apr  2 16:17:38 2012
@@ -21,13 +21,12 @@ under the License.
 <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
   <deployment>
     <dependencies>
-      <module name="org.hibernate" />
-      <module name="org.apache.xerces" />
-      <module name="org.apache.xalan" />
+      <module name="org.hibernate"/>
+      <module name="org.apache.xalan"/>
     </dependencies>
     <exclusions>
-      <module name="org.slf4j" />
-      <module name="org.slf4j.impl" />
+      <module name="org.slf4j"/>
+      <module name="org.slf4j.impl"/>
     </exclusions>
   </deployment>
 </jboss-deployment-structure>

Modified: incubator/syncope/trunk/core/src/test/java/org/syncope/core/rest/ReportTestITCase.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/java/org/syncope/core/rest/ReportTestITCase.java?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/java/org/syncope/core/rest/ReportTestITCase.java (original)
+++ incubator/syncope/trunk/core/src/test/java/org/syncope/core/rest/ReportTestITCase.java Mon Apr  2 16:17:38 2012
@@ -101,8 +101,10 @@ public class ReportTestITCase extends Ab
         report = restTemplate.postForObject(BASE_URL + "report/create", report, ReportTO.class);
         assertNotNull(report);
 
-        ReportTO actual = restTemplate.getForObject(BASE_URL + "report/read/{reportId}", ReportTO.class, report.getId());
+        ReportTO actual = restTemplate.getForObject(BASE_URL + "report/read/{reportId}", ReportTO.class,
+                report.getId());
         assertNotNull(actual);
+
         assertEquals(actual, report);
     }
 

Modified: incubator/syncope/trunk/core/src/test/resources/jboss/persistence.properties
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/resources/jboss/persistence.properties?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/resources/jboss/persistence.properties (original)
+++ incubator/syncope/trunk/core/src/test/resources/jboss/persistence.properties Mon Apr  2 16:17:38 2012
@@ -21,3 +21,4 @@ jpa.password=
 jpa.dialect=org.hibernate.dialect.H2Dialect
 quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 quartz.sql=tables_h2.sql
+logback.sql=h2.sql

Modified: incubator/syncope/trunk/hibernate-enhancer/src/main/java/org/syncope/hibernate/HibernateEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/hibernate-enhancer/src/main/java/org/syncope/hibernate/HibernateEnhancer.java?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/hibernate-enhancer/src/main/java/org/syncope/hibernate/HibernateEnhancer.java (original)
+++ incubator/syncope/trunk/hibernate-enhancer/src/main/java/org/syncope/hibernate/HibernateEnhancer.java Mon Apr  2 16:17:38 2012
@@ -79,12 +79,16 @@ public final class HibernateEnhancer {
 
                 for (Field field : entity.getDeclaredFields()) {
                     AnnotationsAttribute annotAttr = null;
-                    // Add Hibernate's @Type to each entity String field labeled @Lob,
-                    // in order to enable PostgreSQL's LOB support.
+                    // Add Hibernate's @Type to each entity String field annotated with @Lob
                     if (field.isAnnotationPresent(Lob.class)) {
                         Annotation typeAnnot = new Annotation("org.hibernate.annotations.Type", constPool);
-                        typeAnnot.addMemberValue("type",
-                                new StringMemberValue("org.hibernate.type.StringClobType", constPool));
+                        if (String.class.equals(field.getType())) {
+                            typeAnnot.addMemberValue("type",
+                                    new StringMemberValue("org.hibernate.type.StringClobType", constPool));
+                        } else if (field.getType().isArray()) {
+                            typeAnnot.addMemberValue("type",
+                                    new StringMemberValue("org.hibernate.type.ByteArrayBlobType", constPool));
+                        }
 
                         annotAttr = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
                         annotAttr.addAnnotation(typeAnnot);

Modified: incubator/syncope/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/parent/pom.xml?rev=1308416&r1=1308415&r2=1308416&view=diff
==============================================================================
--- incubator/syncope/trunk/parent/pom.xml (original)
+++ incubator/syncope/trunk/parent/pom.xml Mon Apr  2 16:17:38 2012
@@ -234,7 +234,7 @@ under the License.
 
     <groovy.version>1.6.9</groovy.version>
 
-    <h2.version>1.3.164</h2.version>
+    <h2.version>1.3.165</h2.version>
 
     <logback.version>1.0.1</logback.version>
     <slf4j.version>1.6.4</slf4j.version>
@@ -824,7 +824,7 @@ under the License.
         <plugin>
           <groupId>org.codehaus.cargo</groupId>
           <artifactId>cargo-maven2-plugin</artifactId>
-          <version>1.2.0</version>
+          <version>1.2.1</version>
           <configuration>
             <container>
               <containerId>tomcat7x</containerId>