CCM NG: Several adjustments for the POM, especially depencencies and plugin versions

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3597 8810af33-2d31-482b-a856-94f89814c4df
pull/2/head
jensp 2015-09-02 15:49:44 +00:00
parent ac7e995af0
commit 1c7a7af8cb
14 changed files with 2423 additions and 31 deletions

View File

@ -708,7 +708,7 @@
</build> </build>
</profile> </profile>
<profile> <!--<profile>
<id>wildfly8-embedded</id> <id>wildfly8-embedded</id>
<dependencies> <dependencies>
<dependency> <dependency>
@ -820,7 +820,108 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>-->
<!--<profile>
<id>wildfly8-managed-h2-mem</id>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>8.2.1.Final</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>0.7.4.201502262128</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/test/resources-wildfly8-managed-h2-mem</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-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>8.2.1.Final</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</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>
</systemPropertyVariables>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
<groups>
org.libreccm.tests.categories.UnitTest,
org.libreccm.tests.categories.IntegrationTest
</groups>
</configuration>
</plugin>
</plugins>
</build>
</profile>-->
<profile> <profile>
<id>wildfly8-remote-h2-mem</id> <id>wildfly8-remote-h2-mem</id>
@ -828,13 +929,13 @@
<dependency> <dependency>
<groupId>org.wildfly</groupId> <groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId> <artifactId>wildfly-arquillian-container-remote</artifactId>
<version>8.2.0.Final</version> <!--<version>8.2.1.Final</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId> <artifactId>org.jacoco.core</artifactId>
<version>0.7.4.201502262128</version> <!--<version>0.7.5.201505241946</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!--<dependency> <!--<dependency>
@ -912,13 +1013,13 @@
<dependency> <dependency>
<groupId>org.wildfly</groupId> <groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId> <artifactId>wildfly-arquillian-container-remote</artifactId>
<version>8.2.0.Final</version> <!--<version>8.2.1.Final</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId> <artifactId>org.jacoco.core</artifactId>
<version>0.7.4.201502262128</version> <!--<version>0.7.5.201505241946</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!--<dependency> <!--<dependency>
@ -996,13 +1097,13 @@
<dependency> <dependency>
<groupId>org.wildfly</groupId> <groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId> <artifactId>wildfly-arquillian-container-remote</artifactId>
<version>8.2.0.Final</version> <!--<version>8.2.1.Final</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId> <artifactId>org.jacoco.core</artifactId>
<version>0.7.4.201502262128</version> <!--<version>0.7.5.201505241946</version>-->
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!--<dependency> <!--<dependency>

View File

