Hibernate SVN: r14518 - in core/trunk: cache-ehcache and 11 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:50:16 -0400 (Wed, 16 Apr 2008)
New Revision: 14518
Modified:
core/trunk/cache-ehcache/pom.xml
core/trunk/cache-jbosscache/pom.xml
core/trunk/cache-jbosscache2/pom.xml
core/trunk/cache-oscache/pom.xml
core/trunk/cache-swarmcache/pom.xml
core/trunk/connection-c3p0/pom.xml
core/trunk/connection-proxool/pom.xml
core/trunk/core/pom.xml
core/trunk/jmx/pom.xml
core/trunk/pom.xml
core/trunk/testing/pom.xml
core/trunk/testsuite/pom.xml
core/trunk/tutorials/pom.xml
Log:
[maven-release-plugin] prepare release hibernate-3.3.0.beta1
Modified: core/trunk/cache-ehcache/pom.xml
===================================================================
--- core/trunk/cache-ehcache/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/cache-ehcache/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/cache-jbosscache/pom.xml
===================================================================
--- core/trunk/cache-jbosscache/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/cache-jbosscache/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/cache-jbosscache2/pom.xml
===================================================================
--- core/trunk/cache-jbosscache2/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/cache-jbosscache2/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/cache-oscache/pom.xml
===================================================================
--- core/trunk/cache-oscache/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/cache-oscache/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/cache-swarmcache/pom.xml
===================================================================
--- core/trunk/cache-swarmcache/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/cache-swarmcache/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/connection-c3p0/pom.xml
===================================================================
--- core/trunk/connection-c3p0/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/connection-c3p0/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/connection-proxool/pom.xml
===================================================================
--- core/trunk/connection-proxool/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/connection-proxool/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/core/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/jmx/pom.xml
===================================================================
--- core/trunk/jmx/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/jmx/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -31,7 +31,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<packaging>pom</packaging>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<name>Hibernate Core Aggregator</name>
<description>Aggregator of the Hibernate Core modules.</description>
@@ -52,9 +52,9 @@
</licenses>
<scm>
- <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</developerConnection>
- <url>https://svn.jboss.org/repos/hibernate/core/trunk</url>
+ <connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.0.b...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.0.b...</developerConnection>
+ <url>https://svn.jboss.org/repos/hibernate/core/tags/hibernate-3.3.0.beta1</url>
</scm>
<ciManagement>
Modified: core/trunk/testing/pom.xml
===================================================================
--- core/trunk/testing/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/testing/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/testsuite/pom.xml
===================================================================
--- core/trunk/testsuite/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/testsuite/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: core/trunk/tutorials/pom.xml
===================================================================
--- core/trunk/tutorials/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
+++ core/trunk/tutorials/pom.xml 2008-04-16 14:50:16 UTC (rev 14518)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.3.0.beta1</version>
<relativePath>../pom.xml</relativePath>
</parent>
16 years
Hibernate SVN: r14517 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:43:20 -0400 (Wed, 16 Apr 2008)
New Revision: 14517
Modified:
core/trunk/pom.xml
Log:
redirect logging to file when running tests through maven/surefire
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-16 14:28:56 UTC (rev 14516)
+++ core/trunk/pom.xml 2008-04-16 14:43:20 UTC (rev 14517)
@@ -213,6 +213,14 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
<configuration>
16 years
Hibernate SVN: r14516 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:28:56 -0400 (Wed, 16 Apr 2008)
New Revision: 14516
Modified:
core/trunk/pom.xml
Log:
oops, commented too much out of the release plugin config
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
+++ core/trunk/pom.xml 2008-04-16 14:28:56 UTC (rev 14516)
@@ -1,28 +1,28 @@
-<?xml version="1.0"?>
-
-<!--
- ~ Hibernate, Relational Persistence for Idiomatic Java
- ~
- ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- ~ indicated by the @author tags or express copyright attribution
- ~ statements applied by the authors. All third-party contributions are
- ~ distributed under license by Red Hat Middleware LLC.
- ~
- ~ This copyrighted material is made available to anyone wishing to use, modify,
- ~ copy, or redistribute it subject to the terms and conditions of the GNU
- ~ Lesser General Public License, as published by the Free Software Foundation.
- ~
- ~ This program 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 distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 51 Franklin Street, Fifth Floor
- ~ Boston, MA 02110-1301 USA
- ~
+<?xml version="1.0"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program 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 distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ ~
-->
<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/xsd/maven-4.0.0.xsd">
@@ -35,71 +35,71 @@
<name>Hibernate Core Aggregator</name>
<description>Aggregator of the Hibernate Core modules.</description>
- <url>http://hibernate.org</url>
-
- <organization>
- <name>Hibernate.org</name>
- <url>http://hibernate.org</url>
- </organization>
-
- <licenses>
- <license>
- <name>GNU Lesser General Public License</name>
- <url>http://www.gnu.org/copyleft/lesser.html</url>
- <comments>See discussion at http://hibernate.org/356.html for more details.</comments>
- <distribution>repo</distribution>
- </license>
+ <url>http://hibernate.org</url>
+
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/copyleft/lesser.html</url>
+ <comments>See discussion at http://hibernate.org/356.html for more details.</comments>
+ <distribution>repo</distribution>
+ </license>
</licenses>
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</developerConnection>
<url>https://svn.jboss.org/repos/hibernate/core/trunk</url>
- </scm>
-
- <ciManagement>
- <system>hudson</system>
- <url>http://hudson.jboss.org/hudson/job/hibernate-testsuite/</url>
- <notifiers>
- <notifier>
- <type>mail</type>
- <address>hibernate-dev(a)lists.jboss.org</address>
- </notifier>
- </notifiers>
- </ciManagement>
-
- <mailingLists>
- <mailingList>
- <name>Hibernate Announcements</name>
- <post>hibernate-announce(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
- </mailingList>
- <mailingList>
- <name>Hibernate Commit Notificatons</name>
- <post>hibernate-commits(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
- </mailingList>
- <mailingList>
- <name>Hibernate Developers</name>
- <post>hibernate-dev(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
- <otherArchives>
- <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Hibernate Issue Notifications</name>
- <post>hibernate-issues(a)lists.jboss.org</post>
- <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
- <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
- <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
- </mailingList>
+ </scm>
+
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://hudson.jboss.org/hudson/job/hibernate-testsuite/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <address>hibernate-dev(a)lists.jboss.org</address>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
+ <mailingLists>
+ <mailingList>
+ <name>Hibernate Announcements</name>
+ <post>hibernate-announce(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Commit Notificatons</name>
+ <post>hibernate-commits(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Developers</name>
+ <post>hibernate-dev(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Issue Notifications</name>
+ <post>hibernate-issues(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
+ </mailingList>
</mailingLists>
<modules>
@@ -122,79 +122,72 @@
</modules>
<build>
- <plugins>
- <plugin>
- <!-- require at least JDK 1.5 to run the build -->
- <!-- ... -->
- <!-- we need at least Maven 2.0.8 because of a bug fix affecting our antlr usage -->
- <!-- 2.0.8 not released at this time, so I instead say anything greater that 2.0.7 -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-3</version>
- <executions>
- <execution>
- <id>enforce-java</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireJavaVersion>
- <version>[1.5,)</version>
- </requireJavaVersion>
- <requireMavenVersion>
- <version>(2.0.7,)</version>
- </requireMavenVersion>
- </rules>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- by default, compile to JDK 1.4 compatibility (individual modules and/or user can override) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.4</source>
- <target>1.4</target>
- </configuration>
- </plugin>
- <!-- add specification/implementation details to the manifests -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <archive>
- <manifest>
- <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- </manifest>
- <manifestEntries>
- <Implementation-URL>${pom.url}</Implementation-URL>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-<!--
+ <plugins>
<plugin>
+ <!-- require at least JDK 1.5 to run the build -->
+ <!-- ... -->
+ <!-- we need at least Maven 2.0.8 because of a bug fix affecting our antlr usage -->
+ <!-- 2.0.8 not released at this time, so I instead say anything greater that 2.0.7 -->
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-7</version>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-3</version>
<executions>
<execution>
+ <id>enforce-java</id>
<goals>
- <goal>perform</goal>
+ <goal>enforce</goal>
</goals>
<configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <goals>install,site,assembly:single</goals>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ <requireMavenVersion>
+ <version>(2.0.7,)</version>
+ </requireMavenVersion>
+ </rules>
</configuration>
</execution>
</executions>
</plugin>
+ <!-- by default, compile to JDK 1.4 compatibility (individual modules and/or user can override) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <!-- add specification/implementation details to the manifests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${pom.url}</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-7</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+<!--
+ <goals>install,site,assembly:single</goals>
-->
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -206,82 +199,82 @@
</descriptors>
</configuration>
</plugin>
- </plugins>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
+ </plugins>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
</extensions>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <aggregate>${hibernate.core.reports.aggregate}</aggregate>
- <links>
- <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
- <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
- </links>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <aggregate>${hibernate.core.reports.aggregate}</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <aggregate>${hibernate.core.reports.aggregate}</aggregate>
- <linkXref>true</linkXref>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.4</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <aggregate>${hibernate.core.reports.aggregate}</aggregate>
- <tags>
- <tag>@FIXME</tag>
- <tag>@fixme</tag>
- <tag>FIXME</tag>
- <tag>fixme</tag>
- <tag>@TODO</tag>
- <tag>@todo</tag>
- <tag>TODO</tag>
- <tag>todo</tag>
- </tags>
- </configuration>
- </plugin>
- <plugin>
- <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javancss-maven-plugin</artifactId>
- <version>2.0-beta-2</version>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>1.1.1</version>
- <configuration>
- <onlyAnalyze>org.hibernate.*</onlyAnalyze>
- </configuration>
- </plugin>
- </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <links>
+ <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
+ <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.4</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <tags>
+ <tag>@FIXME</tag>
+ <tag>@fixme</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>@TODO</tag>
+ <tag>@todo</tag>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ </tags>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javancss-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.1.1</version>
+ <configuration>
+ <onlyAnalyze>org.hibernate.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
</reporting>
<profiles>
@@ -304,67 +297,67 @@
</modules>
</profile>
</profiles>
-
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>antlr</groupId>
- <artifactId>antlr</artifactId>
- <version>2.7.6</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- <dependency>
- <groupId>dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>1.6.1</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <distributionManagement>
- <repository>
- <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
- <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
- <!-- todo : replace this with direct svn access once the svnkit providers are available -->
- <id>repository.jboss.org</id>
- <url>file://${maven.repository.root}</url>
- </repository>
- <snapshotRepository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshot Repository</name>
- <url>dav:https://snapshots.jboss.org/maven2</url>
- </snapshotRepository>
- </distributionManagement>
-
-
- <properties>
- <hibernate.core.reports.aggregate>false</hibernate.core.reports.aggregate>
- </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+
+ <properties>
+ <hibernate.core.reports.aggregate>false</hibernate.core.reports.aggregate>
+ </properties>
+
</project>
\ No newline at end of file
16 years
Hibernate SVN: r14515 - in core/trunk: cache-jbosscache and 40 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:08:07 -0400 (Wed, 16 Apr 2008)
New Revision: 14515
Added:
core/trunk/tutorials/
core/trunk/tutorials/eg/
core/trunk/tutorials/eg/pom.xml
core/trunk/tutorials/eg/src/
core/trunk/tutorials/eg/src/main/
core/trunk/tutorials/eg/src/main/java/
core/trunk/tutorials/eg/src/main/java/org/
core/trunk/tutorials/eg/src/main/java/org/hibernate/
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionInfo.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.hbm.xml
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.hbm.xml
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/BuyNow.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Main.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Name.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Persistent.java
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.hbm.xml
core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.java
core/trunk/tutorials/eg/src/main/resources/
core/trunk/tutorials/eg/src/main/resources/org/
core/trunk/tutorials/eg/src/main/resources/org/hibernate/
core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/
core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/AuctionItem.hbm.xml
core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/Bid.hbm.xml
core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/User.hbm.xml
core/trunk/tutorials/pom.xml
core/trunk/tutorials/web/
core/trunk/tutorials/web/pom.xml
core/trunk/tutorials/web/src/
core/trunk/tutorials/web/src/main/
core/trunk/tutorials/web/src/main/java/
core/trunk/tutorials/web/src/main/java/org/
core/trunk/tutorials/web/src/main/java/org/hibernate/
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Event.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Person.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/util/
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/util/HibernateUtil.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManager.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionFactoryInitializer.java
core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java
core/trunk/tutorials/web/src/main/resources/
core/trunk/tutorials/web/src/main/resources/hibernate.cfg.xml
core/trunk/tutorials/web/src/main/resources/log4j.properties
core/trunk/tutorials/web/src/main/resources/org/
core/trunk/tutorials/web/src/main/resources/org/hibernate/
core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/
core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/
core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml
core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml
core/trunk/tutorials/web/src/main/scripts/
core/trunk/tutorials/web/src/main/scripts/runCleanDatabase.sh
core/trunk/tutorials/web/src/main/webapp/
core/trunk/tutorials/web/src/main/webapp/WEB-INF/
core/trunk/tutorials/web/src/main/webapp/WEB-INF/web.xml
Removed:
core/trunk/documentation/tutorial/
core/trunk/eg/
Modified:
core/trunk/cache-jbosscache/pom.xml
core/trunk/cache-jbosscache2/pom.xml
core/trunk/cache-oscache/pom.xml
core/trunk/cache-swarmcache/pom.xml
core/trunk/connection-c3p0/pom.xml
core/trunk/connection-proxool/pom.xml
core/trunk/core/pom.xml
core/trunk/documentation/pom.xml
core/trunk/jmx/pom.xml
core/trunk/testing/pom.xml
core/trunk/testsuite/pom.xml
Log:
trying new layout
Modified: core/trunk/cache-jbosscache/pom.xml
===================================================================
--- core/trunk/cache-jbosscache/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/cache-jbosscache/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jbosscache</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate JBossCache Integration</name>
Modified: core/trunk/cache-jbosscache2/pom.xml
===================================================================
--- core/trunk/cache-jbosscache2/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/cache-jbosscache2/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jbosscache2</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate JBossCache2.x Integration</name>
Modified: core/trunk/cache-oscache/pom.xml
===================================================================
--- core/trunk/cache-oscache/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/cache-oscache/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-oscache</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate OSCache Integration</name>
Modified: core/trunk/cache-swarmcache/pom.xml
===================================================================
--- core/trunk/cache-swarmcache/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/cache-swarmcache/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-swarmcache</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate SwarmCache Integration</name>
Modified: core/trunk/connection-c3p0/pom.xml
===================================================================
--- core/trunk/connection-c3p0/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/connection-c3p0/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate C3P0 ConnectionProvider</name>
Modified: core/trunk/connection-proxool/pom.xml
===================================================================
--- core/trunk/connection-proxool/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/connection-proxool/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-proxool</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Proxool ConnectionProvider</name>
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/core/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Core</name>
Modified: core/trunk/documentation/pom.xml
===================================================================
--- core/trunk/documentation/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/documentation/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -1,3 +1,29 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program 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 distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ ~
+ -->
<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/xsd/maven-4.0.0.xsd">
@@ -6,13 +32,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-documentation</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Hibernate Core - Documentation</name>
@@ -20,7 +46,48 @@
<modules>
<module>manual</module>
- <module>tutorial</module>
+ <module>jbosscache2</module>
</modules>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.1.0</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jdocbook-style</artifactId>
+ <version>1.0.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDocumentName>master.xml</sourceDocumentName>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/standard/fopdf.xsl</stylesheetResource>
+ <finalName>hibernate_reference.pdf</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/standard/html.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>false</xincludeSupported>
+ </options>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <masterTranslation>en-US</masterTranslation>
+ </properties>
+
</project>
Modified: core/trunk/jmx/pom.xml
===================================================================
--- core/trunk/jmx/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/jmx/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jmx</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate JMX Module</name>
Modified: core/trunk/testing/pom.xml
===================================================================
--- core/trunk/testing/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/testing/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-testing</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Testing</name>
Modified: core/trunk/testsuite/pom.xml
===================================================================
--- core/trunk/testsuite/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
+++ core/trunk/testsuite/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-testsuite</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Testsuite</name>
Added: core/trunk/tutorials/eg/pom.xml
===================================================================
--- core/trunk/tutorials/eg/pom.xml (rev 0)
+++ core/trunk/tutorials/eg/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,19 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorial-eg</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Hibernate Example</name>
+ <description>A simple example of Hibernate functionality</description>
+
+</project>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionInfo.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionInfo.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionInfo.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,37 @@
+//$Id: AuctionInfo.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+import java.util.Date;
+
+/**
+ * @author Gavin King
+ */
+public class AuctionInfo {
+ private long id;
+ private String description;
+ private Date ends;
+ private Float maxAmount;
+ public String getDescription() {
+ return description;
+ }
+
+ public Date getEnds() {
+ return ends;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public Float getMaxAmount() {
+ return maxAmount;
+ }
+
+ public AuctionInfo(long id, String description, Date ends, Float maxAmount) {
+ this.id = id;
+ this.description = description;
+ this.ends = ends;
+ this.maxAmount = maxAmount;
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <import class="AuctionInfo"/>
+
+ <class name="AuctionItem">
+ <comment>An item that is being auctioned.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <natural-id>
+ <many-to-one name="seller"/>
+ <property name="shortDescription"
+ length="200"/>
+ </natural-id>
+
+ <property name="description"
+ length="1000"/>
+
+ <property name="ends"/>
+
+ <property name="condition" column="`CONDITION`"/>
+
+ <many-to-one name="successfulBid"
+ outer-join="false"/>
+
+ <bag name="bids"
+ inverse="true"
+ cascade="all">
+ <key column="item"/>
+ <one-to-many class="Bid"/>
+ </bag>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/AuctionItem.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,78 @@
+//$Id: AuctionItem.java 7369 2005-07-04 03:18:34Z oneovthafew $
+package org.hibernate.auction;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Gavin King
+ */
+public class AuctionItem extends Persistent {
+ private String description;
+ private String shortDescription;
+ private List bids;
+ private Bid successfulBid;
+ private User seller;
+ private Date ends;
+ private int condition;
+ public List getBids() {
+ return bids;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public User getSeller() {
+ return seller;
+ }
+
+ public Bid getSuccessfulBid() {
+ return successfulBid;
+ }
+
+ public void setBids(List bids) {
+ this.bids = bids;
+ }
+
+ public void setDescription(String string) {
+ description = string;
+ }
+
+ public void setSeller(User user) {
+ seller = user;
+ }
+
+ public void setSuccessfulBid(Bid bid) {
+ successfulBid = bid;
+ }
+
+ public Date getEnds() {
+ return ends;
+ }
+
+ public void setEnds(Date date) {
+ ends = date;
+ }
+
+ public int getCondition() {
+ return condition;
+ }
+
+ public void setCondition(int i) {
+ condition = i;
+ }
+
+ public String toString() {
+ return shortDescription + " (" + description + ": " + condition + "/10)";
+ }
+
+ public String getShortDescription() {
+ return shortDescription;
+ }
+
+ public void setShortDescription(String shortDescription) {
+ this.shortDescription = shortDescription;
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <class name="Bid"
+ discriminator-value="N">
+ <comment>A bid or "buy now" for an item.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <discriminator type="char">
+ <column name="isBuyNow">
+ <comment>Y if a "buy now", N if a regular bid.</comment>
+ </column>
+ </discriminator>
+
+ <natural-id>
+ <many-to-one name="item"/>
+ <property name="amount"/>
+ </natural-id>
+
+ <property name="datetime"
+ not-null="true"
+ column="`datetime`"/>
+
+ <many-to-one name="bidder"
+ not-null="true"/>
+
+ <subclass name="BuyNow"
+ discriminator-value="Y"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Bid.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,55 @@
+//$Id: Bid.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+import java.util.Date;
+
+/**
+ * @author Gavin King
+ */
+public class Bid extends Persistent {
+ private AuctionItem item;
+ private float amount;
+ private Date datetime;
+ private User bidder;
+
+ public AuctionItem getItem() {
+ return item;
+ }
+
+ public void setItem(AuctionItem item) {
+ this.item = item;
+ }
+
+ public float getAmount() {
+ return amount;
+ }
+
+ public Date getDatetime() {
+ return datetime;
+ }
+
+ public void setAmount(float f) {
+ amount = f;
+ }
+
+ public void setDatetime(Date date) {
+ datetime = date;
+ }
+
+ public User getBidder() {
+ return bidder;
+ }
+
+ public void setBidder(User user) {
+ bidder = user;
+ }
+
+ public String toString() {
+ return bidder.getUserName() + " $" + amount;
+ }
+
+ public boolean isBuyNow() {
+ return false;
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/BuyNow.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/BuyNow.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/BuyNow.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,14 @@
+//$Id: BuyNow.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+/**
+ * @author Gavin King
+ */
+public class BuyNow extends Bid {
+ public boolean isBuyNow() {
+ return true;
+ }
+ public String toString() {
+ return super.toString() + " (buy now)";
+ }
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Main.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Main.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Main.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,390 @@
+//$Id: Main.java 7369 2005-07-04 03:18:34Z oneovthafew $
+package org.hibernate.auction;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.FetchMode;
+import org.hibernate.FlushMode;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.criterion.Example;
+import org.hibernate.criterion.Expression;
+import org.hibernate.criterion.MatchMode;
+
+
+/**
+ * Demonstrate some useful features of Hibernate.
+ *
+ * @author Gavin King
+ */
+public class Main {
+
+ private SessionFactory factory;
+
+ /**
+ * Demonstrates HQL projection/aggregation
+ */
+ public void viewAllAuctionsFast() throws Exception {
+ System.out.println("Viewing all auction item info");
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ List auctions = s.createQuery(
+ "select new AuctionInfo( item.id, item.description, item.ends, max(bid.amount) ) "
+ + "from AuctionItem item "
+ + "left join item.bids bid "
+ + "group by item.id, item.description, item.ends "
+ + "order by item.ends desc"
+ )
+ .setMaxResults(100)
+ .list();
+
+ Iterator iter = auctions.iterator();
+ while ( iter.hasNext() ) {
+ AuctionInfo ai = (AuctionInfo) iter.next();
+ System.out.println(
+ "Auction: " + ai.getId() + " - " + ai.getDescription() +
+ ", ends: " + ai.getEnds() +
+ ", highest bid: " + ai.getMaxAmount()
+ );
+ }
+ System.out.println();
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates HQL with runtime fetch strategy
+ */
+ public void viewAllAuctionsSlow() throws Exception {
+ System.out.println("Viewing all auction item objects");
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ s.setFlushMode(FlushMode.NEVER); //entirely optional!!
+ tx = s.beginTransaction();
+
+ List auctions = s.createQuery(
+ "from AuctionItem item "
+ + "left join fetch item.bids bid left join fetch bid.bidder "
+ + "order by item.ends desc"
+ )
+ .setMaxResults(100)
+ .list();
+
+ Iterator iter = new HashSet(auctions).iterator();
+ while ( iter.hasNext() ) {
+ AuctionItem auction = (AuctionItem) iter.next();
+ System.out.println(
+ "Auction: " + auction.getId() + " - " + auction.getDescription() +
+ ", ends: " + auction.getEnds() +
+ ", bids: " + auction.getBids()
+ );
+ }
+ System.out.println();
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates transitive persistence with detached object support
+ */
+ public void bidOnAuction(User bidder, AuctionItem item, float amount) throws Exception {
+ System.out.println("Creating a new bid for auction item: " + item.getId() + " by user: " + bidder.getId() );
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ s.lock(item, LockMode.NONE);
+ s.lock(bidder, LockMode.NONE);
+
+ Bid bid = new Bid();
+ bid.setBidder(bidder);
+ bid.setDatetime( new Date() );
+ bid.setAmount(amount);
+ bid.setItem(item);
+ bidder.getBids().add(bid);
+ item.getBids().add(bid);
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates detached object support
+ */
+ public void changeUserDetails(User user) throws Exception {
+ System.out.println("Changing user details for: " + user.getId() );
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ s.merge(user);
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates automatic dirty checking
+ */
+ public void changeItemDescription(Long itemId, String description) throws Exception {
+ System.out.println("Changing auction item description for: " + itemId );
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ AuctionItem item = (AuctionItem) s.get(AuctionItem.class, itemId);
+ if (item==null) throw new IllegalArgumentException("No item for the given id: " + itemId);
+ item.setDescription(description);
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates query by criteria with runtime fetch strategy
+ */
+ public void viewUserAuctions(Long sellerId) throws Exception {
+ System.out.println("Viewing user and auctions: " + sellerId);
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ List list = s.createCriteria(User.class)
+ .add( Expression.eq("id", sellerId) )
+ .setFetchMode("auctions", FetchMode.JOIN)
+ .list();
+
+ if (list.size()==0) throw new IllegalArgumentException("No user for the given id: " + sellerId);
+ User user = (User) list.get(0);
+ System.out.println(
+ "User: " + user.getId() + " - " + user.getName() +
+ ", email: " + user.getEmail() +
+ ", auctions: " + user.getAuctions()
+ );
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates query by example
+ */
+ public void viewAuctionsByDescription(String description, int condition) throws Exception {
+ String msg = "Viewing auctions containing: " + description;
+ if (condition>0) msg += " with condition: " + condition + "/10";
+
+ AuctionItem item = new AuctionItem();
+ item.setDescription(description);
+ item.setCondition(condition);
+
+ Session s = factory.openSession();
+ Transaction tx=null;
+ try {
+ tx = s.beginTransaction();
+
+ Iterator iter = s.createCriteria(AuctionItem.class)
+ .add( Example.create(item)
+ .enableLike(MatchMode.ANYWHERE)
+ .ignoreCase()
+ .excludeZeroes()
+ )
+ .list()
+ .iterator();
+
+ System.out.println(msg);
+ while ( iter.hasNext() ) {
+ item = (AuctionItem) iter.next();
+ System.out.println("Item: " + item.getId() + " - " + item.getDescription() );
+ }
+ System.out.println();
+
+ tx.commit();
+ }
+ catch (Exception e) {
+ if (tx!=null) tx.rollback();
+ throw e;
+ }
+ finally {
+ s.close();
+ }
+ }
+
+ /**
+ * Demonstrates transitive persistence
+ */
+ public void createTestAuctions() throws Exception {
+ System.out.println("Setting up some test data");
+
+ Session s = factory.openSession();
+ Transaction tx = s.beginTransaction();
+
+ User seller = new User();
+ seller.setUserName("xam");
+ seller.setName( new Name("Max", new Character('R'), "Andersen") );
+ seller.setEmail("max(a)hibernate.org");
+ seller.setPassword("******");
+ seller.setAuctions( new ArrayList() );
+ s.save(seller);
+ User bidder1 = new User();
+ bidder1.setUserName("1E1");
+ bidder1.setName( new Name( "Gavin", new Character('A'), "King") );
+ bidder1.setEmail("gavin(a)hibernate.org");
+ bidder1.setPassword("******");
+ bidder1.setBids( new ArrayList() );
+ s.save(bidder1);
+ User bidder2 = new User();
+ bidder2.setUserName("steve");
+ bidder2.setName( new Name("Steve", null, "Ebersole") );
+ bidder2.setEmail("steve(a)hibernate.org");
+ bidder2.setPassword("******");
+ bidder2.setBids( new ArrayList() );
+ s.save(bidder2);
+
+ for ( int i=0; i<3; i++ ) {
+ AuctionItem item = new AuctionItem();
+ item.setShortDescription("Auction " + i);
+ item.setDescription("the auction item number " + i);
+ item.setEnds( new Date() );
+ item.setBids( new ArrayList() );
+ item.setSeller(seller);
+ item.setCondition(i*3 + 2);
+ for ( int j=0; j<i; j++ ) {
+
+ Bid bid = new Bid();
+ bid.setBidder(bidder1);
+ bid.setAmount(j);
+ bid.setDatetime( new Date() );
+ bid.setItem(item);
+ item.getBids().add(bid);
+ bidder1.getBids().add(bid);
+
+ Bid bid2 = new Bid();
+ bid2.setBidder(bidder2);
+ bid2.setAmount( j + 0.5f);
+ bid2.setDatetime( new Date() );
+ bid2.setItem(item);
+ item.getBids().add(bid2);
+ bidder2.getBids().add(bid2);
+ }
+ seller.getAuctions().add(item);
+ mainItem = item;
+ }
+ mainBidder = bidder2;
+ mainSeller = seller;
+
+ BuyNow buyNow = new BuyNow();
+ buyNow.setAmount(1.2f);
+ buyNow.setDatetime( new Date() );
+ buyNow.setBidder(mainBidder);
+ buyNow.setItem(mainItem);
+ mainBidder.getBids().add(buyNow);
+ mainItem.getBids().add(buyNow);
+
+ tx.commit();
+ s.close();
+ }
+
+ static AuctionItem mainItem;
+ static User mainBidder;
+ static User mainSeller;
+
+ public static void main(String[] args) throws Exception {
+
+ final Main test = new Main();
+
+ Configuration cfg = new Configuration()
+ .addClass(AuctionItem.class)
+ .addClass(Bid.class)
+ .addClass(User.class)
+ .setProperty(Environment.HBM2DDL_AUTO, "create");
+ //cfg.setProperty("hibernate.show_sql", "true");
+
+ test.factory = cfg.buildSessionFactory();
+
+ test.createTestAuctions();
+ test.viewAllAuctionsSlow();
+
+ test.viewAllAuctionsFast();
+ test.bidOnAuction(mainBidder, mainItem, 5.5f);
+ test.viewAllAuctionsFast();
+
+ test.viewUserAuctions( mainSeller.getId() );
+ mainSeller.setEmail("max(a)jboss.org");
+ test.changeUserDetails(mainSeller);
+ test.changeItemDescription(mainItem.getId(), "new description");
+ test.viewUserAuctions( mainSeller.getId() );
+
+ test.viewAuctionsByDescription("It", 0);
+ test.viewAuctionsByDescription("DESC", 3);
+ test.viewAuctionsByDescription("DESC", 8);
+
+ test.factory.close();
+
+ }
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Name.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Name.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Name.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,51 @@
+//$Id: Name.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+/**
+ * @author Gavin King
+ */
+public class Name {
+ private String firstName;
+ private String lastName;
+ private Character initial;
+ private Name() {}
+ public Name(String first, Character middle, String last) {
+ firstName = first;
+ initial = middle;
+ lastName = last;
+ }
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public Character getInitial() {
+ return initial;
+ }
+
+ public void setInitial(Character initial) {
+ this.initial = initial;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String toString() {
+ StringBuffer buf = new StringBuffer()
+ .append(firstName)
+ .append(' ');
+ if (initial!=null) buf.append(initial)
+ .append(' ');
+ return buf.append(lastName)
+ .toString();
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Persistent.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Persistent.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/Persistent.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,17 @@
+//$Id: Persistent.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+/**
+ * @author Gavin King
+ */
+public class Persistent {
+ private Long id;
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long long1) {
+ id = long1;
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <class name="User" table="AuctionUser" lazy="true">
+ <comment>Users may bid for or sell auction items.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <natural-id mutable="true">
+ <property name="userName"
+ length="10"/>
+ </natural-id>
+
+ <property name="password"
+ not-null="true"
+ length="15"
+ column="`password`"/>
+
+ <property name="email"/>
+
+ <component name="name">
+ <property name="firstName"
+ length="50"
+ not-null="true"/>
+ <property name="initial"
+ column="`initial`"/>
+ <property name="lastName"
+ length="50"
+ not-null="true"/>
+ </component>
+
+ <bag name="bids"
+ inverse="true"
+ cascade="save-update,lock">
+ <key column="bidder"/>
+ <one-to-many class="Bid"/>
+ </bag>
+
+ <bag name="auctions"
+ inverse="true"
+ cascade="save-update,lock">
+ <key column="seller"/>
+ <one-to-many class="AuctionItem"/>
+ </bag>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.java
===================================================================
--- core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.java (rev 0)
+++ core/trunk/tutorials/eg/src/main/java/org/hibernate/auction/User.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,69 @@
+//$Id: User.java 3890 2004-06-03 16:31:32Z steveebersole $
+package org.hibernate.auction;
+
+import java.util.List;
+
+/**
+ * @author Gavin King
+ */
+public class User extends Persistent {
+ private String userName;
+ private String password;
+ private String email;
+ private Name name;
+ private List bids;
+ private List auctions;
+
+ public String getEmail() {
+ return email;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setEmail(String string) {
+ email = string;
+ }
+
+ public void setPassword(String string) {
+ password = string;
+ }
+
+ public void setUserName(String string) {
+ userName = string;
+ }
+
+ public List getAuctions() {
+ return auctions;
+ }
+
+ public List getBids() {
+ return bids;
+ }
+
+ public void setAuctions(List list) {
+ auctions = list;
+ }
+
+ public void setBids(List list) {
+ bids = list;
+ }
+
+ public String toString() {
+ return userName;
+ }
+
+ public Name getName() {
+ return name;
+ }
+
+ public void setName(Name name) {
+ this.name = name;
+ }
+
+}
Added: core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/AuctionItem.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/AuctionItem.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/AuctionItem.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <import class="AuctionInfo"/>
+
+ <class name="AuctionItem">
+ <comment>An item that is being auctioned.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <natural-id>
+ <many-to-one name="seller"/>
+ <property name="shortDescription"
+ length="200"/>
+ </natural-id>
+
+ <property name="description"
+ length="1000"/>
+
+ <property name="ends"/>
+
+ <property name="condition" column="`CONDITION`"/>
+
+ <many-to-one name="successfulBid"
+ outer-join="false"/>
+
+ <bag name="bids"
+ inverse="true"
+ cascade="all">
+ <key column="item"/>
+ <one-to-many class="Bid"/>
+ </bag>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/Bid.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/Bid.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/Bid.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <class name="Bid"
+ discriminator-value="N">
+ <comment>A bid or "buy now" for an item.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <discriminator type="char">
+ <column name="isBuyNow">
+ <comment>Y if a "buy now", N if a regular bid.</comment>
+ </column>
+ </discriminator>
+
+ <natural-id>
+ <many-to-one name="item"/>
+ <property name="amount"/>
+ </natural-id>
+
+ <property name="datetime"
+ not-null="true"
+ column="`datetime`"/>
+
+ <many-to-one name="bidder"
+ not-null="true"/>
+
+ <subclass name="BuyNow"
+ discriminator-value="Y"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/User.hbm.xml
===================================================================
--- core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/User.hbm.xml (rev 0)
+++ core/trunk/tutorials/eg/src/main/resources/org/hibernate/auction/User.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping
+ package="org.hibernate.auction">
+
+ <class name="User" table="AuctionUser" lazy="true">
+ <comment>Users may bid for or sell auction items.</comment>
+
+ <id name="id">
+ <generator class="native"/>
+ </id>
+
+ <natural-id mutable="true">
+ <property name="userName"
+ length="10"/>
+ </natural-id>
+
+ <property name="password"
+ not-null="true"
+ length="15"
+ column="`password`"/>
+
+ <property name="email"/>
+
+ <component name="name">
+ <property name="firstName"
+ length="50"
+ not-null="true"/>
+ <property name="initial"
+ column="`initial`"/>
+ <property name="lastName"
+ length="50"
+ not-null="true"/>
+ </component>
+
+ <bag name="bids"
+ inverse="true"
+ cascade="save-update,lock">
+ <key column="bidder"/>
+ <one-to-many class="Bid"/>
+ </bag>
+
+ <bag name="auctions"
+ inverse="true"
+ cascade="save-update,lock">
+ <key column="seller"/>
+ <one-to-many class="AuctionItem"/>
+ </bag>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/pom.xml
===================================================================
--- core/trunk/tutorials/pom.xml (rev 0)
+++ core/trunk/tutorials/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,340 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <packaging>pom</packaging>
+
+ <name>Hibernate Tutorials</name>
+ <description>Series of tutorials demonstrating Hibernate functionality</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <!-- these are optional on core... :( -->
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm-attrs</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <!-- optional dom4j dependency; needed here for dom4j (de)serialization -->
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <!-- the tutorials use HSQLDB -->
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ <!-- logging setup -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>true</filtering>
+ <directory>src/test/resources</directory>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <!-- HSQLDB is the default (eventually move to H2) -->
+ <profile>
+ <id>hsqldb</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.HSQLDialect</db.dialect>
+ <jdbc.driver>org.hsqldb.jdbcDriver</jdbc.driver>
+ <jdbc.url>jdbc:hsqldb:target/test/db/hsqldb/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The H2 test envionment -->
+ <profile>
+ <id>h2</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.h2database</groupId>
+ <artifactId>h2database</artifactId>
+ <version>1.0.20061217</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.H2Dialect</db.dialect>
+ <jdbc.driver>org.h2.Driver</jdbc.driver>
+ <jdbc.url>jdbc:h2:mem:target/test/db/h2/hibernate</jdbc.url>
+ <jdbc.user>sa</jdbc.user>
+ <jdbc.pass />
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Profiles naming db instances in the Red Hat QA/QE lab
+
+ First, those with OSS drivers
+ ###################################################################
+ -->
+
+ <!-- The MySQL5 test envionment -->
+ <profile>
+ <id>mysql5</id>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</db.dialect>
+ <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:mysql://dev02.qa.atl.jboss.com/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The PostgreSQL test envionment -->
+ <profile>
+ <id>pgsql8</id>
+ <dependencies>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504</version>
+ <classifier>jdbc3</classifier>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.PostgreSQLDialect</db.dialect>
+ <jdbc.driver>org.postgresql.Driver</jdbc.driver>
+ <jdbc.url>jdbc:postgresql://dev01.qa.atl.jboss.com:5432:cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!--
+ ###################################################################
+ Then, those with commercial drivers
+ ###################################################################
+ -->
+
+ <!-- The Oracle9i test envionment -->
+ <profile>
+ <id>oracle9i</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle9iDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev20.qa.atl.jboss.com:1521:qa</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Oracle10g test envionment -->
+ <profile>
+ <id>oracle10g</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.oracle</groupId>
+ <artifactId>ojdbc14</artifactId>
+ <!-- use the 10g drivers which are surprisingly largely bug free -->
+ <version>10.0.2.0</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.Oracle10gDialect</db.dialect>
+ <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
+ <jdbc.url>jdbc:oracle:thin:@dev01.qa.atl.jboss.com:1521:qadb01</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The DB2 8.x test envionment (using 9x drivers)-->
+ <profile>
+ <id>db2-8</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm</groupId>
+ <artifactId>db2jcc_license_cu</artifactId>
+ <version>3.1.57</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.DB2Dialect</db.dialect>
+ <jdbc.driver>com.ibm.db2.jcc.DB2Driver</jdbc.driver>
+ <jdbc.url>jdbc:db2://dev32.qa.atl.jboss.com:50000/jbossqa</jdbc.url>
+ <jdbc.user>hiber</jdbc.user>
+ <jdbc.pass>hiber</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The Sybase 12 test envionment -->
+ <profile>
+ <id>sybase12</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.sybase</groupId>
+ <artifactId>jconnect</artifactId>
+ <version>6.0.5</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SybaseDialect</db.dialect>
+ <jdbc.driver>com.sybase.jdbc3.jdbc.SybDriver</jdbc.driver>
+ <jdbc.url>jdbc:sybase:Tds:dev01.qa.atl.jboss.com:4100/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (jTDS) test envionment -->
+ <profile>
+ <id>sqlserver-jtds</id>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>net.sourceforge.jtds.jdbc.Driver</jdbc.driver>
+ <jdbc.url>jdbc:jtds:sqlserver://dev30.qa.atl.jboss.com:3918/cruisecontrol</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation />
+ </properties>
+ </profile>
+
+ <!-- The SQLServer2005 (MS JDBC) test envionment -->
+ <profile>
+ <id>sqlserver-msjdbc</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>msjdbc</artifactId>
+ <version>1.1</version>
+ </dependency>
+ </dependencies>
+ <properties>
+ <db.dialect>org.hibernate.dialect.SQLServerDialect</db.dialect>
+ <jdbc.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbc.driver>
+ <jdbc.url>jdbc:sqlserver://dev30.qa.atl.jboss.com:3918</jdbc.url>
+ <jdbc.user>cruisecontrol</jdbc.user>
+ <jdbc.pass>cruisecontrol</jdbc.pass>
+ <jdbc.isolation>4096</jdbc.isolation>
+ </properties>
+ </profile>
+
+ </profiles>
+</project>
\ No newline at end of file
Added: core/trunk/tutorials/web/pom.xml
===================================================================
--- core/trunk/tutorials/web/pom.xml (rev 0)
+++ core/trunk/tutorials/web/pom.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,29 @@
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorials</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tutorial-web</artifactId>
+ <packaging>war</packaging>
+
+ <name>Hibernate Tutorial</name>
+ <description>A tutorial project showcasing Hibernate usage</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.3</version>
+ </dependency>
+ </dependencies>
+
+</project>
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Event.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Event.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Event.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,48 @@
+package org.hibernate.tutorial.domain;
+
+import java.util.*;
+
+public class Event {
+ private Long id;
+
+ private String title;
+ private Date date;
+
+ public Event() {}
+
+ public Long getId() {
+ return id;
+ }
+
+ private void setId(Long id) {
+ this.id = id;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+
+ private Set participants = new HashSet();
+
+ public Set getParticipants() {
+ return participants;
+ }
+
+ public void setParticipants(Set participants) {
+ this.participants = participants;
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Person.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Person.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/domain/Person.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,80 @@
+package org.hibernate.tutorial.domain;
+
+import java.util.*;
+
+public class Person {
+
+ private Long id;
+ private int age;
+ private String firstname;
+ private String lastname;
+
+ public Person() {}
+
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public String getFirstname() {
+ return firstname;
+ }
+
+ public void setFirstname(String firstname) {
+ this.firstname = firstname;
+ }
+
+ public String getLastname() {
+ return lastname;
+ }
+
+ public void setLastname(String lastname) {
+ this.lastname = lastname;
+ }
+
+
+ private Set emailAddresses = new HashSet();
+
+ public Set getEmailAddresses() {
+ return emailAddresses;
+ }
+
+ public void setEmailAddresses(Set emailAddresses) {
+ this.emailAddresses = emailAddresses;
+ }
+
+
+ private Set events = new HashSet();
+
+ // Defensive, convenience methods
+ protected Set getEvents() {
+ return events;
+ }
+
+ protected void setEvents(Set events) {
+ this.events = events;
+ }
+
+ public void addToEvent(Event event) {
+ this.getEvents().add(event);
+ event.getParticipants().add(this);
+ }
+
+ public void removeFromEvent(Event event) {
+ this.getEvents().remove(event);
+ event.getParticipants().remove(this);
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/util/HibernateUtil.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/util/HibernateUtil.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/util/HibernateUtil.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,25 @@
+package org.hibernate.tutorial.util;
+
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+
+public class HibernateUtil {
+
+ private static final SessionFactory sessionFactory;
+
+ static {
+ try {
+ // Create the SessionFactory from hibernate.cfg.xml
+ sessionFactory = new Configuration().configure().buildSessionFactory();
+ } catch (Throwable ex) {
+ // Make sure you log the exception, as it might be swallowed
+ System.err.println("Initial SessionFactory creation failed." + ex);
+ throw new ExceptionInInitializerError(ex);
+ }
+ }
+
+ public static SessionFactory getSessionFactory() {
+ return sessionFactory;
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManager.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManager.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManager.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,138 @@
+package org.hibernate.tutorial.web;
+
+import java.util.Date;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.hibernate.tutorial.domain.Event;
+import org.hibernate.tutorial.domain.Person;
+import org.hibernate.tutorial.util.HibernateUtil;
+
+public class EventManager {
+
+ public static void main(String[] args) {
+ EventManager mgr = new EventManager();
+
+ if (args[0].equals("store")) {
+ mgr.createAndStoreEvent("My Event", new Date());
+ }
+ else if (args[0].equals("list")) {
+ List events = mgr.listEvents();
+ for (int i = 0; i < events.size(); i++) {
+ Event theEvent = (Event) events.get(i);
+ System.out.println("Event: " + theEvent.getTitle() +
+ " Time: " + theEvent.getDate());
+ }
+ }
+ else if (args[0].equals("addpersontoevent")) {
+ Long eventId = mgr.createAndStoreEvent("My Event", new Date());
+ Long personId = mgr.createAndStorePerson("Foo", "Bar");
+ mgr.addPersonToEvent(personId, eventId);
+ System.out.println("Added person " + personId + " to event " + eventId);
+ }
+ else if (args[0].equals("addemailtoperson")) {
+ Long personId = mgr.createAndStorePerson("Foozy", "Beary");
+ mgr.addEmailToPerson(personId, "foo@bar");
+ mgr.addEmailToPerson(personId, "bar@foo");
+ System.out.println("Added two email addresses (value typed objects) to person entity : " + personId);
+ }
+
+ HibernateUtil.getSessionFactory().close();
+ }
+
+ private Long createAndStoreEvent(String title, Date theDate) {
+
+ Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+ session.beginTransaction();
+
+ Event theEvent = new Event();
+ theEvent.setTitle(title);
+ theEvent.setDate(theDate);
+
+ session.save(theEvent);
+
+ session.getTransaction().commit();
+
+ return theEvent.getId();
+ }
+
+ private Long createAndStorePerson(String firstname, String lastname) {
+
+ Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+ session.beginTransaction();
+
+ Person thePerson = new Person();
+ thePerson.setFirstname(firstname);
+ thePerson.setLastname(lastname);
+
+ session.save(thePerson);
+
+ session.getTransaction().commit();
+
+ return thePerson.getId();
+ }
+
+
+ private List listEvents() {
+
+ Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+ session.beginTransaction();
+
+ List result = session.createQuery("from Event").list();
+
+ session.getTransaction().commit();
+
+ return result;
+ }
+
+ private void addPersonToEvent(Long personId, Long eventId) {
+
+ Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+ session.beginTransaction();
+
+ Person aPerson = (Person) session
+ .createQuery("select p from Person p left join fetch p.events where p.id = :pid")
+ .setParameter("pid", personId)
+ .uniqueResult(); // Eager fetch the collection so we can use it detached
+
+ Event anEvent = (Event) session.load(Event.class, eventId);
+ // If we want to handle it bidirectional and detached, we also need to load this
+ // collection with an eager outer-join fetch, this time with Criteria and not HQL:
+ /*
+ Event anEvent = (Event) session
+ .createCriteria(Event.class).setFetchMode("participants", FetchMode.JOIN)
+ .add( Expression.eq("id", eventId) )
+ .uniqueResult(); // Eager fetch the colleciton so we can use it detached
+ */
+
+ session.getTransaction().commit();
+
+ // End of first unit of work
+
+ aPerson.addToEvent( anEvent );
+ // or bidirectional safety method, setting both sides: aPerson.addToEvent(anEvent);
+
+ // Begin second unit of work
+
+ Session session2 = HibernateUtil.getSessionFactory().getCurrentSession();
+ session2.beginTransaction();
+
+ session2.update(aPerson); // Reattachment of aPerson
+
+ session2.getTransaction().commit();
+ }
+
+ private void addEmailToPerson(Long personId, String emailAddress) {
+
+ Session session = HibernateUtil.getSessionFactory().getCurrentSession();
+ session.beginTransaction();
+
+ Person aPerson = ( Person ) session.load(Person.class, personId);
+
+ // The getEmailAddresses() might trigger a lazy load of the collection
+ aPerson.getEmailAddresses().add(emailAddress);
+
+ session.getTransaction().commit();
+ }
+
+}
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/EventManagerServlet.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,106 @@
+package org.hibernate.tutorial.web;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.hibernate.tutorial.domain.Event;
+import org.hibernate.tutorial.util.HibernateUtil;
+
+public class EventManagerServlet extends HttpServlet {
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ SimpleDateFormat dateFormatter = new SimpleDateFormat("dd.MM.yyyy");
+
+ try {
+ // Begin unit of work
+ HibernateUtil.getSessionFactory()
+ .getCurrentSession().beginTransaction();
+
+ // Write HTML header
+ PrintWriter out = response.getWriter();
+ out.println("<html><head><title>Event Manager</title></head><body>");
+
+ // Handle actions
+ if ( "store".equals(request.getParameter("action")) ) {
+
+ String eventTitle = request.getParameter("eventTitle");
+ String eventDate = request.getParameter("eventDate");
+
+ if ( "".equals(eventTitle) || "".equals(eventDate) ) {
+ out.println("<b><i>Please enter event title and date.</i></b>");
+ } else {
+ createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));
+ out.println("<b><i>Added event.</i></b>");
+ }
+ }
+
+ // Print page
+ printEventForm(out);
+ listEvents(out, dateFormatter);
+
+ // Write HTML footer
+ out.println("</body></html>");
+ out.flush();
+ out.close();
+
+ // End unit of work
+ HibernateUtil.getSessionFactory()
+ .getCurrentSession().getTransaction().commit();
+
+ } catch (Exception ex) {
+ HibernateUtil.getSessionFactory()
+ .getCurrentSession().getTransaction().rollback();
+ throw new ServletException(ex);
+ }
+ }
+
+ private void printEventForm(PrintWriter out) {
+ out.println("<h2>Add new event:</h2>");
+ out.println("<form>");
+ out.println("Title: <input name='eventTitle' length='50'/><br/>");
+ out.println("Date (e.g. 24.12.2009): <input name='eventDate' length='10'/><br/>");
+ out.println("<input type='submit' name='action' value='store'/>");
+ out.println("</form>");
+ }
+
+ private void listEvents(PrintWriter out, SimpleDateFormat dateFormatter) {
+ List result = HibernateUtil.getSessionFactory()
+ .getCurrentSession().createCriteria(Event.class).list();
+ if (result.size() > 0) {
+ out.println("<h2>Events in database:</h2>");
+ out.println("<table border='1'>");
+ out.println("<tr>");
+ out.println("<th>Event title</th>");
+ out.println("<th>Event date</th>");
+ out.println("</tr>");
+ for (Iterator it = result.iterator(); it.hasNext();) {
+ Event event = (Event) it.next();
+ out.println("<tr>");
+ out.println("<td>" + event.getTitle() + "</td>");
+ out.println("<td>" + dateFormatter.format(event.getDate()) + "</td>");
+ out.println("</tr>");
+ }
+ out.println("</table>");
+ }
+ }
+
+ protected void createAndStoreEvent(String title, Date theDate) {
+ Event theEvent = new Event();
+ theEvent.setTitle(title);
+ theEvent.setDate(theDate);
+
+ HibernateUtil.getSessionFactory()
+ .getCurrentSession().save(theEvent);
+ }
+
+}
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionFactoryInitializer.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionFactoryInitializer.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionFactoryInitializer.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,24 @@
+package org.hibernate.tutorial.web;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.hibernate.tutorial.util.HibernateUtil;
+
+/**
+ * Demonstrates good practice of making sure the SessionFactory is initialized
+ * on application startup, rather than on first request. Here we register
+ * as a listener to the servlet context lifecycle for building/closing of the
+ * SessionFactory.
+ *
+ * @author Steve Ebersole
+ */
+public class SessionFactoryInitializer implements ServletContextListener {
+ public void contextInitialized(ServletContextEvent event) {
+ HibernateUtil.getSessionFactory();
+ }
+
+ public void contextDestroyed(ServletContextEvent event) {
+ HibernateUtil.getSessionFactory().close();
+ }
+}
Added: core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java
===================================================================
--- core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java (rev 0)
+++ core/trunk/tutorials/web/src/main/java/org/hibernate/tutorial/web/SessionInterceptor.java 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,62 @@
+package org.hibernate.tutorial.web;
+
+import java.io.IOException;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.hibernate.classic.Session;
+import org.hibernate.context.ManagedSessionContext;
+import org.hibernate.tutorial.util.HibernateUtil;
+
+/**
+ * Illustrates a servlet filter used to apply a Hibernate session
+ * to the "context" of the web request.
+ *
+ * @author Steve Ebersole
+ */
+public class SessionInterceptor implements Filter {
+
+ private static final Logger log = LoggerFactory.getLogger( SessionInterceptor.class );
+
+ public void doFilter(
+ ServletRequest request,
+ ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+ log.trace( "===> opening session for request [" + request.hashCode() + "]" );
+ // Start the session to be used for this request
+ Session session = HibernateUtil.getSessionFactory().openSession();
+
+ try {
+ // make the session available to the session factory's "current context"
+ ManagedSessionContext.bind( session );
+
+ // pass control along to the rest of the processing chain
+ chain.doFilter( request, response );
+ }
+ finally {
+ log.trace( "===> cleaning-up session for request [" + request.hashCode() + "]" );
+ // remove session from "current context"
+ ManagedSessionContext.unbind( HibernateUtil.getSessionFactory() );
+
+ try {
+ session.close();
+ }
+ catch( Throwable t ) {
+ log.warn( "was unable to properly close session for request [" + request.hashCode() + "]" );
+ }
+ }
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ }
+
+ public void destroy() {
+ }
+}
Added: core/trunk/tutorials/web/src/main/resources/hibernate.cfg.xml
===================================================================
--- core/trunk/tutorials/web/src/main/resources/hibernate.cfg.xml (rev 0)
+++ core/trunk/tutorials/web/src/main/resources/hibernate.cfg.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,40 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+
+ <session-factory>
+
+ <!-- Database connection settings -->
+ <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
+ <property name="connection.username">sa</property>
+ <property name="connection.password"></property>
+
+ <!-- JDBC connection pool (use the built-in) -->
+ <property name="connection.pool_size">2</property>
+
+ <!-- SQL dialect -->
+ <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
+
+ <!-- Enable Hibernate's current session context -->
+ <property name="current_session_context_class">org.hibernate.context.ManagedSessionContext</property>
+
+ <!-- Disable the second-level cache -->
+ <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
+
+ <!-- Echo all executed SQL to stdout -->
+ <property name="show_sql">true</property>
+
+ <!-- Drop and re-create the database schema on startup -->
+ <property name="hbm2ddl.auto">create</property>
+
+ <mapping resource="org/hibernate/tutorial/domain/Event.hbm.xml"/>
+ <mapping resource="org/hibernate/tutorial/domain/Person.hbm.xml"/>
+
+ </session-factory>
+
+</hibernate-configuration>
+
Added: core/trunk/tutorials/web/src/main/resources/log4j.properties
===================================================================
--- core/trunk/tutorials/web/src/main/resources/log4j.properties (rev 0)
+++ core/trunk/tutorials/web/src/main/resources/log4j.properties 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,41 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+
+log4j.rootLogger=warn, stdout
+
+log4j.logger.org.hibernate=info
+#log4j.logger.org.hibernate=debug
+
+### log HQL query parser activity
+#log4j.logger.org.hibernate.hql.ast.AST=debug
+
+### log just the SQL
+#log4j.logger.org.hibernate.SQL=debug
+
+### log JDBC bind parameters ###
+log4j.logger.org.hibernate.type=info
+#log4j.logger.org.hibernate.type=debug
+
+### log schema export/update ###
+log4j.logger.org.hibernate.tool.hbm2ddl=debug
+
+### log HQL parse trees
+#log4j.logger.org.hibernate.hql=debug
+
+### log cache activity ###
+#log4j.logger.org.hibernate.cache=debug
+
+### log transaction activity
+#log4j.logger.org.hibernate.transaction=debug
+
+### log JDBC resource acquisition
+#log4j.logger.org.hibernate.jdbc=debug
+
+### enable the following line if you want to track down connection ###
+### leakages when using DriverManagerConnectionProvider ###
+#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
Added: core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml
===================================================================
--- core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml (rev 0)
+++ core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Event.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.tutorial.domain">
+
+ <class name="Event" table="EVENTS">
+ <id name="id" column="EVENT_ID">
+ <generator class="native"/>
+ </id>
+ <property name="date" type="timestamp" column="EVENT_DATE"/>
+ <property name="title"/>
+
+ <set name="participants" table="PERSON_EVENT" inverse="true">
+ <key column="EVENT_ID"/>
+ <many-to-many column="PERSON_ID" class="Person"/>
+ </set>
+
+ </class>
+
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml
===================================================================
--- core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml (rev 0)
+++ core/trunk/tutorials/web/src/main/resources/org/hibernate/tutorial/domain/Person.hbm.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.hibernate.tutorial.domain">
+
+ <class name="Person" table="PERSON">
+ <id name="id" column="PERSON_ID">
+ <generator class="native"/>
+ </id>
+ <property name="age"/>
+ <property name="firstname"/>
+ <property name="lastname"/>
+
+ <set name="events" table="PERSON_EVENT">
+ <key column="PERSON_ID"/>
+ <many-to-many column="EVENT_ID" class="Event"/>
+ </set>
+
+ <set name="emailAddresses" table="PERSON_EMAIL_ADDR">
+ <key column="PERSON_ID"/>
+ <element type="string" column="EMAIL_ADDR"/>
+ </set>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/tutorials/web/src/main/scripts/runCleanDatabase.sh
===================================================================
--- core/trunk/tutorials/web/src/main/scripts/runCleanDatabase.sh (rev 0)
+++ core/trunk/tutorials/web/src/main/scripts/runCleanDatabase.sh 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,13 @@
+# Delete database and recreate/start it
+if test ! -d data
+then
+ mkdir data
+fi
+if test -d data
+then
+ echo Removing database files...
+ rm -r data/test.*
+fi
+echo Starting database engine...
+cd data/
+java -classpath ../lib/hsqldb.jar org.hsqldb.Server
Added: core/trunk/tutorials/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- core/trunk/tutorials/web/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ core/trunk/tutorials/web/src/main/webapp/WEB-INF/web.xml 2008-04-16 14:08:07 UTC (rev 14515)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <listener>
+ <listener-class>org.hibernate.tutorial.web.SessionFactoryInitializer</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>Event Manager</servlet-name>
+ <servlet-class>org.hibernate.tutorial.web.EventManagerServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Event Manager</servlet-name>
+ <url-pattern>/eventmanager</url-pattern>
+ </servlet-mapping>
+
+ <filter>
+ <filter-name>Session Interceptor</filter-name>
+ <filter-class>org.hibernate.tutorial.web.SessionInterceptor</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Session Interceptor</filter-name>
+ <servlet-name>Event Manager</servlet-name>
+ </filter-mapping>
+
+</web-app>
16 years
Hibernate SVN: r14514 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:06:26 -0400 (Wed, 16 Apr 2008)
New Revision: 14514
Modified:
core/trunk/pom.xml
Log:
trying new layout
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-16 14:05:35 UTC (rev 14513)
+++ core/trunk/pom.xml 2008-04-16 14:06:26 UTC (rev 14514)
@@ -1,12 +1,32 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Hibernate, Relational Persistence for Idiomatic Java
+ ~
+ ~ Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ ~ indicated by the @author tags or express copyright attribution
+ ~ statements applied by the authors. All third-party contributions are
+ ~ distributed under license by Red Hat Middleware LLC.
+ ~
+ ~ This copyrighted material is made available to anyone wishing to use, modify,
+ ~ copy, or redistribute it subject to the terms and conditions of the GNU
+ ~ Lesser General Public License, as published by the Free Software Foundation.
+ ~
+ ~ This program 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 distribution; if not, write to:
+ ~ Free Software Foundation, Inc.
+ ~ 51 Franklin Street, Fifth Floor
+ ~ Boston, MA 02110-1301 USA
+ ~
+ -->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
- </parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
@@ -15,13 +35,72 @@
<name>Hibernate Core Aggregator</name>
<description>Aggregator of the Hibernate Core modules.</description>
- <url>http://hibernate.org</url>
+ <url>http://hibernate.org</url>
+
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>GNU Lesser General Public License</name>
+ <url>http://www.gnu.org/copyleft/lesser.html</url>
+ <comments>See discussion at http://hibernate.org/356.html for more details.</comments>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/core/trunk</developerConnection>
<url>https://svn.jboss.org/repos/hibernate/core/trunk</url>
- </scm>
+ </scm>
+
+ <ciManagement>
+ <system>hudson</system>
+ <url>http://hudson.jboss.org/hudson/job/hibernate-testsuite/</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <address>hibernate-dev(a)lists.jboss.org</address>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
+ <mailingLists>
+ <mailingList>
+ <name>Hibernate Announcements</name>
+ <post>hibernate-announce(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Commit Notificatons</name>
+ <post>hibernate-commits(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-commits/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Developers</name>
+ <post>hibernate-dev(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ <otherArchives>
+ <otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.org/index.html</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Issue Notifications</name>
+ <post>hibernate-issues(a)lists.jboss.org</post>
+ <subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</subscribe>
+ <unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues</unsubscribe>
+ <archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive>
+ </mailingList>
+ </mailingLists>
<modules>
<module>core</module>
@@ -35,7 +114,7 @@
<module>jmx</module>
<module>testing</module>
<module>testsuite</module>
- <module>eg</module>
+ <module>tutorials</module>
<!-- Need to scope bytecode providers first
<module>bytecode-cglib</module>
<module>bytecode-javassist</module>
@@ -43,7 +122,62 @@
</modules>
<build>
- <plugins>
+ <plugins>
+ <plugin>
+ <!-- require at least JDK 1.5 to run the build -->
+ <!-- ... -->
+ <!-- we need at least Maven 2.0.8 because of a bug fix affecting our antlr usage -->
+ <!-- 2.0.8 not released at this time, so I instead say anything greater that 2.0.7 -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-alpha-3</version>
+ <executions>
+ <execution>
+ <id>enforce-java</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ <requireMavenVersion>
+ <version>(2.0.7,)</version>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- by default, compile to JDK 1.4 compatibility (individual modules and/or user can override) -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <!-- add specification/implementation details to the manifests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${pom.url}</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
@@ -60,6 +194,7 @@
</execution>
</executions>
</plugin>
+-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -71,8 +206,83 @@
</descriptors>
</configuration>
</plugin>
- </plugins>
- </build>
+ </plugins>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <links>
+ <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
+ <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <linkXref>true</linkXref>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.4</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <aggregate>${hibernate.core.reports.aggregate}</aggregate>
+ <tags>
+ <tag>@FIXME</tag>
+ <tag>@fixme</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>@TODO</tag>
+ <tag>@todo</tag>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ </tags>
+ </configuration>
+ </plugin>
+ <plugin>
+ <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javancss-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>1.1.1</version>
+ <configuration>
+ <onlyAnalyze>org.hibernate.*</onlyAnalyze>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
<profiles>
<profile>
@@ -94,4 +304,67 @@
</modules>
</profile>
</profiles>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+
+ <properties>
+ <hibernate.core.reports.aggregate>false</hibernate.core.reports.aggregate>
+ </properties>
+
</project>
\ No newline at end of file
16 years
Hibernate SVN: r14513 - core/trunk/cache-ehcache.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-16 10:05:35 -0400 (Wed, 16 Apr 2008)
New Revision: 14513
Modified:
core/trunk/cache-ehcache/pom.xml
Log:
trying new layout
Modified: core/trunk/cache-ehcache/pom.xml
===================================================================
--- core/trunk/cache-ehcache/pom.xml 2008-04-15 01:29:20 UTC (rev 14512)
+++ core/trunk/cache-ehcache/pom.xml 2008-04-16 14:05:35 UTC (rev 14513)
@@ -4,13 +4,13 @@
<parent>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-core-parent</artifactId>
- <version>3</version>
+ <artifactId>hibernate</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
- <version>3.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Hibernate Ehcache Integration</name>
16 years
Hibernate SVN: r14512 - core/branches/Branch_3_2/doc/reference/en/modules.
by hibernate-commits@lists.jboss.org
Author: bsatguna
Date: 2008-04-14 21:29:20 -0400 (Mon, 14 Apr 2008)
New Revision: 14512
Modified:
core/branches/Branch_3_2/doc/reference/en/modules/filters.xml
Log:
nomsg
Modified: core/branches/Branch_3_2/doc/reference/en/modules/filters.xml
===================================================================
--- core/branches/Branch_3_2/doc/reference/en/modules/filters.xml 2008-04-14 18:24:01 UTC (rev 14511)
+++ core/branches/Branch_3_2/doc/reference/en/modules/filters.xml 2008-04-15 01:29:20 UTC (rev 14512)
@@ -55,7 +55,7 @@
The methods on <literal>Session</literal> are: <literal>enableFilter(String filterName)</literal>,
<literal>getEnabledFilter(String filterName)</literal>, and <literal>disableFilter(String filterName)</literal>.
By default, filters are <emphasis>not</emphasis> enabled for a given session; they must be explcitly
- enabled through use of the <literal>Session.enabledFilter()</literal> method, which returns an
+ enabled through use of the <literal>Session.enableFilter()</literal> method, which returns an
instance of the <literal>Filter</literal> interface. Using the simple filter defined above, this
would look like:
</para>
16 years
Hibernate SVN: r14511 - search/trunk/src/test/org/hibernate/search/test/configuration.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2008-04-14 14:24:01 -0400 (Mon, 14 Apr 2008)
New Revision: 14511
Modified:
search/trunk/src/test/org/hibernate/search/test/configuration/ConfigurationReadTestCase.java
Log:
HSEARCH-176 clean up tests
Modified: search/trunk/src/test/org/hibernate/search/test/configuration/ConfigurationReadTestCase.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/configuration/ConfigurationReadTestCase.java 2008-04-12 04:20:43 UTC (rev 14510)
+++ search/trunk/src/test/org/hibernate/search/test/configuration/ConfigurationReadTestCase.java 2008-04-14 18:24:01 UTC (rev 14511)
@@ -1,5 +1,7 @@
package org.hibernate.search.test.configuration;
+import java.io.File;
+
import org.hibernate.search.FullTextSession;
import org.hibernate.search.Search;
import org.hibernate.search.backend.configuration.IndexWriterSetting;
@@ -14,6 +16,8 @@
* @author Sanne Grinovero
*/
public abstract class ConfigurationReadTestCase extends SearchTestCase {
+
+ private static final File INDEX_DIR = new File( new File("."), "indextemp" );
private SearchFactoryImplementor searchFactory;
@@ -27,6 +31,8 @@
FullTextSession fullTextSession = Search.createFullTextSession( openSession() );
searchFactory = (SearchFactoryImpl) fullTextSession.getSearchFactory();
fullTextSession.close();
+ remove(INDEX_DIR);
+ INDEX_DIR.mkdirs();
}
protected final void assertValueIsDefault(Class testEntity, TransactionType parmGroup, IndexWriterSetting setting) {
@@ -69,5 +75,27 @@
.getTransactionIndexParameters().getCurrentValueFor( setting );
}
}
+
+ protected void configure(org.hibernate.cfg.Configuration cfg) {
+ super.configure( cfg );
+ cfg.setProperty( "hibernate.search.default.indexBase", INDEX_DIR.getAbsolutePath() );
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ remove(INDEX_DIR);
+ }
+
+ private void remove(File indexDir) {
+ if (indexDir.exists()) {
+ File[] containing = indexDir.listFiles();
+ if ( containing != null ) { //is a directory
+ for (int i=0; i<containing.length; i++ ){
+ remove(containing[i]);
+ }
+ }
+ indexDir.delete();
+ }
+ }
}
16 years
Hibernate SVN: r14510 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-12 00:20:43 -0400 (Sat, 12 Apr 2008)
New Revision: 14510
Modified:
core/trunk/pom.xml
Log:
[maven-release-plugin] rollback the release of hibernate-3.3.0
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-12 04:18:21 UTC (rev 14509)
+++ core/trunk/pom.xml 2008-04-12 04:20:43 UTC (rev 14510)
@@ -48,10 +48,17 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <goals>install,site,assembly:single</goals>
- </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>perform</goal>
+ </goals>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <goals>install,site,assembly:single</goals>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
16 years
Hibernate SVN: r14509 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2008-04-12 00:18:21 -0400 (Sat, 12 Apr 2008)
New Revision: 14509
Modified:
core/trunk/pom.xml
Log:
that was not good
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2008-04-12 04:11:21 UTC (rev 14508)
+++ core/trunk/pom.xml 2008-04-12 04:18:21 UTC (rev 14509)
@@ -48,17 +48,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
- <executions>
- <execution>
- <goals>
- <goal>perform</goal>
- </goals>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <goals>install,site,assembly:single</goals>
- </configuration>
- </execution>
- </executions>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <goals>install,site,assembly:single</goals>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
16 years