portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r472641 - in /portals/jetspeed-2/trunk/components/serializer: ./ src/java/org/apache/jetspeed/serializer/ src/java/org/apache/jetspeed/serializer/objects/ test/assembly/
Date Wed, 08 Nov 2006 21:01:53 GMT
Author: taylor
Date: Wed Nov  8 13:01:52 2006
New Revision: 472641

URL: http://svn.apache.org/viewvc?view=rev&rev=472641
Log:
http://issues.apache.org/jira/browse/JS2-461 - Serializer component
patch from Hajo Birthelmer (hajo@bluesunrise.com)
phase 1.5 :) of 2 patches

* continuing with build integration
* initializing JNDI

export goal is now looking about 90% accurate

Removed:
    portals/jetspeed-2/trunk/components/serializer/test/assembly/
Modified:
    portals/jetspeed-2/trunk/components/serializer/maven.xml
    portals/jetspeed-2/trunk/components/serializer/project.properties
    portals/jetspeed-2/trunk/components/serializer/project.xml
    portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
    portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSSnapshot.java

Modified: portals/jetspeed-2/trunk/components/serializer/maven.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/maven.xml?view=diff&rev=472641&r1=472640&r2=472641
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/maven.xml (original)
+++ portals/jetspeed-2/trunk/components/serializer/maven.xml Wed Nov  8 13:01:52 2006
@@ -19,26 +19,43 @@
     <!-- Target of maven test:single test -->
     <property name='testcase' value='org.apache.jetspeed.idgenerator.TestIdGenerator'
/>
 
-    <goal name='importer'>
+    <goal name='copyAssemblies'>
+        <mkdir dir="${maven.build.dir}/assembly/"/>
+        <mkdir dir="${maven.build.dir}/assembly/boot/"/>        
+        <copy todir='${maven.build.dir}/assembly/boot/' file='../../src/webapp/WEB-INF/assembly/boot/datasource.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/capabilities.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/profiler.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-atn.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-atz.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-managers.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-providers.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-spi.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-spi-atn.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/security-spi-atz.xml'/>
+        <copy todir='${maven.build.dir}/assembly/' file='../../src/webapp/WEB-INF/assembly/transaction.xml'/>
       
+    </goal>
+    
+    <goal name='export'>
         <copy todir='${maven.build.dir}/classes'
           file="../../etc/log4j/log4j.properties"/>
         <copy todir='${maven.build.dir}/classes'>
           <fileset dir="../../etc/db-ojb/"/>
         </copy>                      
+        <attainGoal name='copyAssemblies'/>
         <java classname="org.apache.jetspeed.serializer.JetspeedSerializerApplication"
fork="yes">
           <classpath>
             <path refid="maven.dependency.classpath"/>
             <pathelement path="${maven.build.dest}"/>
             <pathelement path="${org.apache.jetspeed.production.jdbc.drivers.path}"/>
                         
           </classpath>
-            <arg line="-O USER -E export.xml -b ../../src/webapp/WEB-INF/assembly/boot/
-c ../../src/webapp/WEB-INF/assembly/"/>  
+            <arg line="-E export.xml -b target/assembly/boot/ -c target/assembly/"/>
 
             <sysproperty key="org.apache.jetspeed.database.url" value="${org.apache.jetspeed.production.database.url}"/>
             <sysproperty key="org.apache.jetspeed.database.driver" value="${org.apache.jetspeed.production.database.driver}"/>
             <sysproperty key="org.apache.jetspeed.database.user" value="${org.apache.jetspeed.production.database.user}"/>
             <sysproperty key="org.apache.jetspeed.database.password" value="${org.apache.jetspeed.production.database.password}"/>
           
         </java>
     </goal>
-	<preGoal name='importer'>
+	<preGoal name='export'>
         <attainGoal name="java:compile" />		
 	</preGoal>				
     <goal name='test2'>

Modified: portals/jetspeed-2/trunk/components/serializer/project.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/project.properties?view=diff&rev=472641&r1=472640&r2=472641
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/project.properties (original)
+++ portals/jetspeed-2/trunk/components/serializer/project.properties Wed Nov  8 13:01:52
2006
@@ -17,4 +17,4 @@
 
 maven.multiproject.type=jar
 maven.license.licenseFile=${basedir}/../../LICENSE.TXT
-
+maven.uberjar.main  org.apache.jetspeed.serializer.JetspeedSerializerApplication

