CCM NG: Profiles for remote tests, some refinements
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3478 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
09169249ea
commit
92d49dc9f0
111
ccm-core/pom.xml
111
ccm-core/pom.xml
|
|
@ -420,7 +420,7 @@
|
||||||
<param>postgresql9</param>
|
<param>postgresql9</param>
|
||||||
</dialects>
|
</dialects>
|
||||||
<packages>
|
<packages>
|
||||||
<param>de.jpdigital.research.accessibilitystudy</param>
|
<param>org.libreccm</param>
|
||||||
</packages>
|
</packages>
|
||||||
<useEnvers>true</useEnvers>
|
<useEnvers>true</useEnvers>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -480,11 +480,11 @@
|
||||||
<version>0.7.5.201505241946</version>
|
<version>0.7.5.201505241946</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
<artifactId>arquillian-jacoco</artifactId>
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
<version>1.0.0.Alpha8</version>
|
<version>1.0.0.Alpha8</version>
|
||||||
</dependency>-->
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -495,6 +495,9 @@
|
||||||
<testResource>
|
<testResource>
|
||||||
<directory>src/test/resources-wildfly8-embedded</directory>
|
<directory>src/test/resources-wildfly8-embedded</directory>
|
||||||
</testResource>
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
</testResources>
|
</testResources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
@ -508,7 +511,7 @@
|
||||||
<param>postgresql9</param>
|
<param>postgresql9</param>
|
||||||
</dialects>
|
</dialects>
|
||||||
<packages>
|
<packages>
|
||||||
<param>de.jpdigital.research.accessibilitystudy</param>
|
<param>org.libreccm</param>
|
||||||
</packages>
|
</packages>
|
||||||
<useEnvers>true</useEnvers>
|
<useEnvers>true</useEnvers>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -586,20 +589,23 @@
|
||||||
<version>0.7.4.201502262128</version>
|
<version>0.7.4.201502262128</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.jboss.arquillian.extension</groupId>
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
<artifactId>arquillian-jacoco</artifactId>
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
<version>1.0.0.Alpha7</version>
|
<version>1.0.0.Alpha8</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<testResources>
|
<testResources>
|
||||||
<testResource>
|
<testResource>
|
||||||
<directory>/src/test/resources</directory>
|
<directory>src/test/resources</directory>
|
||||||
</testResource>
|
</testResource>
|
||||||
<testResource>
|
<testResource>
|
||||||
<directory>/src/test/resources-wildfly8-remote-h2-mem</directory>
|
<directory>src/test/resources-wildfly8-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
</testResource>
|
</testResource>
|
||||||
</testResources>
|
</testResources>
|
||||||
|
|
||||||
|
|
@ -614,7 +620,7 @@
|
||||||
<param>postgresql9</param>
|
<param>postgresql9</param>
|
||||||
</dialects>
|
</dialects>
|
||||||
<packages>
|
<packages>
|
||||||
<param>de.jpdigital.research.accessibilitystudy</param>
|
<param>org.libreccm</param>
|
||||||
</packages>
|
</packages>
|
||||||
<useEnvers>true</useEnvers>
|
<useEnvers>true</useEnvers>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -651,6 +657,91 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly8-remote-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<version>8.2.0.Final</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<version>0.7.4.201502262128</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>-->
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly8-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate4-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>mysql5_innodb</param>
|
||||||
|
<param>postgresql9</param>
|
||||||
|
</dialects>
|
||||||
|
<packages>
|
||||||
|
<param>org.libreccm</param>
|
||||||
|
</packages>
|
||||||
|
<useEnvers>true</useEnvers>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>gen-ddl</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.18.1</version>
|
||||||
|
<configuration>
|
||||||
|
<forkMode>always</forkMode>
|
||||||
|
<forkCount>999</forkCount>
|
||||||
|
<reuseForks>true</reuseForks>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
|
||||||
|
<jboss.home>${project.basedir}/target/wildfly-8.2.0.Final</jboss.home>
|
||||||
|
<module.path>${project.basedir}/target/wildfly-8.2.0.Final/modules</module.path>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||||
|
<groups>
|
||||||
|
org.libreccm.tests.categories.UnitTest,
|
||||||
|
org.libreccm.tests.categories.IntegrationTest
|
||||||
|
</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -62,7 +62,7 @@ import org.omg.CORBA.DomainManager;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "domains")
|
@Table(name = "category_domains")
|
||||||
public class Domain extends CcmObject implements Serializable {
|
public class Domain extends CcmObject implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4012590760598188732L;
|
private static final long serialVersionUID = 4012590760598188732L;
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,9 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "user_groups")
|
@Table(name = "ccm_groups")
|
||||||
@XmlRootElement(name = "user-group", namespace = CORE_XML_NS)
|
@XmlRootElement(name = "user-group", namespace = CORE_XML_NS)
|
||||||
public class UserGroup extends Party implements Serializable {
|
public class Group extends Party implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -5555063356689597270L;
|
private static final long serialVersionUID = -5555063356689597270L;
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ public class UserGroup extends Party implements Serializable {
|
||||||
@XmlElement(name = "group-membership", namespace = CORE_XML_NS)
|
@XmlElement(name = "group-membership", namespace = CORE_XML_NS)
|
||||||
private List<GroupMembership> members;
|
private List<GroupMembership> members;
|
||||||
|
|
||||||
public UserGroup() {
|
public Group() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
roles = new ArrayList<>();
|
roles = new ArrayList<>();
|
||||||
|
|
@ -136,10 +136,10 @@ public class UserGroup extends Party implements Serializable {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!(obj instanceof UserGroup)) {
|
if (!(obj instanceof Group)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final UserGroup other = (UserGroup) obj;
|
final Group other = (Group) obj;
|
||||||
if (!other.canEqual(this)) {
|
if (!other.canEqual(this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +152,7 @@ public class UserGroup extends Party implements Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEqual(final Object obj) {
|
public boolean canEqual(final Object obj) {
|
||||||
return obj instanceof UserGroup;
|
return obj instanceof Group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -55,7 +55,7 @@ public class GroupMembership implements Serializable {
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
private UserGroup group;
|
private Group group;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
|
|
@ -69,11 +69,11 @@ public class GroupMembership implements Serializable {
|
||||||
this.membershipId = membershipId;
|
this.membershipId = membershipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserGroup getGroup() {
|
public Group getGroup() {
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setGroup(final UserGroup group) {
|
protected void setGroup(final Group group) {
|
||||||
this.group = group;
|
this.group = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import org.hibernate.validator.constraints.NotBlank;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "roles")
|
@Table(name = "ccm_roles")
|
||||||
@SuppressWarnings("PMD.ShortClassName") //Role is perfectly fine name.
|
@SuppressWarnings("PMD.ShortClassName") //Role is perfectly fine name.
|
||||||
public class Role implements Serializable {
|
public class Role implements Serializable {
|
||||||
|
|
||||||
|
|
@ -51,10 +51,10 @@ public class Role implements Serializable {
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private UserGroup sourceGroup;
|
private Group sourceGroup;
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne
|
||||||
private UserGroup implicitGroup;
|
private Group implicitGroup;
|
||||||
|
|
||||||
@Column(name = "description")
|
@Column(name = "description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
@ -79,19 +79,19 @@ public class Role implements Serializable {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserGroup getSourceGroup() {
|
public Group getSourceGroup() {
|
||||||
return sourceGroup;
|
return sourceGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setSourceGroup(final UserGroup sourceGroup) {
|
protected void setSourceGroup(final Group sourceGroup) {
|
||||||
this.sourceGroup = sourceGroup;
|
this.sourceGroup = sourceGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserGroup getImplicitGroup() {
|
public Group getImplicitGroup() {
|
||||||
return implicitGroup;
|
return implicitGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setImplicitGroup(final UserGroup implicitGroup) {
|
protected void setImplicitGroup(final Group implicitGroup) {
|
||||||
this.implicitGroup = implicitGroup;
|
this.implicitGroup = implicitGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ import javax.xml.bind.annotation.XmlTransient;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "users")
|
@Table(name = "ccm_users")
|
||||||
@XmlRootElement(name = "user", namespace = CORE_XML_NS)
|
@XmlRootElement(name = "user", namespace = CORE_XML_NS)
|
||||||
//Supressing a few warnings from PMD because they misleading here.
|
//Supressing a few warnings from PMD because they misleading here.
|
||||||
//User is perfectly fine class name, and the complexity is not to high...
|
//User is perfectly fine class name, and the complexity is not to high...
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
package org.libreccm.web;
|
package org.libreccm.web;
|
||||||
|
|
||||||
import org.libreccm.core.Resource;
|
import org.libreccm.core.Resource;
|
||||||
import org.libreccm.core.UserGroup;
|
import org.libreccm.core.Group;
|
||||||
import org.libreccm.jpa.utils.UriConverter;
|
import org.libreccm.jpa.utils.UriConverter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -49,7 +49,7 @@ public class Application extends Resource implements Serializable {
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "container_group_id")
|
@JoinColumn(name = "container_group_id")
|
||||||
private UserGroup containerGroup;
|
private Group containerGroup;
|
||||||
|
|
||||||
public URI getPrimaryUrl() {
|
public URI getPrimaryUrl() {
|
||||||
return primaryUrl;
|
return primaryUrl;
|
||||||
|
|
@ -59,11 +59,11 @@ public class Application extends Resource implements Serializable {
|
||||||
this.primaryUrl = primaryUrl;
|
this.primaryUrl = primaryUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserGroup getContainerGroup() {
|
public Group getContainerGroup() {
|
||||||
return containerGroup;
|
return containerGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContainerGroup(final UserGroup containerGroup) {
|
public void setContainerGroup(final Group containerGroup) {
|
||||||
this.containerGroup = containerGroup;
|
this.containerGroup = containerGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
package org.libreccm.workflow;
|
package org.libreccm.workflow;
|
||||||
|
|
||||||
import org.libreccm.core.User;
|
import org.libreccm.core.User;
|
||||||
import org.libreccm.core.UserGroup;
|
import org.libreccm.core.Group;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -89,7 +89,7 @@ public class UserTask extends Task implements Serializable {
|
||||||
@JoinColumn(name = "user_task_id")},
|
@JoinColumn(name = "user_task_id")},
|
||||||
inverseJoinColumns = {
|
inverseJoinColumns = {
|
||||||
@JoinColumn(name = "assigned_group_id")})
|
@JoinColumn(name = "assigned_group_id")})
|
||||||
private List<UserGroup> assignedGroups;
|
private List<Group> assignedGroups;
|
||||||
|
|
||||||
public UserTask() {
|
public UserTask() {
|
||||||
super();
|
super();
|
||||||
|
|
@ -182,7 +182,7 @@ public class UserTask extends Task implements Serializable {
|
||||||
assignedUsers.remove(user);
|
assignedUsers.remove(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UserGroup> getAssignedGroups() {
|
public List<Group> getAssignedGroups() {
|
||||||
if (assignedGroups == null) {
|
if (assignedGroups == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -190,15 +190,15 @@ public class UserTask extends Task implements Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setAssignedGroups(final List<UserGroup> assignedGroups) {
|
protected void setAssignedGroups(final List<Group> assignedGroups) {
|
||||||
this.assignedGroups = assignedGroups;
|
this.assignedGroups = assignedGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addAssignedGroup(final UserGroup group) {
|
protected void addAssignedGroup(final Group group) {
|
||||||
assignedGroups.add(group);
|
assignedGroups.add(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeAssignedGroup(final UserGroup group) {
|
protected void removeAssignedGroup(final Group group) {
|
||||||
assignedGroups.remove(group);
|
assignedGroups.remove(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class EqualsAndHashCodeTest extends EqualsVerifier {
|
||||||
Privilege.class,
|
Privilege.class,
|
||||||
Role.class,
|
Role.class,
|
||||||
User.class,
|
User.class,
|
||||||
UserGroup.class});
|
Group.class});
|
||||||
}
|
}
|
||||||
|
|
||||||
public EqualsAndHashCodeTest(final Class<?> entityClass) {
|
public EqualsAndHashCodeTest(final Class<?> entityClass) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class ToStringTest extends ToStringVerifier {
|
||||||
Resource.class,
|
Resource.class,
|
||||||
Role.class,
|
Role.class,
|
||||||
User.class,
|
User.class,
|
||||||
UserGroup.class});
|
Group.class});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ToStringTest(final Class<?> entityClass) {
|
public ToStringTest(final Class<?> entityClass) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
-->
|
-->
|
||||||
<property name="defaultCleanupPhase">NONE</property>
|
<property name="defaultCleanupPhase">NONE</property>
|
||||||
|
|
||||||
<property name="dumpData">false</property>
|
<property name="dumpData">true</property>
|
||||||
<property name="dumpDirectory">target</property>
|
<property name="dumpDirectory">target</property>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</property>-->
|
</property>-->
|
||||||
|
|
||||||
<extension qualifier="persistence">
|
<extension qualifier="persistence">
|
||||||
<property name="defaultDataSource">java:/comp/env/jdbc/ccm-core-test/h2/mem</property>
|
<property name="defaultDataSource">java:/comp/env/jdbc/ccm/h2-mem/ccm-core</property>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Disable automatic cleanup, does not work because of referential
|
Disable automatic cleanup, does not work because of referential
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
-->
|
-->
|
||||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||||
|
|
||||||
<jta-data-source>java:/comp/env/jdbc/ccm-core-test/h2/mem</jta-data-source>
|
<jta-data-source>java:/comp/env/jdbc/ccm/h2-mem/ccm-core</jta-data-source>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
|
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
|
||||||
<property name="hibernate.show_sql" value="true"/>
|
<property name="hibernate.show_sql" value="true"/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<arquillian xmlns="http://jboss.org/schema/arquillian"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://jboss.org/schema/arquillian
|
||||||
|
http://jboss.org/schema/arquillian/arquillian_1_0.xsd" >
|
||||||
|
|
||||||
|
<engine>
|
||||||
|
<property name="deploymentExportPath">target/deployments</property>
|
||||||
|
</engine>
|
||||||
|
|
||||||
|
<extension qualifier="persistence">
|
||||||
|
<property name="defaultDataSource">java:/comp/env/jdbc/ccm/pgsql/ccm-core</property>
|
||||||
|
<!--<property name="javaVmArguments">
|
||||||
|
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
|
||||||
|
</property>-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Disable automatic cleanup, does not work because of referential
|
||||||
|
integrity constrains.
|
||||||
|
-->
|
||||||
|
<property name="defaultCleanupPhase">NONE</property>
|
||||||
|
|
||||||
|
<property name="dumpData">true</property>
|
||||||
|
<property name="dumpDirectory">target</property>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension qualifier="persistence-dbunit">
|
||||||
|
<property name="defaultDataSetFormat">json</property>
|
||||||
|
<!--<property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property>-->
|
||||||
|
<property name="excludePoi">true</property>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
<extension qualifier="persistence-script">
|
||||||
|
<property name="scriptsToExecuteAfterTest">scripts/pgsql-cleanup.sql</property>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
|
||||||
|
</arquillian>
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
author: Jens Pelzetter
|
||||||
|
-->
|
||||||
|
|
||||||
|
<persistence
|
||||||
|
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
|
||||||
|
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
|
||||||
|
version="2.1">
|
||||||
|
|
||||||
|
<persistence-unit name="LibreCCM" transaction-type="JTA">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Enforce JPA provider
|
||||||
|
Not really necessary here because we don't use any Hibernate
|
||||||
|
specific features, but makes it easier to manage to database
|
||||||
|
creation scripts.
|
||||||
|
-->
|
||||||
|
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||||
|
|
||||||
|
<jta-data-source>java:/comp/env/jdbc/ccm/pgsql/ccm-core</jta-data-source>
|
||||||
|
<properties>
|
||||||
|
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
|
||||||
|
<property name="hibernate.show_sql" value="true"/>
|
||||||
|
<property name="hibernate.id.new_generator_mappings" value="true"/>
|
||||||
|
<property name="hibernate.connection.autocommit" value="false" />
|
||||||
|
</properties>
|
||||||
|
</persistence-unit>
|
||||||
|
|
||||||
|
</persistence>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
DELETE FROM ccm_objects;
|
||||||
Loading…
Reference in New Issue