Hibernate SVN: r19519 - validator/trunk/hibernate-validator/src/main/docbook/en-US/modules.
by hibernate-commits@lists.jboss.org
Author: gunnar.morling
Date: 2010-05-15 08:12:01 -0400 (Sat, 15 May 2010)
New Revision: 19519
Modified:
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
Log:
HV-298: Removed whitespaces
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-15 08:37:30 UTC (rev 19518)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-15 12:12:01 UTC (rev 19519)
@@ -57,7 +57,7 @@
Some <link linkend="section-known-issues">known issues</link> can be found
at the end of this chapter. In case any problems arise when using the
processor feel free to ask for help at the <ulink
- url="https://forum.hibernate.org/viewforum.php?f=9">forum </ulink>or
+ url="https://forum.hibernate.org/viewforum.php?f=9">forum</ulink> or
create an issue within<ulink
url="http://opensource.atlassian.com/projects/hibernate/browse/HV/component/10356">
JIRA</ulink>.</para>
@@ -113,7 +113,7 @@
<para>The behavior of the Hibernate Validator Annotation Processor can be
controlled using the <ulink
url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
- options </ulink> listed in table<xref
+ options</ulink> listed in table<xref
linkend="table_processor_options" />:</para>
<table id="table_processor_options">
@@ -200,8 +200,8 @@
<para>Similar to directly working with javac, the annotation processor
can be added as as compiler argument when invoking the <ulink
- url="http://ant.apache.org/manual/CoreTasks/javac.html">javac task
- </ulink> for <ulink url="http://ant.apache.org/">Apache
+ url="http://ant.apache.org/manual/CoreTasks/javac.html">javac
+ task</ulink> for <ulink url="http://ant.apache.org/">Apache
Ant</ulink>:</para>
<example>
@@ -368,7 +368,7 @@
<para>The following steps must be followed to use the annotation
processor within <ulink url="http://www.jetbrains.com/idea/">IntelliJ
- IDEA </ulink> (version 9 and above):</para>
+ IDEA</ulink> (version 9 and above):</para>
<itemizedlist>
<listitem>
@@ -413,7 +413,7 @@
<title>NetBeans</title>
<para>Starting with version 6.9, also the <ulink
- url="http://www.netbeans.org/">NetBeans </ulink> IDE supports using
+ url="http://www.netbeans.org/">NetBeans</ulink> IDE supports using
annotation processors within the IDE build. To do so, do the
following:</para>
@@ -468,17 +468,17 @@
<para><ulink
url="http://opensource.atlassian.com/projects/hibernate/browse/HV-308">HV-308</ulink>:
Additional validators registered for a constraint <ulink
- url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single...">
- using XML </ulink> are not evaluated by the annotation
- processor.</para>
+ url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single...">using
+ XML</ulink> are not evaluated by the annotation processor.</para>
</listitem>
<listitem>
<para>Sometimes custom constraints can't be <ulink
url="http://opensource.atlassian.com/projects/hibernate/browse/HV-293">properly
- evaluated </ulink> when using the processor within Eclipse. This seems
- to be an issue with the Eclipse JSR 269 API implementation, but
- further investigation is required here.</para>
+ evaluated</ulink> when using the processor within Eclipse. Cleaning
+ the project can help in these situations. This seems to be an issue
+ with the Eclipse JSR 269 API implementation, but further investigation
+ is required here.</para>
</listitem>
</itemizedlist>
</section>
14 years, 8 months
Hibernate SVN: r19518 - in core/trunk: core/src/main/java/org/hibernate/impl and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-15 04:37:30 -0400 (Sat, 15 May 2010)
New Revision: 19518
Added:
core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
Modified:
core/trunk/core/src/main/java/org/hibernate/engine/PersistenceContext.java
core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
Log:
HHH-3220 Patch to prevent org.hibernate.AssertionFailure: possible non-threadsafe access to the session error caused by stateless sessions
Modified: core/trunk/core/src/main/java/org/hibernate/engine/PersistenceContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:48:04 UTC (rev 19517)
+++ core/trunk/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -445,8 +445,12 @@
* Call this after finishing a two-phase load
*/
public void afterLoad();
-
+
/**
+ * Is in a two-phase load?
+ */
+ public boolean isLoadFinished();
+ /**
* Returns a string representation of the object.
*
* @return a string representation of the object.
Modified: core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-15 07:48:04 UTC (rev 19517)
+++ core/trunk/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -1095,6 +1095,9 @@
loadCounter--;
}
+ public boolean isLoadFinished() {
+ return loadCounter == 0;
+ }
/**
* Returns a string representation of the object.
*
Modified: core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-15 07:48:04 UTC (rev 19517)
+++ core/trunk/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -179,7 +179,9 @@
errorIfClosed();
Object result = getFactory().getEntityPersister(entityName)
.load(id, null, lockMode, this);
- temporaryPersistenceContext.clear();
+ if ( temporaryPersistenceContext.isLoadFinished() ) {
+ temporaryPersistenceContext.clear();
+ }
return result;
}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml 2010-05-15 08:37:30 UTC (rev 19518)
@@ -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.test.stateless">
+
+ <class name="Contact">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="org" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Org">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="country" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Country">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -0,0 +1,47 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+/**
+ *
+ * @author stliu
+ */
+public class Contact {
+ private Integer id;
+ public Integer getId() {
+ return id;
+ }
+ public void setId( Integer id ) {
+ this.id = id;
+ }
+ public Org getOrg() {
+ return org;
+ }
+ public void setOrg( Org org ) {
+ this.org = org;
+ }
+ private Org org;
+
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Country.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Country.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -0,0 +1,13 @@
+package org.hibernate.test.stateless;
+
+public class Country {
+ private Integer id;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Org.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/Org.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -0,0 +1,23 @@
+package org.hibernate.test.stateless;
+
+public class Org {
+ private Integer id;
+ private Country country;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
+
+}
Added: core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
===================================================================
--- core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java (rev 0)
+++ core/trunk/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java 2010-05-15 08:37:30 UTC (rev 19518)
@@ -0,0 +1,117 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.FetchMode;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author stliu
+ */
+public class StatelessSessionQueryTest extends FunctionalTestCase {
+
+ public StatelessSessionQueryTest( String string ) {
+ super( string );
+ }
+
+ public void testCriteria() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testCriteriaWithSelectFetchMode() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).setFetchMode( "org", FetchMode.SELECT )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testHQL() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createQuery( "from Contact c join fetch c.org join fetch c.org.country" )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+ private class TestData{
+ List list = new ArrayList();
+ public void createData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ Country usa = new Country();
+ session.save( usa );
+ list.add( usa );
+ Org disney = new Org();
+ disney.setCountry( usa );
+ session.save( disney );
+ list.add( disney );
+ Contact waltDisney = new Contact();
+ waltDisney.setOrg( disney );
+ session.save( waltDisney );
+ list.add( waltDisney );
+ tx.commit();
+ session.close();
+ }
+ public void cleanData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ for(Object obj: list){
+ session.delete( obj );
+ }
+ tx.commit();
+ session.close();
+ }
+ }
+
+
+ @Override
+ public void configure( Configuration cfg ) {
+ super.configure( cfg );
+ cfg.setProperty( Environment.MAX_FETCH_DEPTH, "1" );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "stateless/Contact.hbm.xml" };
+ }
+
+}
14 years, 8 months
Hibernate SVN: r19517 - core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-15 03:48:04 -0400 (Sat, 15 May 2010)
New Revision: 19517
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java
Log:
JBPAPP-3737 HHH-3220 Patch to prevent org.hibernate.AssertionFailure: possible non-threadsafe access to the session error caused by stateless sessions
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:37:13 UTC (rev 19516)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:48:04 UTC (rev 19517)
@@ -447,7 +447,7 @@
public void afterLoad();
/**
- *
+ * Is in a two-phase load?
*/
public boolean isLoadFinished();
/**
14 years, 8 months
Hibernate SVN: r19516 - in core/branches/Branch_3_5: core/src/main/java/org/hibernate/impl and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-15 03:37:13 -0400 (Sat, 15 May 2010)
New Revision: 19516
Added:
core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
Modified:
core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/PersistenceContext.java
core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
core/branches/Branch_3_5/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
Log:
HHH-3220 Patch to prevent org.hibernate.AssertionFailure: possible non-threadsafe access to the session error caused by stateless sessions
Modified: core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/PersistenceContext.java
===================================================================
--- core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:12:17 UTC (rev 19515)
+++ core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -445,6 +445,11 @@
* Call this after finishing a two-phase load
*/
public void afterLoad();
+
+ /**
+ * Is in a two-phase load?
+ */
+ public boolean isLoadFinished();
/**
* Returns a string representation of the object.
Modified: core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-15 07:12:17 UTC (rev 19515)
+++ core/branches/Branch_3_5/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -1094,6 +1094,10 @@
public void afterLoad() {
loadCounter--;
}
+
+ public boolean isLoadFinished() {
+ return loadCounter == 0;
+ }
/**
* Returns a string representation of the object.
Modified: core/branches/Branch_3_5/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
===================================================================
--- core/branches/Branch_3_5/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-15 07:12:17 UTC (rev 19515)
+++ core/branches/Branch_3_5/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -179,7 +179,9 @@
errorIfClosed();
Object result = getFactory().getEntityPersister(entityName)
.load(id, null, lockMode, this);
- temporaryPersistenceContext.clear();
+ if (temporaryPersistenceContext.isLoadFinished()) {
+ temporaryPersistenceContext.clear();
+ }
return result;
}
Added: core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
===================================================================
--- core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml (rev 0)
+++ core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml 2010-05-15 07:37:13 UTC (rev 19516)
@@ -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.test.stateless">
+
+ <class name="Contact">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="org" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Org">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="country" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Country">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
===================================================================
--- core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java (rev 0)
+++ core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -0,0 +1,47 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+/**
+ *
+ * @author stliu
+ */
+public class Contact {
+ private Integer id;
+ public Integer getId() {
+ return id;
+ }
+ public void setId( Integer id ) {
+ this.id = id;
+ }
+ public Org getOrg() {
+ return org;
+ }
+ public void setOrg( Org org ) {
+ this.org = org;
+ }
+ private Org org;
+
+}
Added: core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
===================================================================
--- core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Country.java (rev 0)
+++ core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Country.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -0,0 +1,13 @@
+package org.hibernate.test.stateless;
+
+public class Country {
+ private Integer id;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+}
Added: core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
===================================================================
--- core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Org.java (rev 0)
+++ core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/Org.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -0,0 +1,23 @@
+package org.hibernate.test.stateless;
+
+public class Org {
+ private Integer id;
+ private Country country;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
+
+}
Added: core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
===================================================================
--- core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java (rev 0)
+++ core/branches/Branch_3_5/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java 2010-05-15 07:37:13 UTC (rev 19516)
@@ -0,0 +1,117 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.FetchMode;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author stliu
+ */
+public class StatelessSessionQueryTest extends FunctionalTestCase {
+
+ public StatelessSessionQueryTest( String string ) {
+ super( string );
+ }
+
+ public void testCriteria() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testCriteriaWithSelectFetchMode() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).setFetchMode( "org", FetchMode.SELECT )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testHQL() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createQuery( "from Contact c join fetch c.org join fetch c.org.country" )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+ private class TestData{
+ List list = new ArrayList();
+ public void createData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ Country usa = new Country();
+ session.save( usa );
+ list.add( usa );
+ Org disney = new Org();
+ disney.setCountry( usa );
+ session.save( disney );
+ list.add( disney );
+ Contact waltDisney = new Contact();
+ waltDisney.setOrg( disney );
+ session.save( waltDisney );
+ list.add( waltDisney );
+ tx.commit();
+ session.close();
+ }
+ public void cleanData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ for(Object obj: list){
+ session.delete( obj );
+ }
+ tx.commit();
+ session.close();
+ }
+ }
+
+
+ @Override
+ public void configure( Configuration cfg ) {
+ super.configure( cfg );
+ cfg.setProperty( Environment.MAX_FETCH_DEPTH, "1" );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "stateless/Contact.hbm.xml" };
+ }
+
+}
14 years, 8 months
Hibernate SVN: r19515 - in core/branches/Branch_3_3_2_GA_CP: core/src/main/java/org/hibernate/engine/jdbc and 4 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-15 03:12:17 -0400 (Sat, 15 May 2010)
New Revision: 19515
Added:
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
Modified:
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/jdbc/LobCreationContext.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/SessionImpl.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java
core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java
Log:
JBPAPP-3737 HHH-3220 Patch to prevent org.hibernate.AssertionFailure: possible non-threadsafe access to the session error caused by stateless sessions
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/PersistenceContext.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -148,7 +148,7 @@
public void addEntity(EntityUniqueKey euk, Object entity);
/**
- * Retreive the EntityEntry representation of the given entity.
+ * Retrieve the EntityEntry representation of the given entity.
*
* @param entity The entity for which to locate the EntityEntry.
* @return The EntityEntry for the given entity.
@@ -437,7 +437,7 @@
public void setFlushing(boolean flushing);
/**
- * Call this before begining a two-phase load
+ * Call this before beginning a two-phase load
*/
public void beforeLoad();
@@ -445,8 +445,12 @@
* Call this after finishing a two-phase load
*/
public void afterLoad();
-
+
/**
+ *
+ */
+ public boolean isLoadFinished();
+ /**
* Returns a string representation of the object.
*
* @return a string representation of the object.
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/StatefulPersistenceContext.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -174,19 +174,15 @@
}
public void addUnownedCollection(CollectionKey key, PersistentCollection collection) {
- if (unownedCollections==null) {
+ if (unownedCollections == null) {
unownedCollections = new HashMap(8);
}
unownedCollections.put(key, collection);
}
public PersistentCollection useUnownedCollection(CollectionKey key) {
- if (unownedCollections==null) {
- return null;
- }
- else {
- return (PersistentCollection) unownedCollections.remove(key);
- }
+ return ( unownedCollections == null ) ? null : (PersistentCollection) unownedCollections
+ .remove( key );
}
/**
@@ -382,7 +378,7 @@
}
/**
- * Retreive the EntityEntry representation of the given entity.
+ * Retrieve the EntityEntry representation of the given entity.
*
* @param entity The entity for which to locate the EntityEntry.
* @return The EntityEntry for the given entity.
@@ -671,16 +667,12 @@
* third argument (the entity associated with the key) if no proxy exists. Init
* the proxy to the target implementation, if necessary.
*/
- public Object proxyFor(EntityPersister persister, EntityKey key, Object impl)
- throws HibernateException {
- if ( !persister.hasProxy() ) return impl;
- Object proxy = proxiesByKey.get(key);
- if ( proxy != null ) {
- return narrowProxy(proxy, persister, key, impl);
- }
- else {
+ public Object proxyFor( EntityPersister persister, EntityKey key, Object impl )
+ throws HibernateException {
+ if ( !persister.hasProxy() )
return impl;
- }
+ Object proxy = proxiesByKey.get( key );
+ return ( proxy != null ) ? narrowProxy( proxy, persister, key, impl ) : impl;
}
/**
@@ -874,7 +866,6 @@
}
}
-
/**
* Get the <tt>PersistentCollection</tt> object for an array
*/
@@ -1046,7 +1037,7 @@
}
/**
- * Call this before begining a two-phase load
+ * Call this before beginning a two-phase load
*/
public void beforeLoad() {
loadCounter++;
@@ -1058,7 +1049,10 @@
public void afterLoad() {
loadCounter--;
}
-
+
+ public boolean isLoadFinished() {
+ return loadCounter == 0;
+ }
/**
* Returns a string representation of the object.
*
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/jdbc/LobCreationContext.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/jdbc/LobCreationContext.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/engine/jdbc/LobCreationContext.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -26,8 +26,6 @@
import java.sql.Connection;
import java.sql.SQLException;
-import org.hibernate.JDBCException;
-import org.hibernate.exception.SQLExceptionConverter;
/**
* Provides callback access into the context in which the LOB is to be created. Mainly this is useful
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/FetchingScrollableResultsImpl.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -24,7 +24,6 @@
*/
package org.hibernate.impl;
-import org.apache.tools.ant.taskdefs.condition.IsReference;
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.exception.JDBCExceptionHelper;
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/SessionImpl.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/SessionImpl.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/SessionImpl.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -77,7 +77,6 @@
import org.hibernate.engine.StatefulPersistenceContext;
import org.hibernate.engine.Status;
import org.hibernate.engine.jdbc.LobCreationContext;
-import org.hibernate.engine.jdbc.LobCreationContext.Callback;
import org.hibernate.engine.query.FilterQueryPlan;
import org.hibernate.engine.query.HQLQueryPlan;
import org.hibernate.engine.query.NativeSQLQueryPlan;
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -177,7 +177,9 @@
errorIfClosed();
Object result = getFactory().getEntityPersister(entityName)
.load(id, null, lockMode, this);
- temporaryPersistenceContext.clear();
+ if ( temporaryPersistenceContext.isLoadFinished() ) {
+ temporaryPersistenceContext.clear();
+ }
return result;
}
@@ -275,6 +277,8 @@
}
// otherwise immediately materialize it
return get( entityName, id );
+// return getFactory().getEntityPersister(entityName).load(id,
+// null, LockMode.NONE, this);
}
public Iterator iterate(String query, QueryParameters queryParameters) throws HibernateException {
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -30,7 +30,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.Iterator;
import org.hibernate.HibernateException;
import org.hibernate.LockMode;
Modified: core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java 2010-05-14 13:38:39 UTC (rev 19514)
+++ core/branches/Branch_3_3_2_GA_CP/core/src/main/java/org/hibernate/transform/RootEntityResultTransformer.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -24,7 +24,6 @@
*/
package org.hibernate.transform;
-import java.util.List;
import java.io.Serializable;
/**
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.hbm.xml 2010-05-15 07:12:17 UTC (rev 19515)
@@ -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.test.stateless">
+
+ <class name="Contact">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="org" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Org">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ <many-to-one name="country" lazy="false" fetch="join" />
+ </class>
+
+ <class name="Country">
+ <id name="id">
+ <generator class="native" />
+ </id>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Contact.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -0,0 +1,47 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+/**
+ *
+ * @author stliu
+ */
+public class Contact {
+ private Integer id;
+ public Integer getId() {
+ return id;
+ }
+ public void setId( Integer id ) {
+ this.id = id;
+ }
+ public Org getOrg() {
+ return org;
+ }
+ public void setOrg( Org org ) {
+ this.org = org;
+ }
+ private Org org;
+
+}
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Country.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Country.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Country.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -0,0 +1,13 @@
+package org.hibernate.test.stateless;
+
+public class Country {
+ private Integer id;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+}
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Org.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Org.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/Org.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -0,0 +1,23 @@
+package org.hibernate.test.stateless;
+
+public class Org {
+ private Integer id;
+ private Country country;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
+
+}
Added: core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java (rev 0)
+++ core/branches/Branch_3_3_2_GA_CP/testsuite/src/test/java/org/hibernate/test/stateless/StatelessSessionQueryTest.java 2010-05-15 07:12:17 UTC (rev 19515)
@@ -0,0 +1,117 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, 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
+ *
+ */
+package org.hibernate.test.stateless;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.FetchMode;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.junit.functional.FunctionalTestCase;
+
+/**
+ *
+ * @author stliu
+ */
+public class StatelessSessionQueryTest extends FunctionalTestCase {
+
+ public StatelessSessionQueryTest( String string ) {
+ super( string );
+ }
+
+ public void testCriteria() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testCriteriaWithSelectFetchMode() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createCriteria( Contact.class ).setFetchMode( "org", FetchMode.SELECT )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+
+ public void testHQL() {
+ TestData testData=new TestData();
+ testData.createData();
+ StatelessSession s = getSessions().openStatelessSession();
+ assertEquals( 1, s.createQuery( "from Contact c join fetch c.org join fetch c.org.country" )
+ .list().size() );
+ s.close();
+ testData.cleanData();
+ }
+ private class TestData{
+ List list = new ArrayList();
+ public void createData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ Country usa = new Country();
+ session.save( usa );
+ list.add( usa );
+ Org disney = new Org();
+ disney.setCountry( usa );
+ session.save( disney );
+ list.add( disney );
+ Contact waltDisney = new Contact();
+ waltDisney.setOrg( disney );
+ session.save( waltDisney );
+ list.add( waltDisney );
+ tx.commit();
+ session.close();
+ }
+ public void cleanData(){
+ Session session = openSession();
+ Transaction tx = session.beginTransaction();
+ for(Object obj: list){
+ session.delete( obj );
+ }
+ tx.commit();
+ session.close();
+ }
+ }
+
+
+ @Override
+ public void configure( Configuration cfg ) {
+ super.configure( cfg );
+ cfg.setProperty( Environment.MAX_FETCH_DEPTH, "1" );
+ }
+
+ public String[] getMappings() {
+ return new String[] { "stateless/Contact.hbm.xml" };
+ }
+
+}
14 years, 8 months
Hibernate SVN: r19514 - in validator/trunk/hibernate-validator/src/main/docbook/en-US: modules and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-14 09:38:39 -0400 (Fri, 14 May 2010)
New Revision: 19514
Modified:
validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
Log:
HV-298 renamed jpaVersion to bvVersion
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent 2010-05-14 10:27:55 UTC (rev 19513)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent 2010-05-14 13:38:39 UTC (rev 19514)
@@ -1,5 +1,5 @@
<!ENTITY version "WORKING">
-<!ENTITY jpaVersion "1.0.0.GA">
+<!ENTITY bvVersion "1.0.0.GA">
<!ENTITY today "TODAY">
<!ENTITY copyrightYear "2009, 2010">
<!ENTITY copyrightHolder "Red Hat, Inc. & Gunnar Morling">
\ No newline at end of file
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-14 10:27:55 UTC (rev 19513)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-14 13:38:39 UTC (rev 19514)
@@ -174,7 +174,7 @@
<itemizedlist>
<listitem>
- <para>validation-api-&jpaVersion;.jar</para>
+ <para>validation-api-&bvVersion;.jar</para>
</listitem>
<listitem>
@@ -190,8 +190,8 @@
<title>Using the annotation processor with javac</title>
<programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java \
- -cp /path/to/validation-api-&jpaVersion;.jar \
- -processorpath /path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar </programlisting>
+ -cp /path/to/validation-api-&bvVersion;.jar \
+ -processorpath /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar </programlisting>
</example>
</section>
@@ -209,9 +209,9 @@
<programlisting><javac srcdir="src/main"
destdir="build/classes"
- classpath="/path/to/validation-api-&jpaVersion;.jar">
+ classpath="/path/to/validation-api-&bvVersion;.jar">
<compilerarg value="-processorpath" />
- <compilerarg value="/path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"/>
+ <compilerarg value="/path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"/>
</javac></programlisting>
</example>
</section>
@@ -338,7 +338,7 @@
<itemizedlist>
<listitem>
- <para>validation-api-&jpaVersion;.jar</para>
+ <para>validation-api-&bvVersion;.jar</para>
</listitem>
<listitem>
@@ -383,7 +383,7 @@
<listitem>
<para>Choose "Enable annotation processing" and enter the
following as "Processor path":
- /path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar</para>
+ /path/to/validation-api-&bvVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar</para>
</listitem>
<listitem>
@@ -428,7 +428,7 @@
<itemizedlist>
<listitem>
- <para>validation-api-&jpaVersion;.jar</para>
+ <para>validation-api-&bvVersion;.jar</para>
</listitem>
<listitem>
14 years, 8 months
Hibernate SVN: r19513 - validator/trunk/hibernate-validator/src/main/docbook/en-US.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-14 06:27:55 -0400 (Fri, 14 May 2010)
New Revision: 19513
Added:
validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent
Log:
HV-298
- Updated the docbook plugin
- Moved the entity definitions into a seperate file which is now imported by the modules
- Fixed some typos and formatting
- Used entity references for version numbers
Added: validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent (rev 0)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/hv.ent 2010-05-14 10:27:55 UTC (rev 19513)
@@ -0,0 +1,5 @@
+<!ENTITY version "WORKING">
+<!ENTITY jpaVersion "1.0.0.GA">
+<!ENTITY today "TODAY">
+<!ENTITY copyrightYear "2009, 2010">
+<!ENTITY copyrightHolder "Red Hat, Inc. & Gunnar Morling">
\ No newline at end of file
14 years, 8 months
Hibernate SVN: r19512 - in validator/trunk: hibernate-validator and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-05-14 06:27:26 -0400 (Fri, 14 May 2010)
New Revision: 19512
Modified:
validator/trunk/hibernate-validator/pom.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/preface.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
validator/trunk/pom.xml
Log:
HV-298
- Updated the docbook plugin
- Moved the entity definitions into a seperate file which is now imported by the modules
- Fixed some typos and formatting
- Used entity references for version numbers
Modified: validator/trunk/hibernate-validator/pom.xml
===================================================================
--- validator/trunk/hibernate-validator/pom.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/pom.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -211,7 +211,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jdocbook-style</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1</version>
<type>jdocbook-style</type>
</dependency>
</dependencies>
@@ -249,6 +249,9 @@
<docbookVersion>1.72.0</docbookVersion>
<localeSeparator>-</localeSeparator>
</options>
+ <profiling>
+ <enabled>true</enabled>
+ </profiling>
</configuration>
<executions>
<execution>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/master.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,14 +16,12 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY version "WORKING">
- <!ENTITY today "TODAY">
- <!ENTITY copyrightYear "2009, 2010">
- <!ENTITY copyrightHolder "Red Hat, Inc. & Gunnar Morling">
- ]>
-<book lang="en">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "hv.ent">
+%BOOK_ENTITIES;
+]>
+
+<book>
<bookinfo>
<title>Hibernate Validator</title>
<subtitle>JSR 303 Reference Implementation</subtitle>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/annotationprocessor.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,547 +16,470 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter>
- <title id="chapter-annotation-processor">The Hibernate Validation Annotation
- Processor (EXPERIMENTAL)
- </title>
+ <title id="chapter-annotation-processor">Hibernate Validator Annotation
+ Processor (EXPERIMENTAL)</title>
- <para>Have you ever caught yourself by unintentionally doing things
- like
- </para>
+ <para>Have you ever caught yourself by unintentionally doing things
+ like</para>
- <itemizedlist>
- <listitem>
- <para>annotating Strings with @Min to specify a minimum length (instead
- of using @Size)
- </para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>annotating Strings with @Min to specify a minimum length (instead
+ of using @Size)</para>
+ </listitem>
- <listitem>
- <para>annotating the setter of a JavaBean property (instead of the
- getter method)
- </para>
- </listitem>
+ <listitem>
+ <para>annotating the setter of a JavaBean property (instead of the
+ getter method)</para>
+ </listitem>
- <listitem>
- <para>annotating static fields/methods with constraint annotations
- (which is not supported)?
- </para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>annotating static fields/methods with constraint annotations
+ (which is not supported)?</para>
+ </listitem>
+ </itemizedlist>
- <para>Then the Hibernate Validator Annotation Processor is the right thing
- for you. It helps in preventing such mistakes by plugging into the build
- process and raising compilation errors whenever constraint annotations are
- incorrectly used.
- </para>
+ <para>Then the Hibernate Validator Annotation Processor is the right thing
+ for you. It helps preventing such mistakes by plugging into the build
+ process and raising compilation errors whenever constraint annotations are
+ incorrectly used.</para>
- <warning>
- <para>A first version of the Hibernate Validator Annotation Processor is
- part of Hibernate Validator since release 4.1. It is currently still under
- development and should therefore be considered as an experimental feature.
- Some
- <link linkend="section-known-issues">known issues</link>
- can be found
- at the end of this chapter. In case any problems arise when using the
- processor feel free to ask for help at the
- <ulink
- url="https://forum.hibernate.org/viewforum.php?f=9">forum
- </ulink>
- or
- create an issue within<ulink
- url="http://opensource.atlassian.com/projects/hibernate/browse/HV/component/10356">JIRA</ulink>.
- </para>
- </warning>
+ <warning>
+ <para>A first version of the Hibernate Validator Annotation Processor is
+ part of Hibernate Validator since release 4.1. It is currently still under
+ development and should therefore be considered as an experimental feature.
+ Some <link linkend="section-known-issues">known issues</link> can be found
+ at the end of this chapter. In case any problems arise when using the
+ processor feel free to ask for help at the <ulink
+ url="https://forum.hibernate.org/viewforum.php?f=9">forum </ulink>or
+ create an issue within<ulink
+ url="http://opensource.atlassian.com/projects/hibernate/browse/HV/component/10356">
+ JIRA</ulink>.</para>
+ </warning>
- <section>
- <title>Prerequisites</title>
+ <section>
+ <title>Prerequisites</title>
- <para>The Hibernate Validator Annotation Processor is based on the
- "Pluggable Annotation Processing API" as defined by<ulink
- url="http://jcp.org/en/jsr/detail?id=269">JSR 269</ulink>.This API is part
- of the Java Platform since Java 6. So be sure to use this or a later
- version.
- </para>
- </section>
+ <para>The Hibernate Validator Annotation Processor is based on the
+ "Pluggable Annotation Processing API" as defined by <ulink
+ url="http://jcp.org/en/jsr/detail?id=269">JSR 269</ulink>. This API is
+ part of the Java Platform since Java 6. So be sure to use this or a later
+ version.</para>
+ </section>
- <section id="section-features-of-the-ap">
- <title>Features</title>
+ <section id="section-features-of-the-ap">
+ <title>Features</title>
- <para>As of Hibernate Validator 4.1 the Hibernate Validator Annotation
- Processor checks:
- </para>
+ <para>As of Hibernate Validator 4.1 the Hibernate Validator Annotation
+ Processor checks that:</para>
- <itemizedlist>
- <listitem>
- <para>whether constraint annotations are allowed for the type of the
- annotated element
- </para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>constraint annotations are allowed for the type of the annotated
+ element</para>
+ </listitem>
- <listitem>
- <para>that in case of property validation JavaBean getter methods are
- annotated
- </para>
- </listitem>
+ <listitem>
+ <para>JavaBean getter methods are annotated in case of property
+ validation</para>
+ </listitem>
- <listitem>
- <para>that only non-static fields or properties are annotated with
- constraint annotations
- </para>
- </listitem>
+ <listitem>
+ <para>only non-static fields or properties are annotated with
+ constraint annotations</para>
+ </listitem>
- <listitem>
- <para>that only non-primitive fields or properties are annotated with
- @Valid
- </para>
- </listitem>
+ <listitem>
+ <para>only non-primitive fields or properties are annotated with
+ @Valid</para>
+ </listitem>
- <listitem>
- <para>that only such annotation types are annotated with constraint
- annotations which are constraint annotations themselves
- </para>
- </listitem>
- </itemizedlist>
- </section>
+ <listitem>
+ <para>only such annotation types are annotated with constraint
+ annotations which are constraint annotations themselves</para>
+ </listitem>
+ </itemizedlist>
+ </section>
- <section>
- <title>Options</title>
+ <section>
+ <title>Options</title>
- <para>The behavior of the Hibernate Validator Annotation Processor can be
- controlled using the
- <ulink
- url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
- options
- </ulink>
- listed in table<xref
- linkend="table_processor_options"/>:
- </para>
+ <para>The behavior of the Hibernate Validator Annotation Processor can be
+ controlled using the <ulink
+ url="http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options">processor
+ options </ulink> listed in table<xref
+ linkend="table_processor_options" />:</para>
- <table id="table_processor_options">
- <title>Hibernate Validator Annotation Processor options</title>
+ <table id="table_processor_options">
+ <title>Hibernate Validator Annotation Processor options</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry align="center">Option</entry>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry align="center">Option</entry>
- <entry align="center">Explanation</entry>
- </row>
- </thead>
+ <entry align="center">Explanation</entry>
+ </row>
+ </thead>
- <tbody>
- <row>
- <entry>
- <varname>diagnosticKind</varname>
- </entry>
+ <tbody>
+ <row>
+ <entry><varname>diagnosticKind</varname></entry>
- <entry>Controls how constraint problems are reported. Must be the
- string representation of one of the values from the enum
- <classname>javax.tools.Diagnostic.Kind</classname>, e.g.
- <classname>WARNING</classname>. A value of
- <classname>ERROR</classname>
- will cause compilation to halt
- whenever the AP detects a constraint problem. Defaults to
- <classname>ERROR</classname>.
- </entry>
- </row>
+ <entry>Controls how constraint problems are reported. Must be the
+ string representation of one of the values from the enum
+ <classname>javax.tools.Diagnostic.Kind</classname>, e.g.
+ <classname>WARNING</classname>. A value of
+ <classname>ERROR</classname> will cause compilation to halt
+ whenever the AP detects a constraint problem. Defaults to
+ <classname>ERROR</classname>.</entry>
+ </row>
- <row>
- <entry>
- <varname>verbose</varname>
- </entry>
+ <row>
+ <entry><varname>verbose</varname></entry>
- <entry>Controls whether detailed processing information shall be
- displayed or not, useful for debugging purposes. Must be either
- <varname>true</varname>
- or<varname>false</varname>. Defaults to
- <varname>false</varname>.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
+ <entry>Controls whether detailed processing information shall be
+ displayed or not, useful for debugging purposes. Must be either
+ <varname>true</varname> or<varname>false</varname>. Defaults to
+ <varname>false</varname>.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
- <section>
- <title>Using the Annotation Processor</title>
+ <section>
+ <title>Using the Annotation Processor</title>
- <para>This section shows in detail how to integrate the Hibernate
- Validator Annotation Processor into command line builds (javac, Ant,
- Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA,
- NetBeans).
- </para>
+ <para>This section shows in detail how to integrate the Hibernate
+ Validator Annotation Processor into command line builds (javac, Ant,
+ Maven) as well as IDE-based builds (Eclipse, IntelliJ IDEA,
+ NetBeans).</para>
- <section>
- <title>Command line builds</title>
+ <section>
+ <title>Command line builds</title>
- <section>
- <title>javac</title>
+ <section>
+ <title>javac</title>
- <para>When compiling on the command line using<ulink
- url="http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html">javac</ulink>,
- specify the following JARs using the "processorpath" option:
- </para>
+ <para>When compiling on the command line using <ulink
+ url="http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html">javac</ulink>,
+ specify the following JARs using the "processorpath" option:</para>
- <itemizedlist>
- <listitem>
- <para>validation-api-1.0.0.GA.jar</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-&jpaVersion;.jar</para>
+ </listitem>
- <listitem>
- <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>hibernate-validator-annotation-processor-&version;.jar</para>
+ </listitem>
+ </itemizedlist>
- <para>The following listing shows an example. The processor will be
- detected automatically by the compiler and invoked during
- compilation.
- </para>
+ <para>The following listing shows an example. The processor will be
+ detected automatically by the compiler and invoked during
+ compilation.</para>
- <example>
- <title>Using the annotation processor with javac</title>
+ <example>
+ <title>Using the annotation processor with javac</title>
- <programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java
- -cp /path/to/validation-api-1.0.0.GA.jar
- -processorpath
- /path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0.GA.jar
- </programlisting>
- </example>
- </section>
+ <programlisting>javac src/main/java/org/hibernate/validator/ap/demo/Car.java \
+ -cp /path/to/validation-api-&jpaVersion;.jar \
+ -processorpath /path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar </programlisting>
+ </example>
+ </section>
- <section>
- <title>Apache Ant</title>
+ <section>
+ <title>Apache Ant</title>
- <para>Similar to directly working with javac, the annotation processor
- can be added as as compiler argument when invoking the
- <ulink
- url="http://ant.apache.org/manual/CoreTasks/javac.html">javac
- task
- </ulink>
- for<ulink url="http://ant.apache.org/">Apache
- Ant</ulink>:
- </para>
+ <para>Similar to directly working with javac, the annotation processor
+ can be added as as compiler argument when invoking the <ulink
+ url="http://ant.apache.org/manual/CoreTasks/javac.html">javac task
+ </ulink> for <ulink url="http://ant.apache.org/">Apache
+ Ant</ulink>:</para>
- <example>
- <title>Using the annotation processor with Ant</title>
+ <example>
+ <title>Using the annotation processor with Ant</title>
- <programlisting><javac
- srcdir="src/main"
- destdir="build/classes"
- classpath="/path/to/validation-api-1.0.0.GA.jar">
+ <programlisting><javac srcdir="src/main"
+ destdir="build/classes"
+ classpath="/path/to/validation-api-&jpaVersion;.jar">
+ <compilerarg value="-processorpath" />
+ <compilerarg value="/path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar"/>
+</javac></programlisting>
+ </example>
+ </section>
- <compilerarg value="-processorpath" />
- <compilerarg
- value="/path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0-SNAPSHOT.jar"
- />
- </javac></programlisting>
- </example>
- </section>
+ <section>
+ <title>Maven</title>
- <section>
- <title>Maven</title>
+ <para>There are several options for integrating the annotation
+ processor with <ulink url="http://maven.apache.org/">Apache
+ Maven</ulink>. Generally it is sufficient to add the Hibernate
+ Validator Annotation Processor as dependency to your project:</para>
- <para>There are several options for integrating the annotation
- processor with<ulink url="http://maven.apache.org/">Apache
- Maven</ulink>. Generally it is sufficient to add the Hibernate
- Validator Annotation Processor as dependency to your project:
- </para>
+ <example>
+ <title>Adding the HV Annotation Processor as dependency</title>
- <example>
- <title>Adding the HV Annotation Processor as dependency</title>
+ <programlisting>...
+<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator-annotation-processor</artifactId>
+ <version>&version;</version>
+ <scope>compile</scope>
+</dependency>
+... </programlisting>
+ </example>
- <programlisting>...
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator-annotation-processor</artifactId>
- <version>4.1.0.GA</version>
- <scope>compile</scope>
- </dependency>
- ...
- </programlisting>
- </example>
+ <para>The processor will then be executed automatically by the
+ compiler. This basically works, but comes with the disadavantage that
+ in some cases messages from the annotation processor are not displayed
+ (see <ulink
+ url="http://jira.codehaus.org/browse/MCOMPILER-66">MCOMPILER-66</ulink>).</para>
- <para>The processor will then be executed automatically by the
- compiler. This basically works, but comes with the disadavantage that
- in some cases messages from the annotation processor are not displayed
- (see<ulink url="???">MCOMPILER-66</ulink>).
- </para>
+ <para>Another option is using the <ulink
+ url="http://code.google.com/p/maven-annotation-plugin/">Maven
+ Annotation Plugin</ulink>. At the time of this writing the plugin is
+ not yet available in any of the well-known repositories. Therefore you
+ have to add the project's own repository to your settings.xml or
+ pom.xml:</para>
- <para>Another option is using the<ulink
- url="http://code.google.com/p/maven-annotation-plugin/">Maven
- Annotation Plugin</ulink>. At the time of this writing the plugin is
- not yet available in any of the well-known repositories. Therefore you
- have to add the project's own repository to your settings.xml or
- pom.xml:
- </para>
+ <para><example>
+ <title>Adding the Maven Annotation Plugin repository</title>
- <para>
- <example>
- <title>Adding the Maven Annotation Plugin repository</title>
+ <programlisting>...
+<pluginRepositories>
+ <pluginRepository>
+ <id>maven-annotation-plugin-repo</id>
+ <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo&...
+ </pluginRepository>
+</pluginRepositories>
+... </programlisting>
+ </example> Now disable the standard annotation processing performed
+ by the compiler plugin and configure the annotation plugin by
+ specifying an execution and adding the Hibernate Validator Annotation
+ Processor as plugin dependency (that way the AP is not visible on the
+ project's actual classpath):</para>
- <programlisting>...
- <pluginRepositories>
- <pluginRepository>
- <id>maven-annotation-plugin-repo</id>
- <url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo&...
- </pluginRepository>
- </pluginRepositories>
- ...
- </programlisting>
- </example>
- Now disable the standard annotation processing performed
- by the compiler plugin and configure the annotation plugin by
- specifying an execution and adding the Hibernate Validator annotation
- processor as plugin dependency (that way the AP is not visible on the
- project's actual classpath):
- </para>
+ <example>
+ <title>Configuring the Maven Annotation Plugin</title>
- <example>
- <title>Configuring the Maven Annotation Plugin</title>
-
- <programlisting>...
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <compilerArgument>-proc:none</compilerArgument>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.bsc.maven</groupId>
- <artifactId>maven-processor-plugin</artifactId>
- <version>1.3.4</version>
- <executions>
- <execution>
- <id>process</id>
- <goals>
- <goal>process</goal>
- </goals>
- <phase>process-sources</phase>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator-annotation-processor</artifactId>
- <version>4.1.0.GA</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- </plugin>
- ...
+ <programlisting>...
+<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <compilerArgument>-proc:none</compilerArgument>
+ </configuration>
+</plugin>
+<plugin>
+ <groupId>org.bsc.maven</groupId>
+ <artifactId>maven-processor-plugin</artifactId>
+ <version>1.3.4</version>
+ <executions>
+ <execution>
+ <id>process</id>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator-annotation-processor</artifactId>
+ <version>&version;</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</plugin>
+...
</programlisting>
- </example>
- </section>
- </section>
+ </example>
+ </section>
+ </section>
- <section>
- <title>IDE builds</title>
+ <section>
+ <title>IDE builds</title>
- <section>
- <title>Eclipse</title>
+ <section>
+ <title>Eclipse</title>
- <para>Do the following to use the annotation processor within the
- <ulink url="http://www.eclipse.org/">Eclipse</ulink>
- IDE:
- </para>
+ <para>Do the following to use the annotation processor within the
+ <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE:</para>
- <itemizedlist>
- <listitem>
- <para>Right-click your project, choose "Properties"</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click your project, choose "Properties"</para>
+ </listitem>
- <listitem>
- <para>Go to "Java Compiler" and make sure, that "Compiler
- compliance level" is set to "1.6". Otherwise the processor won't
- be activated
- </para>
- </listitem>
+ <listitem>
+ <para>Go to "Java Compiler" and make sure, that "Compiler
+ compliance level" is set to "1.6". Otherwise the processor won't
+ be activated</para>
+ </listitem>
- <listitem>
- <para>Go to "Java Compiler - Annotation Processing" and choose
- "Enable annotation processing"
- </para>
- </listitem>
+ <listitem>
+ <para>Go to "Java Compiler - Annotation Processing" and choose
+ "Enable annotation processing"</para>
+ </listitem>
- <listitem>
- <para>Go to "Java Compiler - Annotation Processing - Factory Path"
- and add the following JARs:
- </para>
+ <listitem>
+ <para>Go to "Java Compiler - Annotation Processing - Factory Path"
+ and add the following JARs:</para>
- <itemizedlist>
- <listitem>
- <para>validation-api-1.0.0.GA.jar</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-&jpaVersion;.jar</para>
+ </listitem>
- <listitem>
- <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
- </listitem>
- </itemizedlist>
- </listitem>
+ <listitem>
+ <para>hibernate-validator-annotation-processor-&version;.jar</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
- <listitem>
- <para>Confirm the workspace rebuild</para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>Confirm the workspace rebuild</para>
+ </listitem>
+ </itemizedlist>
- <para>You now should see any annotation problems as regular error
- markers within the editor and in the "Problem" view:
- </para>
+ <para>You now should see any annotation problems as regular error
+ markers within the editor and in the "Problem" view:</para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" arch="" contentwidth="150mm"
- fileref="annotation_processor_eclipse.png"/>
- </imageobject>
- </mediaobject>
- </section>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" arch="" contentwidth="150mm"
+ fileref="annotation_processor_eclipse.png" />
+ </imageobject>
+ </mediaobject>
+ </section>
- <section>
- <title>IntelliJ IDEA</title>
+ <section>
+ <title>IntelliJ IDEA</title>
- <para>The following steps must be followed to use the annotation
- processor within
- <ulink url="http://www.jetbrains.com/idea/">IntelliJ
- IDEA
- </ulink>
- (version 9 and above):
- </para>
+ <para>The following steps must be followed to use the annotation
+ processor within <ulink url="http://www.jetbrains.com/idea/">IntelliJ
+ IDEA </ulink> (version 9 and above):</para>
- <itemizedlist>
- <listitem>
- <para>Go to "File", then "Settings",</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>Go to "File", then "Settings",</para>
+ </listitem>
- <listitem>
- <para>Expand the node "Compiler", then "Annotation
- Processors"
- </para>
- </listitem>
+ <listitem>
+ <para>Expand the node "Compiler", then "Annotation
+ Processors"</para>
+ </listitem>
- <listitem>
- <para>Choose "Enable annotation processing" and enter the
- following as "Processor path":
- /path/to/validation-api-1.0.0.GA.jar:/path/to/hibernate-validator-annotation-processor-4.1.0.GA.jar
- </para>
- </listitem>
+ <listitem>
+ <para>Choose "Enable annotation processing" and enter the
+ following as "Processor path":
+ /path/to/validation-api-&jpaVersion;.jar:/path/to/hibernate-validator-annotation-processor-&version;.jar</para>
+ </listitem>
- <listitem>
- <para>Add the processor's fully qualified name
- <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>
- to the "Annotation Processors" list
- </para>
- </listitem>
+ <listitem>
+ <para>Add the processor's fully qualified name
+ <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>
+ to the "Annotation Processors" list</para>
+ </listitem>
- <listitem>
- <para>If applicable add you module to the "Processed Modules"
- list
- </para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>If applicable add you module to the "Processed Modules"
+ list</para>
+ </listitem>
+ </itemizedlist>
- <para>Rebuilding your project then should show any erronous constraint
- annotations:
- </para>
+ <para>Rebuilding your project then should show any erronous constraint
+ annotations:</para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" arch="" contentwidth="150mm"
- fileref="annotation_processor_intellij.png"/>
- </imageobject>
- </mediaobject>
- </section>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" arch="" contentwidth="150mm"
+ fileref="annotation_processor_intellij.png" />
+ </imageobject>
+ </mediaobject>
+ </section>
- <section>
- <title>NetBeans</title>
+ <section>
+ <title>NetBeans</title>
- <para>Starting with version 6.9, also the
- <ulink
- url="http://www.netbeans.org/">NetBeans
- </ulink>
- IDE supports using
- annotation processors within the IDE build. To do so, do the
- following:
- </para>
+ <para>Starting with version 6.9, also the <ulink
+ url="http://www.netbeans.org/">NetBeans </ulink> IDE supports using
+ annotation processors within the IDE build. To do so, do the
+ following:</para>
- <itemizedlist>
- <listitem>
- <para>Right-click your project, choose "Properties"</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click your project, choose "Properties"</para>
+ </listitem>
- <listitem>
- <para>Go to "Libraries", tab "Processor", and add the following
- two JARs:
- </para>
+ <listitem>
+ <para>Go to "Libraries", tab "Processor", and add the following
+ two JARs:</para>
- <itemizedlist>
- <listitem>
- <para>validation-api-1.0.0.GA.jar</para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para>validation-api-&jpaVersion;.jar</para>
+ </listitem>
- <listitem>
- <para>hibernate-validator-annotation-processor-4.1.0.GA.jar</para>
- </listitem>
- </itemizedlist>
- </listitem>
+ <listitem>
+ <para>hibernate-validator-annotation-processor-&version;.jar</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
- <listitem>
- <para>Go to "Build - Compiling", select "Enable Annotation
- Processing" and "Enable Annotation Processing in Editor". Add the
- annotation processor by specifying its fully qualified name
- <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para>Go to "Build - Compiling", select "Enable Annotation
+ Processing" and "Enable Annotation Processing in Editor". Add the
+ annotation processor by specifying its fully qualified name
+ <classname>org.hibernate.validator.ap.ConstraintValidationProcessor</classname></para>
+ </listitem>
+ </itemizedlist>
- <para>Any constraint annotation problems will then be marked directly
- within the editor:
- </para>
+ <para>Any constraint annotation problems will then be marked directly
+ within the editor:</para>
- <mediaobject>
- <imageobject>
- <imagedata align="center" arch="" contentwidth="150mm"
- fileref="annotation_processor_netbeans.png"/>
- </imageobject>
- </mediaobject>
- </section>
- </section>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" arch="" contentwidth="150mm"
+ fileref="annotation_processor_netbeans.png" />
+ </imageobject>
+ </mediaobject>
+ </section>
</section>
+ </section>
- <section id="section-known-issues">
- <title>Known issues</title>
+ <section id="section-known-issues">
+ <title>Known issues</title>
- <para>The following known issues exist as of May 2010:</para>
+ <para>The following known issues exist as of May 2010:</para>
- <itemizedlist>
- <listitem>
- <para><ulink
- url="http://opensource.atlassian.com/projects/hibernate/browse/HV-308">HV-308</ulink>:
- Additional validators registered for a constraint
- <ulink
- url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single...">
- using
- XML
- </ulink>
- are not evaluated by the annotation processor.
- </para>
- </listitem>
+ <itemizedlist>
+ <listitem>
+ <para><ulink
+ url="http://opensource.atlassian.com/projects/hibernate/browse/HV-308">HV-308</ulink>:
+ Additional validators registered for a constraint <ulink
+ url="http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single...">
+ using XML </ulink> are not evaluated by the annotation
+ processor.</para>
+ </listitem>
- <listitem>
- <para>Sometimes custom constraints can't be
- <ulink
- url="http://opensource.atlassian.com/projects/hibernate/browse/HV-293">properly
- evaluated
- </ulink>
- when using the processor within Eclipse. This seems
- to be an issue with the Eclipse JSR 269 API implementation, but
- further investigation is required here.
- </para>
- </listitem>
- </itemizedlist>
- </section>
+ <listitem>
+ <para>Sometimes custom constraints can't be <ulink
+ url="http://opensource.atlassian.com/projects/hibernate/browse/HV-293">properly
+ evaluated </ulink> when using the processor within Eclipse. This seems
+ to be an issue with the Eclipse JSR 269 API implementation, but
+ further investigation is required here.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/bootstrapping.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-bootstrapping">
<title>Bootstrapping</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/customconstraints.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-customconstraints">
<title>Creating custom constraints</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/furtherreading.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter>
<title id="chapter-further-reading">Further reading</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/gettingstarted.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-gettingstarted">
<title id="getting-started">Getting started</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/integration.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-checkconstraints">
<title>Integration with other frameworks</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/preface.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/preface.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/preface.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<preface id="preface">
<title>Preface</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/usingvalidator.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-usingvalidator">
<title>Validation step by step</title>
Modified: validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml
===================================================================
--- validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/hibernate-validator/src/main/docbook/en-US/modules/xmlconfiguration.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -16,8 +16,11 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../hv.ent">
+%BOOK_ENTITIES;
+]>
<chapter id="validator-xmlconfiguration">
<title>XML configuration</title>
Modified: validator/trunk/pom.xml
===================================================================
--- validator/trunk/pom.xml 2010-05-14 06:55:33 UTC (rev 19511)
+++ validator/trunk/pom.xml 2010-05-14 10:27:26 UTC (rev 19512)
@@ -270,7 +270,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.2.0</version>
+ <version>2.2.3</version>
</plugin>
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
14 years, 8 months
Hibernate SVN: r19511 - in core/branches/Branch_3_3_2_GA_CP: distribution and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-14 02:55:33 -0400 (Fri, 14 May 2010)
New Revision: 19511
Removed:
core/branches/Branch_3_3_2_GA_CP/documentation/
Modified:
core/branches/Branch_3_3_2_GA_CP/distribution/pom.xml
Log:
JBPAPP-4297 remove document source from hibernate cp branch
Modified: core/branches/Branch_3_3_2_GA_CP/distribution/pom.xml
===================================================================
--- core/branches/Branch_3_3_2_GA_CP/distribution/pom.xml 2010-05-14 06:54:58 UTC (rev 19510)
+++ core/branches/Branch_3_3_2_GA_CP/distribution/pom.xml 2010-05-14 06:55:33 UTC (rev 19511)
@@ -53,7 +53,16 @@
<descriptors>
<descriptor>src/assembly/dist.xml</descriptor>
</descriptors>
- </configuration>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
14 years, 8 months
Hibernate SVN: r19510 - in search/branches/v3_1_1_GA_CP: src/main and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-05-14 02:54:58 -0400 (Fri, 14 May 2010)
New Revision: 19510
Removed:
search/branches/v3_1_1_GA_CP/src/main/docbook/
Modified:
search/branches/v3_1_1_GA_CP/pom.xml
search/branches/v3_1_1_GA_CP/src/main/assembly/dist.xml
Log:
JBPAPP-4297 remove document source from hibernate cp branch
Modified: search/branches/v3_1_1_GA_CP/pom.xml
===================================================================
--- search/branches/v3_1_1_GA_CP/pom.xml 2010-05-14 06:44:14 UTC (rev 19509)
+++ search/branches/v3_1_1_GA_CP/pom.xml 2010-05-14 06:54:58 UTC (rev 19510)
@@ -132,14 +132,25 @@
</excludes>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/dist.xml</descriptor>
- </descriptors>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-2</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<testResources>
<testResource>
Modified: search/branches/v3_1_1_GA_CP/src/main/assembly/dist.xml
===================================================================
--- search/branches/v3_1_1_GA_CP/src/main/assembly/dist.xml 2010-05-14 06:44:14 UTC (rev 19509)
+++ search/branches/v3_1_1_GA_CP/src/main/assembly/dist.xml 2010-05-14 06:54:58 UTC (rev 19510)
@@ -2,8 +2,6 @@
<assembly>
<id>dist</id>
<formats>
- <format>tar.gz</format>
- <format>tar.bz2</format>
<format>zip</format>
</formats>
@@ -28,10 +26,6 @@
<outputDirectory>/dist/docs/api</outputDirectory>
</fileSet>
<fileSet>
- <directory>target/docbook/publish/en-US</directory>
- <outputDirectory>/dist/docs/manual</outputDirectory>
- </fileSet>
- <fileSet>
<directory>.</directory>
<outputDirectory></outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
14 years, 8 months