Modified: portals/jetspeed-2/trunk/components/serializer/project.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/project.xml?view=diff&rev=472641&r1=472640&r2=472641
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/project.xml (original)
+++ portals/jetspeed-2/trunk/components/serializer/project.xml Wed Nov  8 13:01:52 2006
@@ -17,7 +17,7 @@
     $Id: project.xml 355198 2005-12-08 20:44:03Z rogerrut $
 -->
 <project>
-<extend>${basedir}/../../core-build.xml</extend>
+<extend>${basedir}/../../jetspeed-components.xml</extend>
   <pomVersion>3</pomVersion>
   <id>jetspeed-serializer</id>
   <name>Jetspeed-2 Serializer</name>

Modified: portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java?view=diff&rev=472641&r1=472640&r2=472641
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
(original)
+++ portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/JetspeedSerializerApplication.java
Wed Nov  8 13:01:52 2006
@@ -21,7 +21,7 @@
 import java.util.StringTokenizer;
 
 import org.apache.commons.configuration.PropertiesConfiguration;
-
+import org.apache.jetspeed.components.jndi.SpringJNDIStarter;
 /**
  * Jetspeed Serializer Application
  * 
@@ -139,8 +139,9 @@
 
         // if we still miss some settings, use hardoced defaults
         if (applicationPath == null) applicationPath = "./";
-        if (bootConfigFiles == null) bootConfigFiles = "assembly/boot/*.xml";
-        if (configFiles == null) configFiles = "assembly/*.xml";
+        if (bootConfigFiles == null) bootConfigFiles = "assembly/boot/";
+        if (configFiles == null) configFiles = "assembly/";
+        
 
         bootConfigFiles = bootConfigFiles + "*.xml";
         configFiles = configFiles + "*.xml";
@@ -194,18 +195,37 @@
             }
         }
         JetspeedSerializer serializer = null;
+        
+        HashMap context = new HashMap();
+ 
+        
+        SpringJNDIStarter starter = new SpringJNDIStarter(context,applicationPath,getTokens(bootConfigFiles),getTokens(configFiles));
+        
+        System.out.println("starter framework created " + starter);
+        
+        
         try
         {
-            if (applicationPath == null) applicationPath = "./";
-            if (bootConfigFiles == null) bootConfigFiles = "assembly/boot/*.xml";
-            if (configFiles == null) configFiles = configuration.getString("assembly/*.xml");
-
-            serializer = new JetspeedSerializerImpl(applicationPath,getTokens(bootConfigFiles),getTokens(configFiles));
+            starter.setUp();
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            System.exit(1);
+        }
+            
+        System.out.println("starter framework established " + starter);
+               
+        try
+        {
+            serializer = new JetspeedSerializerImpl(starter.getComponentManager());     
             if (doExport)
                 serializer.exportData(name, fileName, settings);
             else
                 serializer.importData(fileName, settings);
-        } catch (Exception e)
+            
+        } 
+        catch (Exception e)
         {
             System.err.println("Failed to process XML " + (doExport?"export":"import")+ ":"
+ e);
             e.printStackTrace();
@@ -214,6 +234,16 @@
         {
             if (serializer != null)
                 serializer.closeUp();
+            try
+            {
+               starter.tearDown();
+            }
+            catch (Exception e1)
+            {
+                System.out.println("starter framework teardown caused exception "  + e1.getLocalizedMessage());
+                e1.printStackTrace();
+                
+            }            
             System.out.println("DONE performing " + (doExport?"export":"import")+ " with
" + fileName);
         }
 

Modified: portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSSnapshot.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSSnapshot.java?view=diff&rev=472641&r1=472640&r2=472641
==============================================================================
--- portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSSnapshot.java
(original)
+++ portals/jetspeed-2/trunk/components/serializer/src/java/org/apache/jetspeed/serializer/objects/JSSnapshot.java
Wed Nov  8 13:01:52 2006
@@ -128,11 +128,9 @@
                 xml.add(g.getGroups());
                 xml.add(g.getUsers()); 
                 
-                /**
-                 * xml.add(g.getPermissions());
-                 * 
-                 * xml.add(g.getRules());
-                 */
+                xml.add(g.getPermissions());
+                xml.add(g.getRules());
+
             } catch (Exception e)
             {
                 e.printStackTrace();



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message