incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r370608 - in /incubator/graffito/trunk: commons/ commons/locator.ent commons/locator.path commons/project.xml components/ components/locator.ent components/locator.path components/maven.xml components/project.properties components/project.xml
Date Thu, 19 Jan 2006 20:15:42 GMT
Author: clombart
Date: Thu Jan 19 12:15:33 2006
New Revision: 370608

URL: http://svn.apache.org/viewcvs?rev=370608&view=rev
Log:
* Add all dependency version in the project.properties (on the  project root level)
* Small changes in the maven goals

Removed:
    incubator/graffito/trunk/commons/locator.ent
    incubator/graffito/trunk/commons/locator.path
    incubator/graffito/trunk/components/locator.ent
    incubator/graffito/trunk/components/locator.path
Modified:
    incubator/graffito/trunk/commons/   (props changed)
    incubator/graffito/trunk/commons/project.xml
    incubator/graffito/trunk/components/   (props changed)
    incubator/graffito/trunk/components/maven.xml
    incubator/graffito/trunk/components/project.properties
    incubator/graffito/trunk/components/project.xml

Propchange: incubator/graffito/trunk/commons/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Jan 19 12:15:33 2006
@@ -0,0 +1,2 @@
+
+target

Modified: incubator/graffito/trunk/commons/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/commons/project.xml?rev=370608&r1=370607&r2=370608&view=diff
==============================================================================
--- incubator/graffito/trunk/commons/project.xml (original)
+++ incubator/graffito/trunk/commons/project.xml Thu Jan 19 12:15:33 2006
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed
under the Apache License, Version 2.0 (the "License");
you may not use this file except in
compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
-->
<project>
<extend>${basedir}/../project.xml</extend>
 <pomVersion>3</pomVersion>
  <id>graffito-commons</id>
  <groupId>org.apache.portals.graffito</groupId>
 <name>Graffito Commons</name>
  <currentVersion>1.0-a1-dev</currentVersion>
 <package>org.apache.portals.graffito</package>
  <description>
	  Tools,
utility classes and exceptions used in the different Graffi
 to subproject
  </description>
  <shortDescription>Graffito Commons </shortDescription>

