Author: jvelociter
Date: 2007-10-10 17:43:49 +0200 (Wed, 10 Oct 2007)
New Revision: 5355

Added:
   xwiki-products/xwiki-watch/trunk/database/
   xwiki-products/xwiki-watch/trunk/database/hsqldb/
   xwiki-products/xwiki-watch/trunk/database/hsqldb/pom.xml
   xwiki-products/xwiki-watch/trunk/database/hsqldb/src/
   xwiki-products/xwiki-watch/trunk/database/hsqldb/src/assemble/
   xwiki-products/xwiki-watch/trunk/database/hsqldb/src/assemble/database.xml
   xwiki-products/xwiki-watch/trunk/database/mysql/
   xwiki-products/xwiki-watch/trunk/database/mysql/pom.xml
   xwiki-products/xwiki-watch/trunk/database/pom.xml
Log:
XWATCH-69: created a database module with mysql and hsqldb target databases



Added: xwiki-products/xwiki-watch/trunk/database/hsqldb/pom.xml
===================================================================
--- xwiki-products/xwiki-watch/trunk/database/hsqldb/pom.xml                    
        (rev 0)
+++ xwiki-products/xwiki-watch/trunk/database/hsqldb/pom.xml    2007-10-10 
15:43:49 UTC (rev 5355)
@@ -0,0 +1,96 @@
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<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>
+  <parent>
+    <groupId>com.xpn.xwiki.products</groupId>
+    <artifactId>xwiki-watch-database</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>xwiki-watch-database-hsqldb</artifactId>
+  <name>XWiki Products - Watch - Database - HSQLDB</name>
+  <packaging>pom</packaging>
+  <description>XWiki Products - Watch - Database - HSQLDB</description>
+  <!-- Required for the exec:exec plugin execution below. Doesn't seem to work 
as an exec plugin
+       dependency -->
+  <dependencies>
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>1.8.0.7</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <!-- Step 1: Copy and filter the Hibernate config file which will be 
used by the packager
+           plugin -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+        <configuration>
+          <properties>
+            
<xwikiDbConnectionUrl>jdbc:hsqldb:file:${project.build.directory}/database/xwiki_db;shutdown=true</xwikiDbConnectionUrl>
+          </properties>
+        </configuration>
+      </plugin>
+      <!-- Step 2: Expand the XAR file -->
+      <plugin>
+        <groupId>com.xpn.xwiki.platform</groupId>
+        <artifactId>xwiki-build-xar-plugin</artifactId>
+      </plugin>
+      <!-- Step 3: Import the XAR content into the Database -->
+      <plugin>
+        <groupId>com.xpn.xwiki.platform</groupId>
+        <artifactId>xwiki-packager</artifactId>
+      </plugin>
+      <!-- Step 4: Zip the generated database -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+      </plugin>
+      <!-- Useful for debugging. Starts a GUI admin application to browse the 
HSQL DB -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <configuration>
+          <executable>java</executable>
+          <arguments>
+            <argument>-classpath</argument>
+            <!-- automatically creates the classpath using all project 
dependencies,
+                 also adding the project build directory -->
+            <classpath/>
+            <argument>org.hsqldb.util.DatabaseManager</argument>
+            <argument>-driver</argument>
+            <argument>org.hsqldb.jdbcDriver</argument>
+            <argument>-url</argument>
+            <argument>jdbc:hsqldb:target/database/xwiki_db</argument>
+            <argument>-user</argument>
+            <argument>sa</argument>
+          </arguments>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: 
xwiki-products/xwiki-watch/trunk/database/hsqldb/src/assemble/database.xml
===================================================================
--- xwiki-products/xwiki-watch/trunk/database/hsqldb/src/assemble/database.xml  
                        (rev 0)
+++ xwiki-products/xwiki-watch/trunk/database/hsqldb/src/assemble/database.xml  
2007-10-10 15:43:49 UTC (rev 5355)
@@ -0,0 +1,34 @@
+<!--
+ *
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+-->
+
+<assembly>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${basedir}/target/database</directory>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>

Added: xwiki-products/xwiki-watch/trunk/database/mysql/pom.xml
===================================================================
--- xwiki-products/xwiki-watch/trunk/database/mysql/pom.xml                     
        (rev 0)
