CCM NG: Profile for using a Wildfly and a MySQL/MariaDB database
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3480 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
1499a8661b
commit
18de6cdf3d
|
|
@ -742,6 +742,90 @@
|
|||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>wildfly8-remote-mysql</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-mysql</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>
|
||||
|
||||
</project>
|
||||
|
|
@ -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/mysql/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/mysql/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>
|
||||
Loading…
Reference in New Issue