<repository>
   <connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/commons</connection>
   <developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/commons</developerConnection>
   <url>http://svn.apache.org/viewcvs</url>
  </repository>
  
  <dependencies>
   <dependency>
      <id>graffito-api</id>
      <groupId>org.apache.portals.graffito</groupId>
     <version>1.0-a1-dev</version>
      <properties>
        <war.bundle>true</war.bundle>
     </properties>
    </dependency>    
  </dependencies>
  <build>
   <sourceDirectory>src/java</sourceDirectory>
     <resources>
      <resource>
       <directory>${basedir}/src/java</directory>
        <excludes>
  
       <exclude>**/*.java</exclude>
        </excludes>
      </resource>
   </resources>
    <unitTestSourceDirectory>src/test</unitTestSourceDirector
 y>
    <unitTest>
       <includes>
        <include>**/Test*.java</include>
     </includes>
      <excludes>
      </excludes>
      <resources>
       <resource>
          <directory>${basedir}/src/test</directory>
         <excludes>
          <exclude>**/*.java</exclude>
          </excludes>
       </resource>
      </resources>
    </unitTest>
    
  </build>
 <reports>
       <report>maven-javadoc-plugin</report>
  </reports>
   
</project>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed
under the Apache License, Version 2.0 (the "License");
you may not use this file except in
compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless
required by applicable law or agreed to in writing, software
distributed under the License
is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations
under the License.
-->
<project>
<extend>${basedir}/../project.xml</extend>
 <pomVersion>3</pomVersion>
  <id>graffito-commons</id>
  <groupId>org.apache.portals.graffito</groupId>
 <name>Graffito Commons</name>
  <currentVersion>1.0-a1-dev</currentVersion>
 <package>org.apache.portals.graffito</package>
  <description>
	  Tools,
utility classes and exceptions used in the different Graffi
 to subproject
  </description>
  <shortDescription>Graffito Commons </shortDescription>

<repository>
   <connection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/commons</connection>
   <developerConnection>scm:subversion:https://svn.apache.org/repos/asf/incubator/graffito/trunk/commons</developerConnection>
   <url>http://svn.apache.org/viewcvs</url>
  </repository>
  
  <dependencies>
   <dependency>
      <id>graffito-api</id>
      <groupId>org.apache.portals.graffito</groupId>
     <version>${graffito.version}</version>
      <properties>
        <war.bundle>true</war.bundle>
     </properties>
    </dependency>    
  </dependencies>
  <build>
   <sourceDirectory>src/java</sourceDirectory>
     <resources>
      <resource>
       <directory>${basedir}/src/java</directory>
        <excludes>
  
       <exclude>**/*.java</exclude>
        </excludes>
      </resource>
   </resources>
    <unitTestSourceDirectory>src/test</unitTestSourc
 eDirectory>
    <unitTest>
       <includes>
        <include>**/Test*.java</include>
     </includes>
      <excludes>
      </excludes>
      <resources>
       <resource>
          <directory>${basedir}/src/test</directory>
         <excludes>
          <exclude>**/*.java</exclude>
          </excludes>
       </resource>
      </resources>
    </unitTest>
    
  </build>
 <reports>  
	  <report>maven-pmd-plugin</report>
	  <report>maven-junit-report-plugin</report>
  <report>maven-javadoc-plugin</report>
  </reports>     
</project>
\ No newline at end of file

Propchange: incubator/graffito/trunk/components/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jan 19 12:15:33 2006
@@ -1,4 +1,8 @@
+
 index
 .classpath
 .project
 .fbwarnings
+target
+velocity*
+junit*.properties

Modified: incubator/graffito/trunk/components/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/maven.xml?rev=370608&r1=370607&r2=370608&view=diff
==============================================================================
--- incubator/graffito/trunk/components/maven.xml (original)
+++ incubator/graffito/trunk/components/maven.xml Thu Jan 19 12:15:33 2006
@@ -13,131 +13,18 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  -->
-<project default="java:jar" xmlns:j="jelly:core" xmlns:define="jelly:define" xmlns:maven="jelly:maven"
>
+<project xmlns:j="jelly:core" xmlns:define="jelly:define" xmlns:maven="jelly:maven" >
 	
-	<!-- Target of maven test:single test -->
-	<property name='testcase' value='org.apache.portals.graffito.persistence.impl.TestPersistenceService'
/>
 	<!-- ================================================================ -->
-	<!-- TEST                                                             -->
-	<!-- ================================================================ -->
-	<preGoal name="test:test">
-		<attainGoal name="dbSetup"/>
-		<attainGoal name="db.reinit.test" />
-	</preGoal>
-	<goal name="dbSetup">
-		<j:set var="org.apache.portals.graffito.database.url" value="${org.apache.portals.graffito.test.database.url}"/>
-		<j:set var="org.apache.portals.graffito.database.driver" value="${org.apache.portals.graffito.test.database.driver}"/>
-		<j:set var="org.apache.portals.graffito.database.user" value="${org.apache.portals.graffito.test.database.user}"/>
-		<j:set var="org.apache.portals.graffito.database.password" value="${org.apache.portals.graffito.test.database.password}"/>
-		
-		<j:set var="maven.junit.sysproperties" 
-		       value="${maven.junit.sysproperties} org.apache.portals.graffito.database.url org.apache.portals.graffito.database.driver
org.apache.portals.graffito.database.user org.apache.portals.graffito.database.password" />
-		
-		
-		<copy file="src/test/repository.xml" todir="${maven.test.dest}" overwrite="true" failonerror="false">
-			<filterset begintoken="@" endtoken="@">
-				<filter token="PLATFORM" value="${org.apache.portals.graffito.database.ojb.platform}"/>
-			</filterset>
-			<filterset begintoken="@" endtoken="@">
-				<filter token="DATASOURCE" value="${org.apache.portals.graffito.database.ojb.datasource}"/>
-			</filterset>
-		</copy>
-
-		<echo message="driver path : ${org.apache.portals.graffito.test.jdbc.drivers.path}"/>
-		
-		<path id="jdbc.drivers.path" path="${org.apache.portals.graffito.test.jdbc.drivers.path}"/>
-		<maven:addPath id="maven.dependency.classpath" refid="jdbc.drivers.path"/>
-				
-	</goal>
-	<!-- ================================================================ -->
-	<!--  CREATE Graffito Server Master DB Script                                   -->
-	<!-- ================================================================ -->
-	<goal name="db.scripts.gen" description="Build SQL scripts using Torque generator">
-		<attainGoal name="torque:init"/>
-		<echo message="Generating SQL schema creation scripts for MySQL"/>
-		
-		<torque-sql basePathToDbProps="sql/base/"
-			    contextProperties="${torque.contextProperties}"
-			    controlTemplate="${torque.template.sql}"
-			    idTableXMLFile="${torque.idTableXMLFile}"
-			    outputDirectory="${maven.build.src}/sql/mysql"
-			    outputFile="report.${torque.project}.sql.generation"
-			    sqldbmap="${maven.build.src}/sql/mysql/sqldb.map"
-			    targetDatabase="mysql"
-			    useClasspath="true">
-			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"/>

-		</torque-sql>
-
-			
-		<echo message="Generating SQL schema creation scripts for HSQLDB"/>
-		<torque-sql basePathToDbProps="sql/base/" contextProperties="${torque.contextProperties}"

-			controlTemplate="${torque.template.sql}" idTableXMLFile="${torque.idTableXMLFile}" 
-			outputDirectory="${maven.build.src}/sql/hsql" outputFile="report.${torque.project}.sql.generation"

-			sqldbmap="${maven.build.src}/sql/hsql/sqldb.map" targetDatabase="hypersonic" useClasspath="true">
-			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"

-				/>			
-		</torque-sql>
-		<replace file="${maven.build.src}/sql/hsql/graffitostore-schema.sql" token="CONTENT,"
value="CONTENT LONGVARBINARY," />
-		
-		<echo message="Generating SQL schema creation scripts for Oracle"/>
-		<torque-sql basePathToDbProps="sql/base/" contextProperties="${torque.contextProperties}"

-			controlTemplate="${torque.template.sql}" idTableXMLFile="${torque.idTableXMLFile}" 
-			outputDirectory="${maven.build.src}/sql/oracle" outputFile="report.${torque.project}.sql.generation"

-			sqldbmap="${maven.build.src}/sql/oracle/sqldb.map" targetDatabase="oracle" useClasspath="true">
-			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"

-				/>
-		</torque-sql>
-		<echo message="Generating SQL schema creation scripts for MS SQL"/>
-		<torque-sql basePathToDbProps="sql/base/" contextProperties="${torque.contextProperties}"

-			controlTemplate="${torque.template.sql}" idTableXMLFile="${torque.idTableXMLFile}" 
-			outputDirectory="${maven.build.src}/sql/mssql" outputFile="report.${torque.project}.sql.generation"

-			sqldbmap="${maven.build.src}/sql/mssql/sqldb.map" targetDatabase="mssql" useClasspath="true">
-			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"

-				/>
-		</torque-sql>
-		<echo message="Generating SQL schema creation scripts for Postgres"/>
-		<torque-sql basePathToDbProps="sql/base/" contextProperties="${torque.contextProperties}"

-			controlTemplate="${torque.template.sql}" idTableXMLFile="${torque.idTableXMLFile}" 
-			outputDirectory="${maven.build.src}/sql/postgres" outputFile="report.${torque.project}.sql.generation"

-			sqldbmap="${maven.build.src}/sql/postgres/sqldb.map" targetDatabase="postgresql" useClasspath="true">
-			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"

-				/>
-		</torque-sql>
-	</goal>
-	<goal name="copy.scripts.derby"  description="Copy the derby script into the target folder">
-		<echo message="Copying SQL schema creation scripts for Derby"/>
-		<copy todir="${maven.build.src}/sql/derby" overwrite="true">
-			<fileset dir="src/sql/GraffitoServer/derby" />
-		</copy>		
-		
-	</goal>
-	<!-- ================================================================ -->
-	<!-- SQL SCRIPT  EXEC TEMPLATE                                                    -->
-	<!-- TODO: I'd like to implement this as a plugin or use commons SQL     -->
-	<!-- Don't call this goal directly, call :                                          
      -->
-	<!--      db.create.test or db.create.production onerror="${database.arg.onerror}"  
                                   -->
+	<!--  Check & Set properties                                          -->
 	<!-- ================================================================ -->
-	<goal name="db.execute">
-		<echo message="Execute SQL script : ${database.arg.script} -- ON ERROR = ${database.arg.onerror}"/>
-		
-		<sql driver="${org.apache.portals.graffito.database.driver}" url="${org.apache.portals.graffito.database.url}"

-			userid="${org.apache.portals.graffito.database.user}" password="${org.apache.portals.graffito.database.password}"

-			src="${database.arg.script}" >
-			<classpath>
-				<path refid="maven.dependency.classpath"/>
-				<pathelement path="${org.apache.portals.graffito.jdbc.drivers.path}"/>
-			</classpath>
-		</sql>
-		
-	</goal>
 	<goal name="db.test.properties">
-		<echo 
-			message="org.apache.portals.graffito.test.database.default.name : ${org.apache.portals.graffito.test.database.default.name}"/>
+		<echo message="org.apache.portals.graffito.test.database.default.name : ${org.apache.portals.graffito.test.database.default.name}"/>
 		<echo message="org.apache.portals.graffito.test.database.url : ${org.apache.portals.graffito.test.database.url}"/>
 		<echo message="org.apache.portals.graffito.test.database.driver : ${org.apache.portals.graffito.test.database.driver}"/>
 		<echo message="org.apache.portals.graffito.test.database.user : ${org.apache.portals.graffito.test.database.user}"/>
 		<echo 
-			message="org.apache.portals.graffito.test.database.password : ${org.apache.portals.graffito.test.database.password}"/>
+		      message="org.apache.portals.graffito.test.database.password : ${org.apache.portals.graffito.test.database.password}"/>
 		<echo message="org.apache.portals.graffito.test.database.path : ${org.apache.portals.graffito.test.jdbc.drivers.path}"/>
 		<echo message="org.apache.portals.graffito.test.jetspeed : ${org.apache.portals.graffito.test.jetspeed}"/>
 		<j:set var="name" value="${org.apache.portals.graffito.test.database.default.name}X"/>
@@ -163,10 +50,10 @@
 		</j:if >
 		<j:if test="${status == 'error'}" >
 			<fail 
-				message="Impossible to continue if all Graffito build properties are not set in the build.properties
defined in your USER_HOME folder"/>
+			      message="Impossible to continue if all Graffito build properties are not set in
the build.properties defined in your USER_HOME folder"/>
 		</j:if>
 		<j:set var="org.apache.portals.graffito.database.default.name" 
-			value="${org.apache.portals.graffito.test.database.default.name}"/>
+		       value="${org.apache.portals.graffito.test.database.default.name}"/>
 		<j:set var="org.apache.portals.graffito.database.url" value="${org.apache.portals.graffito.test.database.url}"/>
 		<j:set var="org.apache.portals.graffito.database.driver" value="${org.apache.portals.graffito.test.database.driver}"/>
 		<j:set var="org.apache.portals.graffito.database.user" value="${org.apache.portals.graffito.test.database.user}"/>
@@ -175,19 +62,20 @@
 		
 		
 	</goal>
+	
 	<goal name="db.production.properties">
 		<echo 
-			message="org.apache.portals.graffito.production.database.default.name : ${org.apache.portals.graffito.production.database.default.name}"/>
+		      message="org.apache.portals.graffito.production.database.default.name : ${org.apache.portals.graffito.production.database.default.name}"/>
 		<echo 
-			message="org.apache.portals.graffito.production.database.url : ${org.apache.portals.graffito.production.database.url}"/>
+		      message="org.apache.portals.graffito.production.database.url : ${org.apache.portals.graffito.production.database.url}"/>
 		<echo 
-			message="org.apache.portals.graffito.production.database.driver : ${org.apache.portals.graffito.production.database.driver}"/>
+		      message="org.apache.portals.graffito.production.database.driver : ${org.apache.portals.graffito.production.database.driver}"/>
 		<echo 
-			message="org.apache.portals.graffito.production.database.user : ${org.apache.portals.graffito.production.database.user}"/>
+		      message="org.apache.portals.graffito.production.database.user : ${org.apache.portals.graffito.production.database.user}"/>
 		<echo 
-			message="org.apache.portals.graffito.production.database.password : ${org.apache.portals.graffito.production.database.password}"/>
+		      message="org.apache.portals.graffito.production.database.password : ${org.apache.portals.graffito.production.database.password}"/>
 		<echo 
-			message="org.apache.portals.graffito.production.database.path : ${org.apache.portals.graffito.production.jdbc.drivers.path}"/>
+		      message="org.apache.portals.graffito.production.database.path : ${org.apache.portals.graffito.production.jdbc.drivers.path}"/>
 		<echo message="org.apache.portals.graffito.production.jetspeed : ${org.apache.portals.graffito.production.jetspeed}"/>
 		<j:set var="name" value="${org.apache.portals.graffito.production.database.default.name}X"/>
 		<j:set var="url" value="${org.apache.portals.graffito.production.database.url}X"/>
@@ -207,43 +95,99 @@
 			<echo message="No value found for the build property org.apache.portals.graffito.production.database.driver"/>
 			<j:set var="status" value="error"/>
 		</j:if >
-		<j:if test="${password == 'X'}">
-			<echo message="No value found for the build property org.apache.portals.graffito.production.database.password"/>
-		</j:if >
-		<j:if test="${jarpath == 'X'}">
-			<echo message="No value found for the build property org.apache.portals.graffito.production.database.path"/>
-			<j:set var="status" value="error"/>
-		</j:if >
 		<j:if test="${jetspeed == 'X'}">
 			<echo message="No value found for the build property org.apache.portals.graffito.production.jetspeed"/>
 			<j:set var="status" value="error"/>
 		</j:if >
 		<j:if test="${status == 'error'}" >
 			<fail 
-				message="Impossible to continue if all Graffito build properties are not set in the build.properties
defined in your USER_HOME folder"/>
+			      message="Impossible to continue if all Graffito build properties are not set in
the build.properties defined in your USER_HOME folder"/>
 		</j:if>
 		<j:set var="org.apache.portals.graffito.database.default.name" 
-			value="${org.apache.portals.graffito.production.database.default.name}"/>
+		       value="${org.apache.portals.graffito.production.database.default.name}"/>
 		<j:set var="org.apache.portals.graffito.database.url" value="${org.apache.portals.graffito.production.database.url}"/>
 		<j:set var="org.apache.portals.graffito.database.driver" 
-			value="${org.apache.portals.graffito.production.database.driver}"/>
+		       value="${org.apache.portals.graffito.production.database.driver}"/>
 		<j:set var="org.apache.portals.graffito.database.user" value="${org.apache.portals.graffito.production.database.user}"/>
 		<j:set var="org.apache.portals.graffito.database.password" 
-			value="${org.apache.portals.graffito.production.database.password}"/>
+		       value="${org.apache.portals.graffito.production.database.password}"/>
 		<j:set var="org.apache.portals.graffito.jdbc.drivers.path" 
-			value="${org.apache.portals.graffito.production.jdbc.drivers.path}"/>
+		       value="${org.apache.portals.graffito.production.jdbc.drivers.path}"/>
 		
 	</goal>
+	
+	
 	<!-- ================================================================ -->
-	<!-- EXECUTE CREATE DB SQL SCRIPTS                                            -->
-	<!-- TODO: I'd like to implement this as a plugin or use commons SQL     -->
+	<!-- TEST                                                             -->
+	<!-- ================================================================ -->
+	<preGoal name="test:test">
+		<attainGoal name="test.dbsetup"/>
+		<attainGoal name="db.reinit.test" />
+	</preGoal>
+	
+	<goal name="test.dbsetup">
+		<j:set var="org.apache.portals.graffito.database.url" value="${org.apache.portals.graffito.test.database.url}"/>
+		<j:set var="org.apache.portals.graffito.database.driver" value="${org.apache.portals.graffito.test.database.driver}"/>
+		<j:set var="org.apache.portals.graffito.database.user" value="${org.apache.portals.graffito.test.database.user}"/>
+		<j:set var="org.apache.portals.graffito.database.password" value="${org.apache.portals.graffito.test.database.password}"/>
+		
+		<j:set var="maven.junit.sysproperties" 
+		       value="${maven.junit.sysproperties} org.apache.portals.graffito.database.url org.apache.portals.graffito.database.driver
org.apache.portals.graffito.database.user org.apache.portals.graffito.database.password" />
+		
+		
+		<copy file="src/test/repository.xml" todir="${maven.test.dest}" overwrite="true" failonerror="false">
+			<filterset begintoken="@" endtoken="@">
+				<filter token="PLATFORM" value="${org.apache.portals.graffito.database.ojb.platform}"/>
+			</filterset>
+			<filterset begintoken="@" endtoken="@">
+				<filter token="DATASOURCE" value="${org.apache.portals.graffito.database.ojb.datasource}"/>
+			</filterset>
+		</copy>
+
+		<echo message="driver path : ${org.apache.portals.graffito.test.jdbc.drivers.path}"/>
+		
+		<path id="jdbc.drivers.path" path="${org.apache.portals.graffito.test.jdbc.drivers.path}"/>
+		<maven:addPath id="maven.dependency.classpath" refid="jdbc.drivers.path"/>
+				
+	</goal>
+	
+	<!-- ================================================================ -->
+	<!--  CREATE Graffito Sql Scripts                                     -->
+	<!-- ================================================================ -->
+	<goal name="db.scripts.gen" description="Build SQL scripts using Torque generator">
+		<attainGoal name="torque:init"/>		
+		
+		<j:set var="dbName" value="${org.apache.portals.graffito.database.default.name}"/>
+		<echo message="Generating SQL schema creation scripts for ${org.apache.portals.graffito.database.default.name}"/>
+		<torque-sql basePathToDbProps="sql/base/"
+			    contextProperties="${torque.contextProperties}"
+			    controlTemplate="${torque.template.sql}"
+			    idTableXMLFile="${torque.idTableXMLFile}"
+			    outputDirectory="${maven.build.src}/sql/${org.apache.portals.graffito.database.default.name}"
+			    outputFile="report.${torque.project}.sql.generation"
+			    sqldbmap="${maven.build.src}/sql/${org.apache.portals.graffito.database.default.name}/sqldb.map"
+			    targetDatabase="${org.apache.portals.graffito.database.default.name}"
+			    useClasspath="true">
+			<fileset dir="${torque.schema.dir}" includes="${torque.schema.sql.includes}" excludes="${torque.schema.sql.excludes}"/>

+		</torque-sql>
+		<j:if test="${dbName =='hsql'}" >
+			<!-- Torque bug imply to modify the generated sql script -->
+			<replace file="${maven.build.src}/sql/hsql/graffitostore-schema.sql" token="CONTENT,"
value="CONTENT LONGVARBINARY," />	
+    		</j:if>
+                
+	</goal>
+	
+	<!-- ================================================================ -->
+	<!-- EXECUTE CREATE DB SQL SCRIPTS                                    -->	
 	<!-- ================================================================ -->
 	<goal name="db.create.test">		
 		<attainGoal name="db.test.properties"/>
+		<attainGoal name="db.scripts.gen"/>
 		<attainGoal name="db.create"/>
 	</goal>
 	<goal name="db.create.production">		
 		<attainGoal name="db.production.properties"/>
+		<attainGoal name="db.scripts.gen"/>
 		<attainGoal name="db.create"/>
 		<j:set var="database.arg.script" 
 			value="./src/sql/GraffitoServer/insert-j2-security.sql" />
@@ -267,8 +211,7 @@
 		<attainGoal name="db.execute" />
 	</goal>
 	<!-- ================================================================ -->
-	<!-- EXECUTE DROP DB SQL SCRIPTS                                               -->
-	<!-- TODO: I'd like to implement this as a plugin or use commons SQL     -->
+	<!-- EXECUTE DROP DB SQL SCRIPTS                                      -->
 	<!-- ================================================================ -->
 	<goal name="db.drop.test">
 		<attainGoal name="db.test.properties"/>
@@ -277,8 +220,7 @@
 	<goal name="db.drop.production">
 		<attainGoal name="db.production.properties"/>
 		<attainGoal name="db.drop"/>
-		<j:set var="database.arg.script" 
-			value="./src/sql/GraffitoServer/delete-j2-security.sql" />
+		<j:set var="database.arg.script"  	value="./src/sql/GraffitoServer/delete-j2-security.sql"
/>
 		<attainGoal name="db.execute" />
 		
 	</goal>
@@ -299,31 +241,55 @@
 
 		
 	</goal>
-	<!-- ================================================================ -->
-	<!-- EXECUTE DROP & CREATE DB SQL SCRIPTS                                 -->
-	<!-- TODO: I'd like to implement this as a plugin or use commons SQL      -->
+	
+	<!-- ================================================================ -->	
+	<!-- EXECUTE DROP & CREATE DB SQL SCRIPTS                             -->	
 	<!-- ================================================================ -->
 	<goal name="db.reinit.test">
-		<attainGoal name="db.scripts.gen"/>
-		<attainGoal name="copy.scripts.derby"/>		
-                <attainGoal name="db.drop.test"/>		
-		<attainGoal name="db.create.test"/>
+		<attainGoal name="db.test.properties"/>
+		<attainGoal name="db.scripts.gen"/>			
+                <attainGoal name="db.drop"/>		
+		<attainGoal name="db.create"/>
 	</goal>
 	
 	<goal name="db.reinit.production">
-		<attainGoal name="db.scripts.gen"/>
-		<attainGoal name="copy.scripts.derby"/>
-		<attainGoal name="db.drop.production"/>
-		<attainGoal name="db.create.production"/>
+		<attainGoal name="db.production.properties"/>
+		<attainGoal name="db.scripts.gen"/>			
+		<attainGoal name="db.drop"/>		
+		<attainGoal name="db.create"/>
+		<j:set var="database.arg.script" 
+		       value="./src/sql/GraffitoServer/insert-j2-security.sql" />
+		<attainGoal name="db.execute" />
+		
 	</goal>
 	
 	<!-- ================================================================ -->
-	<!-- Intstall Graffito services & Graffito dependencies into                    -->
-	<!--  a deployed J2 application                                                     
       -->
+	<!-- Intstall Graffito services & Graffito dependencies into          -->
+	<!--  a deployed J2 application                                       -->
 	<!-- ================================================================ -->
 	<goal name="deploy">
 		<copy todir="${org.apache.jetspeed.deploy.war.dir}/jetspeed/WEB-INF/lib" overwrite="true">
 			<fileset file="${basedir}/target/${maven.final.name}.jar" />
 		</copy>
 	</goal>
+	
+	<!-- ============================================================================= -->
+	<!-- SQL SCRIPT  EXEC TEMPLATE                                                     -->
+	<!-- Don't call this goal directly, call :                                         -->
+	<!--      db.create.test or db.create.production onerror="${database.arg.onerror}" -->
+	<!-- ============================================================================= -->
+	<goal name="db.execute">
+		<echo message="Execute SQL script : ${database.arg.script} -- ON ERROR = ${database.arg.onerror}"/>
+		
+		<sql driver="${org.apache.portals.graffito.database.driver}" url="${org.apache.portals.graffito.database.url}"

+		     userid="${org.apache.portals.graffito.database.user}" password="${org.apache.portals.graffito.database.password}"

+		     src="${database.arg.script}" >
+			<classpath>
+				<path refid="maven.dependency.classpath"/>
+				<pathelement path="${org.apache.portals.graffito.jdbc.drivers.path}"/>
+			</classpath>
+		</sql>
+		
+	</goal>
+	
 </project>

Modified: incubator/graffito/trunk/components/project.properties
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/project.properties?rev=370608&r1=370607&r2=370608&view=diff
==============================================================================
--- incubator/graffito/trunk/components/project.properties (original)
+++ incubator/graffito/trunk/components/project.properties Thu Jan 19 12:15:33 2006
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------------------------------------
 maven.multiproject.type=jar
 
+
 #-----------------------------------------------------------------------------------------------------
 # DOC : SITE & PDF DOC
 #-----------------------------------------------------------------------------------------------------
@@ -37,6 +38,7 @@
 # COMPILE 
 #-----------------------------------------------------------------------------------------------------
 maven.compile.deprecation=on
+
 
 #-----------------------------------------------------------------------------------------------------
 # TORQUE

Modified: incubator/graffito/trunk/components/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/project.xml?rev=370608&r1=370607&r2=370608&view=diff
==============================================================================
--- incubator/graffito/trunk/components/project.xml (original)
+++ incubator/graffito/trunk/components/project.xml Thu Jan 19 12:15:33 2006
@@ -1,7 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-  <!ENTITY % locator-entities SYSTEM "file:locator.ent"> %locator-entities;
-]>
 <!--
 Copyright 2004 The Apache Software Foundation
 Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,7 +23,7 @@
   <currentVersion>1.0-a1-dev</currentVersion>
   <package>org.apache.portals.graffito</package>
   <description>
-	  This subproject  contains the default Graffito service component implementation.
+	  This subproject contains the default Graffito service component implementation.
   </description>
   <shortDescription>Graffito Components</shortDescription>
 
@@ -38,52 +35,47 @@
 
   
   <dependencies>  
-    <dependency>
-	    <groupId>org.apache.derby</groupId>
-	    <artifactId>derby</artifactId>
-	    <version>10.1.1.0</version>
-    </dependency> 
-        
+       
     <dependency>  
       <id>graffito-commons</id>
       <groupId>org.apache.portals.graffito</groupId>
-      <version>1.0-a1-dev</version>
+      <version>${graffito.version}</version>
     </dependency>
 		
     <dependency>  
       <id>graffito-api</id>
       <groupId>org.apache.portals.graffito</groupId>
-      <version>1.0-a1-dev</version>
+      <version>${graffito.version}</version>
     </dependency>
     
     <dependency>
       <id>jetspeed-api</id>
       <groupId>org.apache.portals.jetspeed-2</groupId>
-      <version>&jetspeed-version;</version>
+      <version>${jetspeed.version}</version>
     </dependency>
 
     <dependency>
       <id>jetspeed-security</id>
       <groupId>org.apache.portals.jetspeed-2</groupId>
-      <version>&jetspeed-version;</version>
+      <version>${jetspeed.version}</version>
     </dependency>    
      
      <dependency>
       <id>jetspeed-cm</id>
       <groupId>org.apache.portals.jetspeed-2</groupId>
-      <version>&jetspeed-version;</version>
+      <version>${jetspeed.version}</version>
     </dependency>
        
     <dependency>
       <id>jetspeed-rdbms</id>
       <groupId>org.apache.portals.jetspeed-2</groupId>
-      <version>&jetspeed-version;</version>
+      <version>${jetspeed.version}</version>
     </dependency>
 
     <dependency>
       <id>jetspeed-commons</id>
       <groupId>org.apache.portals.jetspeed-2</groupId>
-      <version>&jetspeed-version;</version>
+      <version>${jetspeed.version}</version>
     </dependency>    
     
     <dependency>
@@ -93,77 +85,77 @@
     
     <dependency>
       <id>tyrex</id>
-      <version>1.0.1</version>
+      <version>${tyrex.version}</version>
     </dependency>
     
     <dependency>
       <id>ojb:db-ojb</id>
-      <version>1.0.3</version>
+      <version>${ojb.version}</version>
     </dependency>
     
     <dependency>
       <id>lucene</id>
-      <version>1.2</version>
+      <version>${lucene.version}</version>
     </dependency>
     
     <dependency>
       <id>commons-dbcp</id>
-      <version>1.2.1</version>
+      <version>${commons.dbcp.version}</version>
     </dependency>
         
     <dependency>
       <id>commons-logging</id>
-      <version>1.0.3</version>
+      <version>${commons.logging.version}</version>
     </dependency>
 
     <dependency>
       <id>commons-lang</id>
-      <version>2.0</version>
+      <version>${commons.lang.version}</version>
     </dependency>
 
     <dependency>
       <id>commons-collections</id>
-      <version>3.0</version>
+      <version>${commons.collections.version}</version>
     </dependency>
 
     <dependency>
       <id>commons-configuration</id>
-      <version>1.0</version>
+      <version>${commons.configuration.version}</version>
     </dependency>  
     
     <dependency>
       <id>commons-beanutils</id>
-      <version>1.6.1</version>
+      <version>${commons.beanutils.version}</version>
     </dependency>
     
     <dependency>
       <id>commons-io</id>
-      <version>0.1</version>
+      <version>${commons.io.version}</version>
     </dependency>
     
      <dependency>
       <id>commons-pool</id>
-      <version>1.2</version>
+      <version>${commons.pool.version}</version>
     </dependency>
 
-	<dependency>
-		<id>commons-codec</id>
-		<version>1.3</version>
-	</dependency>
+     <dependency>
+	<id>commons-codec</id>
+	<version>${commons.codec.version}</version>
+     </dependency>
 
     <dependency>
       <id>xml-apis</id>
-      <version>2.0.2</version>
+      <version>${xml.apis.version}</version>
     </dependency>
    
     <dependency>
       <id>xerces</id>
-      <version>2.3.0</version>
+      <version>${xerces.version}</version>
     </dependency>
 
     <dependency>
       <id>jdom</id>
-      <version>b10</version>
+      <version>${jdom.version}</version>
     </dependency>
    
    <dependency>
@@ -173,39 +165,39 @@
             
     <dependency>
       <id>junit</id>
-      <version>3.8.1</version>
+      <version>${junit.version}</version>
     </dependency>
 
     <dependency>
       <id>log4j</id>
-      <version>1.2.8</version>
+      <version>${log4j.version}</version>
     </dependency>
                  
     <dependency>
       <id>springframework:spring</id>
-      <version>1.2.4</version>
+      <version>${spring.version}</version>
     </dependency>
 
    <dependency>
       <id>cglib</id>
-      <version>full-2.0.2</version>
+      <version>${cglib.version}</version>
     </dependency>
     
     <dependency>
       <id>aopalliance</id>
-      <version>1.0</version>
+      <version>${aopalliance.version}</version>
     </dependency>    
     
    <dependency>
       <id>oro</id>
-      <version>2.0.7</version>
+      <version>${oro.version}</version>
     </dependency>    
      
     
     <dependency>
 	<groupId>torque</groupId>
 	<artifactId>maven-torque-plugin</artifactId>
-	<version>3.2</version>
+	<version>${torque.version}</version>
 	<type>plugin</type>
 	<properties/>
     </dependency>	



Mime
View raw message