+++ xwiki-products/xwiki-watch/trunk/database/mysql/pom.xml     2007-10-10 
15:43:49 UTC (rev 5355)
@@ -0,0 +1,32 @@
+<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>
+  <parent>
+    <groupId>com.xpn.xwiki.products</groupId>
+    <artifactId>xwiki-watch-database</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>xwiki-watch-database-mysql</artifactId>
+  <name>XWiki Products - Watch - Database - MySQL</name>
+  <packaging>pom</packaging>
+  <description>XWiki Products - Watch - Database - MySQL</description>
+  <build>
+    <plugins>
+      <!-- Step 1: Copy and filter the Hibernate config file which will be 
used by the packager
+           plugin -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-remote-resources-plugin</artifactId>
+      </plugin>
+      <!-- Step 2: Expand the XAR file -->
+      <plugin>
+        <groupId>com.xpn.xwiki.platform</groupId>
+        <artifactId>xwiki-build-xar-plugin</artifactId>
+      </plugin>
+      <!-- Step 3: Import the XAR content into the Database -->
+      <plugin>
+        <groupId>com.xpn.xwiki.platform</groupId>
+        <artifactId>xwiki-packager</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: xwiki-products/xwiki-watch/trunk/database/pom.xml
===================================================================
--- xwiki-products/xwiki-watch/trunk/database/pom.xml                           
(rev 0)
+++ xwiki-products/xwiki-watch/trunk/database/pom.xml   2007-10-10 15:43:49 UTC 
(rev 5355)
@@ -0,0 +1,126 @@
+<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>
+  <parent>
+    <groupId>com.xpn.xwiki.products</groupId>
+    <artifactId>xwiki-watch-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>xwiki-watch-database</artifactId>
+  <name>XWiki Products - Watch - Database - Parent POM</name>
+  <packaging>pom</packaging>
+  <description>XWiki Products - Watch - Database - Parent POM</description>
+  <dependencies>
+    <dependency>
+      <groupId>com.xpn.xwiki.products</groupId>
+      <artifactId>xwiki-applications-xarlet-watch</artifactId>
+      <version>${version}</version>
+      <type>xar</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <!-- Step 1: Copy and filter the Hibernate config file which will be 
used by the packager
+       plugin -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-remote-resources-plugin</artifactId>
+          <executions>
+            <execution>
+              <goals>
+                <goal>process</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <properties>
+              <xwikiCfgVirtual>1</xwikiCfgVirtual>
+            </properties>
+            <resourceBundles>
+              
<resourceBundle>com.xpn.xwiki.platform:xwiki-configuration-resources:${platform.tools.version}</resourceBundle>
+            </resourceBundles>
+          </configuration>
+        </plugin>
+        <!-- Step 2: Expand the XAR file -->
+        <plugin>
+          <groupId>com.xpn.xwiki.platform</groupId>
+          <artifactId>xwiki-build-xar-plugin</artifactId>
+          <version>${platform.tools.version}</version>
+          <configuration>
+            <groupId>com.xpn.xwiki.products</groupId>
+            <artifactId>xwiki-applications-xarlet-watch</artifactId>
+            <outputDirectory>${project.build.directory}/xar</outputDirectory>
+          </configuration>
+          <executions>
+            <execution>
+              <phase>prepare-package</phase>
+              <goals>
+                <goal>unxar</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+        <!-- Step 3: Import the XAR content into the Database -->
+        <plugin>
+          <groupId>com.xpn.xwiki.platform</groupId>
+          <artifactId>xwiki-packager</artifactId>
+          <version>${platform.tools.version}</version>
+          <configuration>
+            <sourceDirectory>${project.build.directory}/xar</sourceDirectory>
+            
<hibernateConfig>${project.build.directory}/maven-shared-archive-resources/hibernate.cfg.xml</hibernateConfig>
+          </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>${xwiki.db.jdbc.groupId}</groupId>
+              <artifactId>${xwiki.db.jdbc.artifactId}</artifactId>
+              <version>${xwiki.db.jdbc.version}</version>
+            </dependency>
+          </dependencies>
+          <executions>
+            <execution>
+              <phase>prepare-package</phase>
+              <goals>
+                <goal>import</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+        <!-- Step 4: Zip the generated database (for embedded databases only) 
-->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <configuration>
+            <descriptors>
+              <descriptor>${basedir}/src/assemble/database.xml</descriptor>
+            </descriptors>
+          </configuration>
+          <executions>
+            <execution>
+              <phase>package</phase>
+              <goals>
+                <goal>single</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <profiles>
+    <profile>
+      <id>hsqldb</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <modules>
+        <module>hsqldb</module>
+      </modules>
+    </profile>
+    <profile>
+      <id>mysql</id>
+      <modules>
+        <module>mysql</module>
+      </modules>
+    </profile>
+  </profiles>
+</project>

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to