From: Kai Moritz Date: Sun, 26 Oct 2014 10:16:00 +0000 (+0100) Subject: Renamed an integration-test to test for whitespaces in the filename X-Git-Tag: hibernate4-maven-plugin-1.0.5~6 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=d27f7af23c82167e873ce143e50ce9d9a65f5e61;p=hibernate4-maven-plugin Renamed an integration-test to test for whitespaces in the filename --- diff --git a/src/it/dependency test/dependent/pom.xml b/src/it/dependency test/dependent/pom.xml new file mode 100644 index 00000000..e7c15f39 --- /dev/null +++ b/src/it/dependency test/dependent/pom.xml @@ -0,0 +1,26 @@ + + 4.0.0 + de.cege + dependent + 0.0.1 + + + + javax + javaee-api + 7.0 + provided + + + org.hibernate + hibernate-envers + 4.3.5.Final + + + + 1.7 + 1.7 + false + + \ No newline at end of file diff --git a/src/it/dependency test/dependent/src/main/java/dependent/DependentEntity.java b/src/it/dependency test/dependent/src/main/java/dependent/DependentEntity.java new file mode 100644 index 00000000..16bc4044 --- /dev/null +++ b/src/it/dependency test/dependent/src/main/java/dependent/DependentEntity.java @@ -0,0 +1,17 @@ +package dependent; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; + +import org.hibernate.envers.Audited; + +@Entity +@Audited +public class DependentEntity { + @Id + @GeneratedValue + long id; + + String name; +} diff --git a/src/it/dependency test/h4mp/pom.xml b/src/it/dependency test/h4mp/pom.xml new file mode 100644 index 00000000..4e179d25 --- /dev/null +++ b/src/it/dependency test/h4mp/pom.xml @@ -0,0 +1,85 @@ + + 4.0.0 + de.cege + h4mp + 0.0.1-SNAPSHOT + war + h4mp + + + + javax + javaee-api + 7.0 + provided + + + org.hibernate + hibernate-envers + 4.3.5.Final + + + + junit + junit + 4.8.2 + test + + + org.apache.derby + derby + 10.10.1.1 + test + + + org.hibernate + hibernate-entitymanager + 4.3.5.Final + test + + + org.slf4j + slf4j-simple + 1.5.8 + test + + + + de.cege + dependent + 0.0.1 + + + + 1.7 + 1.7 + false + + + + + + de.juplo + hibernate4-maven-plugin + @project.version@ + + + + export + + + + + NONE + true + true + ; + true + CREATE + org.hibernate.dialect.PostgreSQL9Dialect + + + + + diff --git a/src/it/dependency test/h4mp/src/main/java/h4mp/MainEntity.java b/src/it/dependency test/h4mp/src/main/java/h4mp/MainEntity.java new file mode 100644 index 00000000..f717d175 --- /dev/null +++ b/src/it/dependency test/h4mp/src/main/java/h4mp/MainEntity.java @@ -0,0 +1,21 @@ +package h4mp; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.ManyToOne; + +import org.hibernate.envers.Audited; + +import dependent.DependentEntity; + +@Entity +@Audited +public class MainEntity { + @Id + @GeneratedValue + long id; + + @ManyToOne + DependentEntity dependentEntity; +} diff --git a/src/it/dependency test/h4mp/src/main/resources/META-INF/persistence.xml b/src/it/dependency test/h4mp/src/main/resources/META-INF/persistence.xml new file mode 100644 index 00000000..a419eda9 --- /dev/null +++ b/src/it/dependency test/h4mp/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,17 @@ + + + + java:jboss/datasources/PostgreSQLDS + + dependent.DependentEntity + + + + + + + diff --git a/src/it/dependency test/h4mp/src/test/java/h4mp/MainEntityTest.java b/src/it/dependency test/h4mp/src/test/java/h4mp/MainEntityTest.java new file mode 100644 index 00000000..32e528fe --- /dev/null +++ b/src/it/dependency test/h4mp/src/test/java/h4mp/MainEntityTest.java @@ -0,0 +1,49 @@ +package h4mp; + +import static org.junit.Assert.*; +import static org.hamcrest.core.Is.*; + +import java.util.List; + +import javax.persistence.EntityManager; +import javax.persistence.EntityTransaction; +import javax.persistence.Persistence; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import dependent.DependentEntity; + +public class MainEntityTest { + + private EntityManager em; + private EntityTransaction transaction; + + @Before + public void initializeDependencies() { + em = Persistence.createEntityManagerFactory("jpaIntegrationTest") + .createEntityManager(); + transaction = em.getTransaction(); + } + + @SuppressWarnings({ "rawtypes" }) + @Test + public void test() { + DependentEntity entity = new DependentEntity(); + + transaction.begin(); + em.persist(entity); + transaction.commit(); + + List resultList = em.createNativeQuery( + "select * from dependententity_aud").getResultList(); + assertThat(resultList.size(), is(1)); + } + + @After + public void after() { + em.close(); + } + +} diff --git a/src/it/dependency test/h4mp/src/test/resources/META-INF/persistence.xml b/src/it/dependency test/h4mp/src/test/resources/META-INF/persistence.xml new file mode 100644 index 00000000..83e13de6 --- /dev/null +++ b/src/it/dependency test/h4mp/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,23 @@ + + + + + dependent.DependentEntity + h4mp.MainEntity + + + + + + + + + + + + diff --git a/src/it/dependency test/pom.xml b/src/it/dependency test/pom.xml new file mode 100644 index 00000000..8e1506ed --- /dev/null +++ b/src/it/dependency test/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + de.juplo + dependency-test + Hibernate 4 Dependency-Test + 0.1-SNAPSHOT + pom + + dependent + h4mp + + diff --git a/src/it/dependency-test/dependent/pom.xml b/src/it/dependency-test/dependent/pom.xml deleted file mode 100644 index e7c15f39..00000000 --- a/src/it/dependency-test/dependent/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - 4.0.0 - de.cege - dependent - 0.0.1 - - - - javax - javaee-api - 7.0 - provided - - - org.hibernate - hibernate-envers - 4.3.5.Final - - - - 1.7 - 1.7 - false - - \ No newline at end of file diff --git a/src/it/dependency-test/dependent/src/main/java/dependent/DependentEntity.java b/src/it/dependency-test/dependent/src/main/java/dependent/DependentEntity.java deleted file mode 100644 index 16bc4044..00000000 --- a/src/it/dependency-test/dependent/src/main/java/dependent/DependentEntity.java +++ /dev/null @@ -1,17 +0,0 @@ -package dependent; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -import org.hibernate.envers.Audited; - -@Entity -@Audited -public class DependentEntity { - @Id - @GeneratedValue - long id; - - String name; -} diff --git a/src/it/dependency-test/h4mp/pom.xml b/src/it/dependency-test/h4mp/pom.xml deleted file mode 100644 index 4e179d25..00000000 --- a/src/it/dependency-test/h4mp/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - 4.0.0 - de.cege - h4mp - 0.0.1-SNAPSHOT - war - h4mp - - - - javax - javaee-api - 7.0 - provided - - - org.hibernate - hibernate-envers - 4.3.5.Final - - - - junit - junit - 4.8.2 - test - - - org.apache.derby - derby - 10.10.1.1 - test - - - org.hibernate - hibernate-entitymanager - 4.3.5.Final - test - - - org.slf4j - slf4j-simple - 1.5.8 - test - - - - de.cege - dependent - 0.0.1 - - - - 1.7 - 1.7 - false - - - - - - de.juplo - hibernate4-maven-plugin - @project.version@ - - - - export - - - - - NONE - true - true - ; - true - CREATE - org.hibernate.dialect.PostgreSQL9Dialect - - - - - diff --git a/src/it/dependency-test/h4mp/src/main/java/h4mp/MainEntity.java b/src/it/dependency-test/h4mp/src/main/java/h4mp/MainEntity.java deleted file mode 100644 index f717d175..00000000 --- a/src/it/dependency-test/h4mp/src/main/java/h4mp/MainEntity.java +++ /dev/null @@ -1,21 +0,0 @@ -package h4mp; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToOne; - -import org.hibernate.envers.Audited; - -import dependent.DependentEntity; - -@Entity -@Audited -public class MainEntity { - @Id - @GeneratedValue - long id; - - @ManyToOne - DependentEntity dependentEntity; -} diff --git a/src/it/dependency-test/h4mp/src/main/resources/META-INF/persistence.xml b/src/it/dependency-test/h4mp/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index a419eda9..00000000 --- a/src/it/dependency-test/h4mp/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - java:jboss/datasources/PostgreSQLDS - - dependent.DependentEntity - - - - - - - diff --git a/src/it/dependency-test/h4mp/src/test/java/h4mp/MainEntityTest.java b/src/it/dependency-test/h4mp/src/test/java/h4mp/MainEntityTest.java deleted file mode 100644 index 32e528fe..00000000 --- a/src/it/dependency-test/h4mp/src/test/java/h4mp/MainEntityTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package h4mp; - -import static org.junit.Assert.*; -import static org.hamcrest.core.Is.*; - -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import dependent.DependentEntity; - -public class MainEntityTest { - - private EntityManager em; - private EntityTransaction transaction; - - @Before - public void initializeDependencies() { - em = Persistence.createEntityManagerFactory("jpaIntegrationTest") - .createEntityManager(); - transaction = em.getTransaction(); - } - - @SuppressWarnings({ "rawtypes" }) - @Test - public void test() { - DependentEntity entity = new DependentEntity(); - - transaction.begin(); - em.persist(entity); - transaction.commit(); - - List resultList = em.createNativeQuery( - "select * from dependententity_aud").getResultList(); - assertThat(resultList.size(), is(1)); - } - - @After - public void after() { - em.close(); - } - -} diff --git a/src/it/dependency-test/h4mp/src/test/resources/META-INF/persistence.xml b/src/it/dependency-test/h4mp/src/test/resources/META-INF/persistence.xml deleted file mode 100644 index 83e13de6..00000000 --- a/src/it/dependency-test/h4mp/src/test/resources/META-INF/persistence.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - dependent.DependentEntity - h4mp.MainEntity - - - - - - - - - - - - diff --git a/src/it/dependency-test/pom.xml b/src/it/dependency-test/pom.xml deleted file mode 100644 index 8e1506ed..00000000 --- a/src/it/dependency-test/pom.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - 4.0.0 - de.juplo - dependency-test - Hibernate 4 Dependency-Test - 0.1-SNAPSHOT - pom - - dependent - h4mp - -