@ -99,7 +99,7 @@ public class Domain extends CcmObject implements Serializable {
* http://example.org/domains/example-nav * http://example.org/domains/example-nav
* </pre> * </pre>
*/ */
@Column(name = "uri", nullable = false, unique = true, length = 2048) @Column(name = "uri", nullable = false, unique = true, length = 1024)
@Convert(converter = UriConverter.class) @Convert(converter = UriConverter.class)
@NotBlank @NotBlank
@URL @URL

View File

@ -39,14 +39,31 @@ public class InstalledModule implements Serializable {
private static final long serialVersionUID = 6240025652113643164L; private static final long serialVersionUID = 6240025652113643164L;
/**
* ID of the installed module. By convention the hash code of the module's
* class name is used (@code{getModuleClassName().hashCode()}). We would use
* the {@code moduleClassName} directly but not all databases (MySQL in
* particular) accept long varchar fields as primary keys.
*/
@Id @Id
@Column(name = "module_class_name", length = 2048) @Column(name = "module_id")
private int moduleId;
@Column(name = "module_class_name", length = 2048, unique = true)
private String moduleClassName; private String moduleClassName;
@Column @Column
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
private ModuleStatus status; private ModuleStatus status;
public int getModuleId() {
return moduleId;
}
public void setModuleId(final int moduleId) {
this.moduleId = moduleId;
}
public String getModuleClassName() { public String getModuleClassName() {
return moduleClassName; return moduleClassName;
} }

View File

@ -65,7 +65,7 @@ public class Digest extends CcmObject implements Serializable {
@Column(name = "header", length = 4096, nullable = false) @Column(name = "header", length = 4096, nullable = false)
private String header; private String header;
@Column(name = "separator", length = 128, nullable = false) @Column(name = "digest_separator", length = 128, nullable = false)
private String separator; private String separator;
@Column(name = "signature", length = 4096, nullable = false) @Column(name = "signature", length = 4096, nullable = false)

View File

@ -0,0 +1,47 @@
<?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>
<!--<defaultProtocol type="Servlet 3.0"/>-->
<!--<property name="javaVmArguments">
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
</property>-->
<container qualifier="arquillian-wildfly8-managed">
<configuration>
<property name="jbossHome">target/wildfly-8.2.1.Final</property>
<property name="modulePath">target/wildfly-8.2.1.Final</property>
</configuration>
</container>
<extension qualifier="persistence">
<property name="defaultDataSource">java:/jboss/datasources/ExampleDS</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>
<property name="qualifiedTableNames">true</property>
</extension>
<extension qualifier="persistence-script">
<property name="scriptsToExecuteAfterTest">scripts/h2-cleanup.sql</property>
</extension>
</arquillian>

View File

@ -0,0 +1,40 @@
<?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:/jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value=""/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.connection.autocommit" value="false" />
<!--
Properties for Hibernate Envers
We are using the ValidityAuditStrategy here because it is faster
when querying data than the DefaultStrategy
-->
<property name="org.hibernate.envers.audit_strategy"
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
</properties>
</persistence-unit>
</persistence>

View File

@ -29,6 +29,7 @@
<property name="defaultDataSetFormat">json</property> <property name="defaultDataSetFormat">json</property>
<property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property> <property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property>
<property name="excludePoi">true</property> <property name="excludePoi">true</property>
<property name="qualifiedTableNames">true</property>
</extension> </extension>
<extension qualifier="persistence-script"> <extension qualifier="persistence-script">

View File

@ -22,7 +22,7 @@
<jta-data-source>java:/comp/env/jdbc/org/libreccm/ccm-core/h2-mem</jta-data-source> <jta-data-source>java:/comp/env/jdbc/org/libreccm/ccm-core/h2-mem</jta-data-source>
<properties> <properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.hbm2ddl.auto" value=""/>
<property name="hibernate.show_sql" value="true"/> <property name="hibernate.show_sql" value="true"/>
<property name="hibernate.id.new_generator_mappings" value="true"/> <property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.connection.autocommit" value="false" /> <property name="hibernate.connection.autocommit" value="false" />

View File

@ -28,6 +28,7 @@
<property name="defaultDataSetFormat">json</property> <property name="defaultDataSetFormat">json</property>
<!--<property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property>--> <!--<property name="datatypeFactory">org.dbunit.ext.h2.H2DataTypeFactory</property>-->
<property name="excludePoi">true</property> <property name="excludePoi">true</property>
<property name="qualifiedTableNames">true</property>
</extension> </extension>
<extension qualifier="persistence-script"> <extension qualifier="persistence-script">

View File

@ -60,7 +60,7 @@
create table ccm_core.category_domains ( create table ccm_core.category_domains (
domain_key varchar(255) not null, domain_key varchar(255) not null,
released datetime, released datetime,
uri varchar(2048) not null, uri varchar(768) not null,
version varchar(255) not null, version varchar(255) not null,
object_id bigint not null, object_id bigint not null,
root_category_id bigint, root_category_id bigint,
@ -132,7 +132,7 @@
frequency integer, frequency integer,
header varchar(4096) not null, header varchar(4096) not null,
next_run datetime, next_run datetime,
separator varchar(128) not null, digest_separator varchar(128) not null,
signature varchar(4096) not null, signature varchar(4096) not null,
subject varchar(255) not null, subject varchar(255) not null,
object_id bigint not null, object_id bigint not null,
@ -353,9 +353,10 @@
) ENGINE=InnoDB; ) ENGINE=InnoDB;
create table ccm_core.installed_modules ( create table ccm_core.installed_modules (
module_id integer not null,
module_class_name varchar(2048) not null, module_class_name varchar(2048) not null,
status varchar(255), status varchar(255),
primary key (module_class_name) primary key (module_id)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
create table ccm_core.lucene_documents ( create table ccm_core.lucene_documents (
@ -599,6 +600,9 @@
alter table ccm_core.hosts alter table ccm_core.hosts
add constraint UK_2m0m4m0dhx256d04x2cg3194s unique (server_name, server_port); add constraint UK_2m0m4m0dhx256d04x2cg3194s unique (server_name, server_port);
alter table ccm_core.installed_modules
add constraint UK_c2ix7lp01ypyb6jf7b1ieptlm unique (module_class_name);
alter table ccm_core.workflow_user_task_assigned_groups alter table ccm_core.workflow_user_task_assigned_groups
add constraint UK_g58x45aybw2yjtwnr9b9itg6c unique (assigned_group_id); add constraint UK_g58x45aybw2yjtwnr9b9itg6c unique (assigned_group_id);

View File

@ -59,7 +59,7 @@ CREATE SCHEMA ccm_core;
create table ccm_core.category_domains ( create table ccm_core.category_domains (
domain_key varchar(255) not null, domain_key varchar(255) not null,
released timestamp, released timestamp,
uri varchar(2048) not null, uri varchar(1024) not null,
version varchar(255) not null, version varchar(255) not null,
object_id int8 not null, object_id int8 not null,
root_category_id int8, root_category_id int8,
@ -131,7 +131,7 @@ CREATE SCHEMA ccm_core;
frequency int4, frequency int4,
header varchar(4096) not null, header varchar(4096) not null,
next_run timestamp, next_run timestamp,
separator varchar(128) not null, digest_separator varchar(128) not null,
signature varchar(4096) not null, signature varchar(4096) not null,
subject varchar(255) not null, subject varchar(255) not null,
object_id int8 not null, object_id int8 not null,
@ -352,9 +352,10 @@ CREATE SCHEMA ccm_core;
); );
create table ccm_core.installed_modules ( create table ccm_core.installed_modules (
module_class_name varchar(2048) not null, module_id int4 not null,
module_class_name varchar(2048),
status varchar(255), status varchar(255),
primary key (module_class_name) primary key (module_id)
); );
create table ccm_core.lucene_documents ( create table ccm_core.lucene_documents (
@ -598,6 +599,9 @@ CREATE SCHEMA ccm_core;
alter table ccm_core.hosts alter table ccm_core.hosts
add constraint UK_2m0m4m0dhx256d04x2cg3194s unique (server_name, server_port); add constraint UK_2m0m4m0dhx256d04x2cg3194s unique (server_name, server_port);
alter table ccm_core.installed_modules
add constraint UK_c2ix7lp01ypyb6jf7b1ieptlm unique (module_class_name);
alter table ccm_core.workflow_user_task_assigned_groups alter table ccm_core.workflow_user_task_assigned_groups
add constraint UK_g58x45aybw2yjtwnr9b9itg6c unique (assigned_group_id); add constraint UK_g58x45aybw2yjtwnr9b9itg6c unique (assigned_group_id);

21
pom.xml
View File

@ -208,13 +208,13 @@
<plugin> <plugin>
<groupId>de.jpdigital</groupId> <groupId>de.jpdigital</groupId>
<artifactId>hibernate4-ddl-maven-plugin</artifactId> <artifactId>hibernate4-ddl-maven-plugin</artifactId>
<version>1.0.0-alpha.2</version> <version>1.0.0-beta.1</version>
</plugin> </plugin>
<plugin> <!--<plugin>
<groupId>org.jboss.tattletale</groupId> <groupId>org.jboss.tattletale</groupId>
<artifactId>tattletale-maven</artifactId> <artifactId>tattletale-maven</artifactId>
<version>1.1.2.Final</version> <version>1.1.2.Final</version>
</plugin> </plugin>-->
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
@ -453,7 +453,22 @@
<artifactId>arquillian-persistence-dbunit</artifactId> <artifactId>arquillian-persistence-dbunit</artifactId>
<version>1.0.0.Alpha7</version> <version>1.0.0.Alpha7</version>
</dependency> </dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
<version>8.2.1.Final</version>
<scope>test</scope>
</dependency>
<!--
JaCoCo is used to measure the test coverage
-->
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>0.7.5.201505241946</version>
<scope>test</scope>
</dependency>
<!-- <!--
Hamcrest provides nice Matchers for JUnit test, making the Hamcrest provides nice Matchers for JUnit test, making the