CCM NG: RESTful endpoints for the PageModel editor
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5424 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
fe76e79feb
commit
f00e149ebf
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-archetype-module</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>LibreCCM Module archetype</name>
|
||||||
|
<url>http://www.libreccm.org/devel/modules</url>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,215 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<!--<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>-->
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel</artifactId>
|
||||||
|
<relativePath>../ccm-bundle-devel</relativePath>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel-wildfly-swarm</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Devel Bundle for Wildfly Swarm</name>
|
||||||
|
<url>http://www.libreccm.org</url>
|
||||||
|
<distributionManagement>
|
||||||
|
<site>
|
||||||
|
<id>libreccm-site</id>
|
||||||
|
<name>LibreCCM</name>
|
||||||
|
<url>http://www.libreccm.org/project-sites/</url>
|
||||||
|
</site>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>LibreCCM Foundation</name>
|
||||||
|
</organization>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>LGPLv2 or newer</name>
|
||||||
|
<url>http://www.gnu.org/licenses/lgpl-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>bom-all</artifactId>
|
||||||
|
<version>2017.11.0</version>
|
||||||
|
<scope>import</scope>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>cdi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>container</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>datasources</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>ejb</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>hibernate-search</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>jaxrs</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>jaxrs-cdi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>jsf</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>logging</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>mail</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>undertow</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.1.4.jre7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>font-awesome</artifactId>
|
||||||
|
<version>4.7.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>requirejs</artifactId>
|
||||||
|
<version>2.3.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>requirejs-domready</artifactId>
|
||||||
|
<version>2.0.1-2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-bundle-devel-wildfly</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>wildfly-swarm-plugin</artifactId>
|
||||||
|
<!--<configuration>
|
||||||
|
<mainClass>org.libreccm.CcmBundleDevel</mainClass>
|
||||||
|
</configuration>-->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>package</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<overlays>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-editor</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-theme-foundry</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<includes>
|
||||||
|
<include>assets/</include>
|
||||||
|
<include>VAADIN/</include>
|
||||||
|
</includes>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<includes>
|
||||||
|
<include>templates/</include>
|
||||||
|
</includes>
|
||||||
|
</overlay>
|
||||||
|
</overlays>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel</artifactId>
|
||||||
|
<relativePath>../ccm-bundle-devel</relativePath>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel-wildfly-web</artifactId>
|
||||||
|
<!--<version>7.0.0-SNAPSHOT</version>-->
|
||||||
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Devel Bundle Web for Wildfly</name>
|
||||||
|
<url>http://www.libreccm.org/modules/web/wildfly</url>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>font-awesome</artifactId>
|
||||||
|
<version>4.7.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>requirejs</artifactId>
|
||||||
|
<version>2.3.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>requirejs-domready</artifactId>
|
||||||
|
<version>2.0.1-2</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>libreccm-web-wildfly</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<overlays>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-editor</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-theme-foundry</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<includes>
|
||||||
|
<include>assets/</include>
|
||||||
|
<include>VAADIN/</include>
|
||||||
|
</includes>
|
||||||
|
</overlay>
|
||||||
|
<overlay>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<includes>
|
||||||
|
<include>templates/</include>
|
||||||
|
</includes>
|
||||||
|
</overlay>
|
||||||
|
</overlays>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,205 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<wildfly.version>10.0.0.Final</wildfly.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel-wildfly</artifactId>
|
||||||
|
<!--<version>7.0.0-SNAPSHOT</version>-->
|
||||||
|
<packaging>ear</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Devel Bundle for Wildfly</name>
|
||||||
|
<url>http://www.libreccm.org/bundles/devel/wildfly</url>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel-wildfly-web</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>libreccm-devel-${project.version}</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<!-- Tell Maven we are using Java EE 7 -->
|
||||||
|
<version>7</version>
|
||||||
|
<!-- Use Java EE ear libraries as needed. Java EE ear libraries
|
||||||
|
are an easy way to package any libraries needed in the ear,
|
||||||
|
and automatically
|
||||||
|
have any modules (EJB-JARs and WARs) use them -->
|
||||||
|
<defaultLibBundleDir>lib</defaultLibBundleDir>
|
||||||
|
<fileNameMapping>no-version</fileNameMapping>
|
||||||
|
<modules>
|
||||||
|
<webModule>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel-wildfly-web</artifactId>
|
||||||
|
<contextRoot>/libreccm</contextRoot>
|
||||||
|
</webModule>
|
||||||
|
</modules>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<!-- Profiles for running the bundle in a development environment -->
|
||||||
|
<profiles>
|
||||||
|
|
||||||
|
<!-- Profile which uses a H2 database. The DB file is put into the
|
||||||
|
project build directory and therefore deleted when the clean phase
|
||||||
|
runs.
|
||||||
|
-->
|
||||||
|
<profile>
|
||||||
|
<id>h2</id>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<version>${wildfly.version}</version>
|
||||||
|
|
||||||
|
<skip>false</skip>
|
||||||
|
|
||||||
|
<add-user>
|
||||||
|
<users>
|
||||||
|
<user>
|
||||||
|
<username>admin</username>
|
||||||
|
<password>admin123</password>
|
||||||
|
</user>
|
||||||
|
</users>
|
||||||
|
</add-user>
|
||||||
|
|
||||||
|
<beforeDeployment>
|
||||||
|
<commands>
|
||||||
|
<command>data-source add --jndi-name=java:/comp/env/jdbc/libreccm/db --name=ccm-devel --connection-url=jdbc:h2:${project.build.directory}/libreccm-db;DB_CLOSE_ON_EXIT=FALSE --driver-name=h2 --driver-class=org.h2.Driver --user-name=sa --password=sa</command>
|
||||||
|
</commands>
|
||||||
|
</beforeDeployment>
|
||||||
|
|
||||||
|
<java-opts>
|
||||||
|
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt>
|
||||||
|
</java-opts>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Profile which uses a PostgreSQL datasource with a generic
|
||||||
|
configuration. When using this profile PostgreSQL must run on the
|
||||||
|
local system and a database with the name "libreccm-devel" which
|
||||||
|
is accessible by the user "ccm" with the password "ccm47web" must
|
||||||
|
exist.
|
||||||
|
-->
|
||||||
|
<profile>
|
||||||
|
<id>pgsql</id>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>9.4.1208</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<version>${wildfly.version}</version>
|
||||||
|
|
||||||
|
<skip>false</skip>
|
||||||
|
|
||||||
|
<add-user>
|
||||||
|
<users>
|
||||||
|
<user>
|
||||||
|
<username>admin</username>
|
||||||
|
<password>admin1234</password>
|
||||||
|
</user>
|
||||||
|
</users>
|
||||||
|
</add-user>
|
||||||
|
|
||||||
|
<beforeDeployment>
|
||||||
|
<commands>
|
||||||
|
<!--jdbc-drivers/postgresql-9.4.1208.jar-->
|
||||||
|
<command>module add --name=org.postgres --resources=${project.build.directory}/${project.build.finalName}/lib/postgresql.jar --dependencies=javax.api,javax.transaction.api</command>
|
||||||
|
<command>/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)</command>
|
||||||
|
<command>data-source add --jndi-name=java:/comp/env/jdbc/libreccm/db --name=libreccm-devel --connection-url=jdbc:postgresql://localhost:5432/libreccm-devel --driver-name=postgres --driver-class=org.postgresql.Driver --user-name=ccm --password=ccm47web</command>
|
||||||
|
</commands>
|
||||||
|
</beforeDeployment>
|
||||||
|
|
||||||
|
<java-opts>
|
||||||
|
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt>
|
||||||
|
</java-opts>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Generic profile for using an existing Wildfly installation.
|
||||||
|
The datasource for CCM must be configured in the Wildfly instance.
|
||||||
|
Also the plugin must know where the wildfly installation is. This
|
||||||
|
can either be done by setting the JBOSS_HOME environment variable or
|
||||||
|
by providing the location using -Djboss-as.home=/path/to/wildfly
|
||||||
|
on the command line.
|
||||||
|
-->
|
||||||
|
<profile>
|
||||||
|
<id>generic</id>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<version>${wildfly.version}</version>
|
||||||
|
|
||||||
|
<skip>false</skip>
|
||||||
|
<startupTimeout>120</startupTimeout>
|
||||||
|
|
||||||
|
<java-opts>
|
||||||
|
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt>
|
||||||
|
</java-opts>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-bundle-devel</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Devel Bundle</name>
|
||||||
|
<url>http://www.libreccm.org/bundles/devel</url>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-editor</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-theme-foundry</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- CCM modules -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-shortcuts</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- CCM Modules end -->
|
||||||
|
|
||||||
|
<!-- Dependencies for log4j 2 including adapter for the log4j 1.2 API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-cdi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<excludeDefaults>true</excludeDefaults>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>summary</report>
|
||||||
|
<report>license</report>
|
||||||
|
<report>scm</report>
|
||||||
|
<report>dependency-management</report>
|
||||||
|
<report>plugin-management</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-archetype-contenttype</artifactId>
|
||||||
|
<name>LibreCCM CMS Archetype for Contenttypes</name>
|
||||||
|
|
||||||
|
<url>http://cms.libreccm.org</url>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-agenda</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-agenda</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-agenda</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,320 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-bookmark</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-bookmark</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-bookmark</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.8</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-decisiontree</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-decisiontree</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-decisiontree</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,321 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-externallink</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-externallink</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-externallink</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/javabeans.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-faqitem</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-faqitem</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-faqitem</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/javabeans.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-glossaryitem</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-glossaryitem</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-glossaryitem</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/javabeans.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms-types-minutes</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-cms-types-minutes</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms-types-minutes</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,752 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<groupId>org.librecms</groupId>
|
||||||
|
<artifactId>ccm-cms</artifactId>
|
||||||
|
|
||||||
|
<name>LibreCMS</name>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||||
|
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
||||||
|
<artifactId>jackson-jaxrs-xml-provider</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Dependencies for log4j 2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-themes</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-client-compiled</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-cdi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-cms</finalName>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</param>
|
||||||
|
<param>postgresql9</param>
|
||||||
|
</dialects>
|
||||||
|
<packages>
|
||||||
|
<param>org.libreccm</param>
|
||||||
|
<param>org.librecms</param>
|
||||||
|
</packages>
|
||||||
|
<persistenceXml>${basedir}/src/main/resources/META-INF/persistence-ddl.xml</persistenceXml>
|
||||||
|
<useEnvers>true</useEnvers>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>gen-ddl</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>clean</goal>
|
||||||
|
<goal>resources</goal>
|
||||||
|
<goal>update-theme</goal>
|
||||||
|
<goal>update-widgetset</goal>
|
||||||
|
<goal>compile-theme</goal>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>-sourceclasspath ${project.build.outputDirectory}</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
<configuration>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.spotbugs</groupId>
|
||||||
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.1.0-RC8</version>
|
||||||
|
<!--<configuration>
|
||||||
|
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
|
||||||
|
</configuration>-->
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<report>license</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-managed-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha9</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<configuration>
|
||||||
|
<forkMode>always</forkMode>
|
||||||
|
<forkCount>999</forkCount>
|
||||||
|
<reuseForks>true</reuseForks>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-managed-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<configuration>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-remote-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha9</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<configuration>
|
||||||
|
<forkMode>always</forkMode>
|
||||||
|
<forkCount>999</forkCount>
|
||||||
|
<reuseForks>true</reuseForks>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-remote-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<configuration>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<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>
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -34,7 +34,9 @@ import java.beans.Introspector;
|
||||||
import java.beans.PropertyDescriptor;
|
import java.beans.PropertyDescriptor;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
|
@ -47,6 +49,7 @@ import javax.json.JsonObjectBuilder;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.BadRequestException;
|
import javax.ws.rs.BadRequestException;
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DELETE;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.PUT;
|
import javax.ws.rs.PUT;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
|
@ -55,6 +58,8 @@ import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.WebApplicationException;
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Provides RESTful endpoints for retrieving, creating, updating and deleting
|
||||||
|
* {@link ComponentModel}s of a {@link ContainerModel}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -71,6 +76,16 @@ public class Components {
|
||||||
@Inject
|
@Inject
|
||||||
private PageModelsController controller;
|
private PageModelsController controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve all {@link ComponentModel} of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @return A JSON array containing the data of all {@link ComponentModel} of
|
||||||
|
* the {@link ContainerModel}.
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(PageModelsApp.COMPONENTS_PATH)
|
@Path(PageModelsApp.COMPONENTS_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
|
|
@ -82,6 +97,10 @@ public class Components {
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey) {
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
|
||||||
final CcmApplication app = controller.findCcmApplication(
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
String.format("/%s/", appPath));
|
String.format("/%s/", appPath));
|
||||||
final PageModel pageModel = controller.findPageModel(app,
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
|
@ -100,6 +119,16 @@ public class Components {
|
||||||
return arrayBuilder.build();
|
return arrayBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param componentKey The key of the {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @return A JSON object containing the data of the {@link ComponentModel}.
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(PageModelsApp.COMPONENT_PATH)
|
@Path(PageModelsApp.COMPONENT_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
|
|
@ -112,6 +141,11 @@ public class Components {
|
||||||
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
@PathParam(PageModelsApp.COMPONENT_KEY) final String componentKey) {
|
@PathParam(PageModelsApp.COMPONENT_KEY) final String componentKey) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(componentKey);
|
||||||
|
|
||||||
final CcmApplication app = controller.findCcmApplication(
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
String.format("/%s/", appPath));
|
String.format("/%s/", appPath));
|
||||||
final PageModel pageModel = controller.findPageModel(app,
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
|
@ -125,6 +159,27 @@ public class Components {
|
||||||
return mapComponentModelToJson(component);
|
return mapComponentModelToJson(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates or updates a {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* If a {@link ComponentModel} with provided {@code componentKey} already
|
||||||
|
* exists in the container identified by {@code appPath},
|
||||||
|
* {@code pageModelName} and {@code containerKey} the {@link ComponentModel}
|
||||||
|
* is updated with the data from {@code componentModelData}.
|
||||||
|
*
|
||||||
|
* Otherwise a new {@link ComponentModel} is created using the data from
|
||||||
|
* {@code componentModelData}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param componentKey The key of the {@link ComponentModel} to create
|
||||||
|
* or update.
|
||||||
|
* @param componentModelData The data for creating or updating the
|
||||||
|
* {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @return The new or updated {@link ComponentModel}.
|
||||||
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path(PageModelsApp.COMPONENT_PATH)
|
@Path(PageModelsApp.COMPONENT_PATH)
|
||||||
@Consumes("application/json; charset=utf-8")
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
|
@ -137,7 +192,13 @@ public class Components {
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
@PathParam(PageModelsApp.COMPONENT_KEY) final String componentKey,
|
@PathParam(PageModelsApp.COMPONENT_KEY) final String componentKey,
|
||||||
final JsonObject componentModelJson) {
|
final JsonObject componentModelData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(componentKey);
|
||||||
|
Objects.requireNonNull(componentModelData);
|
||||||
|
|
||||||
final CcmApplication app = controller.findCcmApplication(
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
String.format("/%s/", appPath));
|
String.format("/%s/", appPath));
|
||||||
|
|
@ -160,21 +221,69 @@ public class Components {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
componentModel = createComponentModel(componentModelJson);
|
componentModel = createComponentModel(componentModelData);
|
||||||
componentModel.setKey(componentKey);
|
componentModel.setKey(componentKey);
|
||||||
containerManager.addComponentModel(container, componentModel);
|
containerManager.addComponentModel(container, componentModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
setComponentPropertiesFromJson(componentModelJson, componentModel);
|
setComponentPropertiesFromJson(componentModelData, componentModel);
|
||||||
|
|
||||||
componentRepo.save(componentModel);
|
componentRepo.save(componentModel);
|
||||||
|
|
||||||
return mapComponentModelToJson(componentModel);
|
return mapComponentModelToJson(componentModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param componentKey The key of the {@link ComponentModel} to delete.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path(PageModelsApp.COMPONENT_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteComponent(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(PageModelsApp.COMPONENT_KEY) final String componentKey) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(componentKey);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
final ComponentModel component = controller
|
||||||
|
.findComponentModel(app, pageModel, container, componentKey);
|
||||||
|
|
||||||
|
containerManager.removeComponentModel(container, component);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for mapping a {@link ComponentModel} to JSON.
|
||||||
|
*
|
||||||
|
* @param componentModel The {@link ComponentModel} to map.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the
|
||||||
|
* {@link ComponentModel} {@code componentModel}.
|
||||||
|
*/
|
||||||
private JsonObject mapComponentModelToJson(
|
private JsonObject mapComponentModelToJson(
|
||||||
final ComponentModel componentModel) {
|
final ComponentModel componentModel) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(componentModel);
|
||||||
|
|
||||||
final JsonObjectBuilder objectBuilder = Json
|
final JsonObjectBuilder objectBuilder = Json
|
||||||
.createObjectBuilder()
|
.createObjectBuilder()
|
||||||
.add("componentModelId",
|
.add("componentModelId",
|
||||||
|
|
@ -198,11 +307,49 @@ public class Components {
|
||||||
componentModel.getStyleAttribute());
|
componentModel.getStyleAttribute());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Class<? extends ComponentModel> clazz = componentModel.getClass();
|
||||||
|
final BeanInfo beanInfo;
|
||||||
|
try {
|
||||||
|
beanInfo = Introspector.getBeanInfo(clazz);
|
||||||
|
} catch (IntrospectionException ex) {
|
||||||
|
throw new WebApplicationException(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final PropertyDescriptor propertyDescriptor
|
||||||
|
: beanInfo.getPropertyDescriptors()) {
|
||||||
|
|
||||||
|
final Method readMethod = propertyDescriptor.getReadMethod();
|
||||||
|
final Object value;
|
||||||
|
try {
|
||||||
|
value = readMethod.invoke(componentModel);
|
||||||
|
} catch (IllegalAccessException
|
||||||
|
| InvocationTargetException ex) {
|
||||||
|
throw new WebApplicationException(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
objectBuilder.add(propertyDescriptor.getName(),
|
||||||
|
value.toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return objectBuilder.build();
|
return objectBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link ComponentModel} instance.
|
||||||
|
*
|
||||||
|
* Uses reflection and the value of {@code type} property from the JSON
|
||||||
|
* {@code data} to determine the correct class.
|
||||||
|
*
|
||||||
|
* @param data The data from which the new {@link ComponentModel} is
|
||||||
|
* created.
|
||||||
|
*
|
||||||
|
* @return The new {@link ComponentModel}.
|
||||||
|
*/
|
||||||
private ComponentModel createComponentModel(final JsonObject data) {
|
private ComponentModel createComponentModel(final JsonObject data) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(data);
|
||||||
|
|
||||||
if (!data.containsKey("type")) {
|
if (!data.containsKey("type")) {
|
||||||
throw new BadRequestException("The JSON data for creating the "
|
throw new BadRequestException("The JSON data for creating the "
|
||||||
+ "component has no value for the type of the component to "
|
+ "component has no value for the type of the component to "
|
||||||
|
|
@ -226,9 +373,26 @@ public class Components {
|
||||||
return componentModel;
|
return componentModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for finding the correct subclass of {@link ComponentModel}
|
||||||
|
* using the fully qualified name the class.
|
||||||
|
*
|
||||||
|
* @param type The fully qualified name of the subclass of
|
||||||
|
* {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @return The subclass of {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @throws BadRequestException If there is no subclass of
|
||||||
|
* {@link ComponentModel} with the fully
|
||||||
|
* qualified name provided by the {@code type}
|
||||||
|
* parameter.
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private Class<? extends ComponentModel> findComponentModelClass(
|
private Class<? extends ComponentModel> findComponentModelClass(
|
||||||
final String type) {
|
final String type) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(type);;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final Class<?> clazz = Class.forName(type);
|
final Class<?> clazz = Class.forName(type);
|
||||||
|
|
||||||
|
|
@ -248,6 +412,13 @@ public class Components {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for setting the properties of a {@link ComponentModel} from
|
||||||
|
* the JSON data.
|
||||||
|
*
|
||||||
|
* @param data The JSON data.
|
||||||
|
* @param componentModel The {@link ComponentModel}.
|
||||||
|
*/
|
||||||
private void setComponentPropertiesFromJson(
|
private void setComponentPropertiesFromJson(
|
||||||
final JsonObject data,
|
final JsonObject data,
|
||||||
final ComponentModel componentModel) {
|
final ComponentModel componentModel) {
|
||||||
|
|
@ -267,6 +438,16 @@ public class Components {
|
||||||
data));
|
data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper emthod for setting a property of a {@link ComponentModel} using a
|
||||||
|
* value from JSON data.
|
||||||
|
*
|
||||||
|
* @param componentModel The {@link ComponentModel}
|
||||||
|
* @param propertyDesc The {@link PropertyDescriptor} for the property to
|
||||||
|
* set.
|
||||||
|
* @param data The JSON data containing the new value of the
|
||||||
|
* property.
|
||||||
|
*/
|
||||||
private void setComponentPropertyFromJson(
|
private void setComponentPropertyFromJson(
|
||||||
final ComponentModel componentModel,
|
final ComponentModel componentModel,
|
||||||
final PropertyDescriptor propertyDesc,
|
final PropertyDescriptor propertyDesc,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import org.libreccm.pagemodel.ContainerModel;
|
||||||
import org.libreccm.pagemodel.ContainerModelRepository;
|
import org.libreccm.pagemodel.ContainerModelRepository;
|
||||||
import org.libreccm.pagemodel.PageModel;
|
import org.libreccm.pagemodel.PageModel;
|
||||||
import org.libreccm.pagemodel.PageModelManager;
|
import org.libreccm.pagemodel.PageModelManager;
|
||||||
import org.libreccm.pagemodel.PageModelRepository;
|
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.libreccm.security.RequiresPrivilege;
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
import org.libreccm.web.CcmApplication;
|
import org.libreccm.web.CcmApplication;
|
||||||
|
|
@ -46,6 +45,8 @@ import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Provides RESTful endpoints for managing the {@link ContainerModel}s of a
|
||||||
|
* {@link PageModel}
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -62,9 +63,18 @@ public class Containers {
|
||||||
@Inject
|
@Inject
|
||||||
private PageModelManager pageModelManager;
|
private PageModelManager pageModelManager;
|
||||||
|
|
||||||
@Inject
|
/**
|
||||||
private PageModelRepository pageModelRepo;
|
* Retrieves all {@link ContainerModel}s of a {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} of which the
|
||||||
|
* containers are retrieved.
|
||||||
|
*
|
||||||
|
* @return A JSON array containing the data of all {@link ContainerModel}s
|
||||||
|
* of the {@link PageModel} identified by {@code pageModelName} of
|
||||||
|
* the {@link CcmApplication} with the primary URL {@code appPath}.
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(PageModelsApp.CONTAINERS_PATH)
|
@Path(PageModelsApp.CONTAINERS_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
|
|
@ -91,6 +101,18 @@ public class Containers {
|
||||||
return arrayBuilder.build();
|
return arrayBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a specific {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The value of the {@link ContainerModel#key} property
|
||||||
|
* of the {@link ContainerModel} to retrieve.
|
||||||
|
*
|
||||||
|
* @return A JSON object containing the data of the {@link PageModel}.
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(PageModelsApp.CONTAINER_PATH)
|
@Path(PageModelsApp.CONTAINER_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
|
|
@ -115,6 +137,24 @@ public class Containers {
|
||||||
return mapContainerModelToJson(container);
|
return mapContainerModelToJson(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates or updates a {@link ContainerModel}. If there is already a
|
||||||
|
* {@link ContainerModel} for the container identified by the provided
|
||||||
|
* {@code containerKey}, {@code pageModelName} and {@code appPath} the
|
||||||
|
* {@link ContainerModel} is updated with the data from the
|
||||||
|
* {@link JsonObject} {@code containerModelData}.
|
||||||
|
*
|
||||||
|
* If there is no such {@link ContainerModel} a new {@link ContainerModel}
|
||||||
|
* is created using the data provided by {@code containerModelData}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key identifying the {@link ContainerModel}.
|
||||||
|
* @param containerModelData The data for updating or creating the
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @return The new or updated {@link ContainerModel}.
|
||||||
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path(PageModelsApp.CONTAINER_PATH)
|
@Path(PageModelsApp.CONTAINER_PATH)
|
||||||
@Consumes("application/json; charset=utf-8")
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
|
@ -126,7 +166,7 @@ public class Containers {
|
||||||
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
final JsonObject containerModelJson) {
|
final JsonObject containerModelData) {
|
||||||
|
|
||||||
final CcmApplication app = controller.findCcmApplication(
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
String.format("/%s/", appPath));
|
String.format("/%s/", appPath));
|
||||||
|
|
@ -158,6 +198,14 @@ public class Containers {
|
||||||
return mapContainerModelToJson(containerModel);
|
return mapContainerModelToJson(containerModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes the {@link ContainerModel} identified by the provided parameters.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key identifying the {@link ContainerModel} to
|
||||||
|
* delete.
|
||||||
|
*/
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path(PageModelsApp.CONTAINER_PATH)
|
@Path(PageModelsApp.CONTAINER_PATH)
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -181,6 +229,14 @@ public class Containers {
|
||||||
pageModelManager.removeContainerModel(pageModel, container);
|
pageModelManager.removeContainerModel(pageModel, container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for mapping a {@link ContainerModel} to JSON:
|
||||||
|
*
|
||||||
|
* @param containerModel The {@link ContainerModel} to map.
|
||||||
|
*
|
||||||
|
* @return A {@link JsonObject} containing the data of the
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*/
|
||||||
private JsonObject mapContainerModelToJson(
|
private JsonObject mapContainerModelToJson(
|
||||||
final ContainerModel containerModel) {
|
final ContainerModel containerModel) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ package org.libreccm.pagemodel.rs;
|
||||||
|
|
||||||
import org.libreccm.core.CoreConstants;
|
import org.libreccm.core.CoreConstants;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.pagemodel.ComponentModelRepository;
|
|
||||||
import org.libreccm.pagemodel.ContainerModelRepository;
|
|
||||||
import org.libreccm.pagemodel.PageModel;
|
import org.libreccm.pagemodel.PageModel;
|
||||||
import org.libreccm.pagemodel.PageModelRepository;
|
import org.libreccm.pagemodel.PageModelRepository;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.libreccm.security.RequiresPrivilege;
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
import org.libreccm.web.CcmApplication;
|
import org.libreccm.web.CcmApplication;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.json.Json;
|
import javax.json.Json;
|
||||||
|
|
@ -45,6 +45,8 @@ import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Provides RESTful endpoints for retrieving, creating, updating and deleting
|
||||||
|
* {@link PageModels}.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -55,37 +57,26 @@ public class PageModels {
|
||||||
@Inject
|
@Inject
|
||||||
private PageModelsController controller;
|
private PageModelsController controller;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ComponentModelRepository componentModelRepo;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
private ContainerModelRepository containerRepo;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PageModelRepository pageModelRepo;
|
private PageModelRepository pageModelRepo;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private GlobalizationHelper globalizationHelper;
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
// @GET
|
/**
|
||||||
// @Path("/{appPath}")
|
* Retrieves all {@link PageModel}s available for an {@link CcmApplication}.
|
||||||
// @Produces("application/json; charset=utf-8")
|
*
|
||||||
// @Transactional(Transactional.TxType.REQUIRED)
|
* @param appPath The path of the {@code app}.
|
||||||
// @AuthorizationRequired
|
*
|
||||||
// @RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
* @return A JSON array with the data of all {@link PageModel}s of the
|
||||||
// public List<Map<String, String>> getAllPageModels(
|
* {@link CcmApplication} {@code app}.
|
||||||
// @PathParam("appPath") String appPath) {
|
*
|
||||||
//
|
* @throws NotFoundException If there is no {@link CcmApplication} with the
|
||||||
// final CcmApplication app = findCcmApplication(
|
* primary URL {@code appPath} an
|
||||||
// String.format("/%s/", appPath));
|
* {@link NotFoundException} thrown resulting in
|
||||||
// return pageModelRepo
|
* 404 response.
|
||||||
// .findDraftByApplication(app)
|
*/
|
||||||
// .stream()
|
|
||||||
// .map(this::mapPageModelToDataMap)
|
|
||||||
// .collect(Collectors.toList());
|
|
||||||
// }
|
|
||||||
@GET
|
@GET
|
||||||
// @Path("/{appPath}")
|
|
||||||
@Path(PageModelsApp.PAGE_MODELS_PATH)
|
@Path(PageModelsApp.PAGE_MODELS_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -94,6 +85,8 @@ public class PageModels {
|
||||||
public JsonArray getAllPageModels(
|
public JsonArray getAllPageModels(
|
||||||
@PathParam(PageModelsApp.APP_NAME) String appPath) {
|
@PathParam(PageModelsApp.APP_NAME) String appPath) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
|
||||||
final CcmApplication app = controller
|
final CcmApplication app = controller
|
||||||
.findCcmApplication(String.format("/%s/", appPath));
|
.findCcmApplication(String.format("/%s/", appPath));
|
||||||
final JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
|
final JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
|
||||||
|
|
@ -106,6 +99,27 @@ public class PageModels {
|
||||||
return arrayBuilder.build();
|
return arrayBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The path ({@link CcmApplication#primaryUrl} of the
|
||||||
|
* {@link CcmApplication} to which the
|
||||||
|
* {@link PageModel} belongs (see
|
||||||
|
* {@link PageModel#application}).
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to retrieve (see
|
||||||
|
* {@link PageModel#name}).
|
||||||
|
*
|
||||||
|
* @return A JSON object containing the data of the {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @throws NotFoundException If there is not {@link CcmApplication} with the
|
||||||
|
* primary URL {@code appPath} a
|
||||||
|
* {@link NotFoundException} is thrown resulting
|
||||||
|
* in a 404 response. A {@link NotFoundException}
|
||||||
|
* is also thrown if there no {@link PageModel}
|
||||||
|
* identified by {@code pageModelName} for the
|
||||||
|
* {@link CcmApplication} with the primary URL
|
||||||
|
* {@code appPath}.
|
||||||
|
*/
|
||||||
@GET
|
@GET
|
||||||
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
||||||
@Produces("application/json; charset=utf-8")
|
@Produces("application/json; charset=utf-8")
|
||||||
|
|
@ -116,6 +130,9 @@ public class PageModels {
|
||||||
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName) {
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
|
||||||
final CcmApplication app = controller
|
final CcmApplication app = controller
|
||||||
.findCcmApplication(String.format("/%s/", appPath));
|
.findCcmApplication(String.format("/%s/", appPath));
|
||||||
final PageModel pageModel = controller.findPageModel(app,
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
|
@ -123,6 +140,24 @@ public class PageModels {
|
||||||
return mapPageModelToJson(pageModel);
|
return mapPageModelToJson(pageModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates or updates a {@link PageModel}.
|
||||||
|
*
|
||||||
|
* If a {@link PageModel} with the name {@code pageModelName} already exists
|
||||||
|
* for the {@link CcmApplication} with the primary URL {@code appPath} the
|
||||||
|
* {@link PageModel} is updated. If there is no such {@link PageModel} a new
|
||||||
|
* {@link PageModel} is created and associated with the
|
||||||
|
* {@link CcmApplication} identified by the primary URL {@code appPath}.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param pageModelData The data for creating or updating the
|
||||||
|
* {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @return The new or updated {@link PageModel}.
|
||||||
|
*/
|
||||||
@PUT
|
@PUT
|
||||||
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
||||||
@Consumes("application/json; charset=utf-8")
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
|
@ -133,7 +168,10 @@ public class PageModels {
|
||||||
public JsonObject putPageModel(
|
public JsonObject putPageModel(
|
||||||
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
final JsonObject pageModelJson) {
|
final JsonObject pageModelData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
|
||||||
final CcmApplication app = controller
|
final CcmApplication app = controller
|
||||||
.findCcmApplication(String.format("/%s/", appPath));
|
.findCcmApplication(String.format("/%s/", appPath));
|
||||||
|
|
@ -152,6 +190,13 @@ public class PageModels {
|
||||||
return mapPageModelToJson(controller.findPageModel(app, pageModelName));
|
return mapPageModelToJson(controller.findPageModel(app, pageModelName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to delete.
|
||||||
|
*/
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
@Path(PageModelsApp.PAGE_MODEL_PATH)
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -161,6 +206,9 @@ public class PageModels {
|
||||||
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName) {
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
|
||||||
final CcmApplication app = controller
|
final CcmApplication app = controller
|
||||||
.findCcmApplication(String.format("/%s/", appPath));
|
.findCcmApplication(String.format("/%s/", appPath));
|
||||||
final PageModel pageModel = controller.findPageModel(app,
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
|
@ -168,8 +216,18 @@ public class PageModels {
|
||||||
pageModelRepo.delete(pageModel);
|
pageModelRepo.delete(pageModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for mapping a {@link PageModel} object to JSON:
|
||||||
|
*
|
||||||
|
* @param pageModel The {@link PageModel} to map.
|
||||||
|
*
|
||||||
|
* @return A {@link JSON} object with the data of the provided
|
||||||
|
* {@link PageModel}.
|
||||||
|
*/
|
||||||
private JsonObject mapPageModelToJson(final PageModel pageModel) {
|
private JsonObject mapPageModelToJson(final PageModel pageModel) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(pageModel);
|
||||||
|
|
||||||
return Json
|
return Json
|
||||||
.createObjectBuilder()
|
.createObjectBuilder()
|
||||||
.add("description",
|
.add("description",
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,21 @@ import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.ws.rs.ApplicationPath;
|
import javax.ws.rs.ApplicationPath;
|
||||||
|
import javax.ws.rs.NotFoundException;
|
||||||
import javax.ws.rs.core.Application;
|
import javax.ws.rs.core.Application;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JAX-RS application for managing {@link PageModel}s.
|
* JAX-RS application for managing {@link PageModel}s.
|
||||||
*
|
*
|
||||||
|
* The several paths used by the classes of this JAX-RS application are defined
|
||||||
|
* in this class as string constants to avoid problems. Some other parts which
|
||||||
|
* specific to one of the classes are might defined in that class.
|
||||||
|
*
|
||||||
|
* All methods providing RESTful endpoints will throw a
|
||||||
|
* {@link NotFoundException} if one the objects in their path is not found. If
|
||||||
|
* this is the case the application server will send a 404 response to the
|
||||||
|
* client.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -58,6 +68,8 @@ public class PageModelsApp extends Application {
|
||||||
+ COMPONENT_KEY
|
+ COMPONENT_KEY
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|
||||||
|
protected static final String STYLES_PATH = CONTAINER_PATH + "/styles";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<Class<?>> getClasses() {
|
public Set<Class<?>> getClasses() {
|
||||||
|
|
||||||
|
|
@ -65,6 +77,9 @@ public class PageModelsApp extends Application {
|
||||||
classes.add(PageModels.class);
|
classes.add(PageModels.class);
|
||||||
classes.add(Containers.class);
|
classes.add(Containers.class);
|
||||||
classes.add(Components.class);
|
classes.add(Components.class);
|
||||||
|
classes.add(StylesRs.class);
|
||||||
|
classes.add(StylesMediaRule.class);
|
||||||
|
classes.add(StylesRule.class);
|
||||||
|
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.NotFoundException;
|
import javax.ws.rs.NotFoundException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A helper class providing some functionality used by the JAX-RS classes in
|
||||||
|
* this package.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,6 +55,13 @@ class PageModelsController {
|
||||||
@Inject
|
@Inject
|
||||||
private PageModelRepository pageModelRepo;
|
private PageModelRepository pageModelRepo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a {@link CcmApplication} using its {@code primaryUrl}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
*
|
||||||
|
* @return The {@link CcmApplication} with the provided primary URL.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected CcmApplication findCcmApplication(final String appPath) {
|
protected CcmApplication findCcmApplication(final String appPath) {
|
||||||
|
|
||||||
|
|
@ -63,6 +72,17 @@ class PageModelsController {
|
||||||
appPath)));
|
appPath)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a {@link ComponentModel} using its {@code componentKey}.
|
||||||
|
*
|
||||||
|
* @param app The {@link CcmApplication}.
|
||||||
|
* @param pageModel The {@link PageModel}.
|
||||||
|
* @param containerModel The {@link ContainerModel}.
|
||||||
|
* @param componentKey The key the {@link ComponentModel}.
|
||||||
|
*
|
||||||
|
* @return The {@link ComponentModel} identified by the provided
|
||||||
|
* {@code componentKey}.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected ComponentModel findComponentModel(
|
protected ComponentModel findComponentModel(
|
||||||
final CcmApplication app,
|
final CcmApplication app,
|
||||||
|
|
@ -73,7 +93,8 @@ class PageModelsController {
|
||||||
return componentModelRepo
|
return componentModelRepo
|
||||||
.findComponentByContainerAndKey(containerModel, componentKey)
|
.findComponentByContainerAndKey(containerModel, componentKey)
|
||||||
.orElseThrow(() -> new NotFoundException(String
|
.orElseThrow(() -> new NotFoundException(String
|
||||||
.format("The Container \"%s\" of the PageModel \"%s\" of application"
|
.format(
|
||||||
|
"The Container \"%s\" of the PageModel \"%s\" of application"
|
||||||
+ "\"%s\" does not contain a component with the key \"%s\".",
|
+ "\"%s\" does not contain a component with the key \"%s\".",
|
||||||
containerModel.getKey(),
|
containerModel.getKey(),
|
||||||
pageModel.getName(),
|
pageModel.getName(),
|
||||||
|
|
@ -81,6 +102,16 @@ class PageModelsController {
|
||||||
componentKey)));
|
componentKey)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a {@link ContainerModel} using its {@code containerKey}.
|
||||||
|
*
|
||||||
|
* @param app The {@link CcmApplication}.
|
||||||
|
* @param pageModel The {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @return The {@link ContainerModel} identified by the provided
|
||||||
|
* {@code containerKey}.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected ContainerModel findContainer(final CcmApplication app,
|
protected ContainerModel findContainer(final CcmApplication app,
|
||||||
final PageModel pageModel,
|
final PageModel pageModel,
|
||||||
|
|
@ -98,8 +129,18 @@ class PageModelsController {
|
||||||
containerKey)));
|
containerKey)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if a {@link PageModel} with the provided name exists for the
|
||||||
|
* provided {@link CcmApplication}.
|
||||||
|
*
|
||||||
|
* @param app The {@link CcmApplication} to which the
|
||||||
|
* {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
*
|
||||||
|
* @return {@code true} if a {@link PageModel} with the name provided by the
|
||||||
|
* parameter {@code pageModelName} exists for the provided
|
||||||
|
* {@link CcmApplication} {@code app}, {@code false} otherwise.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected boolean existsPageModel(final CcmApplication app,
|
protected boolean existsPageModel(final CcmApplication app,
|
||||||
final String pageModelName) {
|
final String pageModelName) {
|
||||||
|
|
@ -108,6 +149,16 @@ class PageModelsController {
|
||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a {@link PageModel} using its name.
|
||||||
|
*
|
||||||
|
* @param app The {@link CcmApplication} to which the
|
||||||
|
* {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The {@link PageModel} identified by the name
|
||||||
|
* {@code pageModelName} for the {@link CcmApplication} {@code app}.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected PageModel findPageModel(final CcmApplication app,
|
protected PageModel findPageModel(final CcmApplication app,
|
||||||
final String pageModelName) {
|
final String pageModelName) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,200 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.rs;
|
||||||
|
|
||||||
|
import org.libreccm.pagemodel.styles.CssProperty;
|
||||||
|
import org.libreccm.pagemodel.styles.Dimension;
|
||||||
|
import org.libreccm.pagemodel.styles.MediaQuery;
|
||||||
|
import org.libreccm.pagemodel.styles.MediaRule;
|
||||||
|
import org.libreccm.pagemodel.styles.Rule;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.json.Json;
|
||||||
|
import javax.json.JsonArray;
|
||||||
|
import javax.json.JsonArrayBuilder;
|
||||||
|
import javax.json.JsonObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility class for mapping the entities from the
|
||||||
|
* {@link org.libreccm.pagemodel.styles} package to JSON.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
class StylesJsonMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map a {@link Dimension} object to JSON.
|
||||||
|
*
|
||||||
|
* @param dimension The {@link Dimension} object to map.
|
||||||
|
*
|
||||||
|
* @return A JSON object representing the provided {@link Dimension} object.
|
||||||
|
*/
|
||||||
|
protected JsonObject mapDimensionToJson(final Dimension dimension) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(dimension);
|
||||||
|
|
||||||
|
return Json
|
||||||
|
.createObjectBuilder()
|
||||||
|
.add("value", dimension.getValue())
|
||||||
|
.add("unit", dimension.getUnit().toString())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a List of {@link MediaRule} objects to JSON.
|
||||||
|
*
|
||||||
|
* @param mediaRules The {@link MediaRule}s to map.
|
||||||
|
*
|
||||||
|
* @return An JSON array with the data from the {@link MediaRule} objects in
|
||||||
|
* the list.
|
||||||
|
*/
|
||||||
|
protected JsonArray mapMediaRulesToJson(final List<MediaRule> mediaRules) {
|
||||||
|
|
||||||
|
final JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
|
||||||
|
Objects
|
||||||
|
.requireNonNull(mediaRules)
|
||||||
|
.stream()
|
||||||
|
.map(this::mapMediaRuleToJson)
|
||||||
|
.forEach(arrayBuilder::add);
|
||||||
|
|
||||||
|
return arrayBuilder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a {@link MediaRule} object to JSON.
|
||||||
|
*
|
||||||
|
* @param mediaRule The {@link MediaRule} object to map.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the provided {@link MediaRule} object.
|
||||||
|
*/
|
||||||
|
protected JsonObject mapMediaRuleToJson(final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
return Json
|
||||||
|
.createObjectBuilder()
|
||||||
|
.add("mediaRuleId", mediaRule.getMediaRuleId())
|
||||||
|
.add("mediaQuery", mapMediaQueryToJson(mediaRule.getMediaQuery()))
|
||||||
|
.add("rules", mapRulesToJson(mediaRule.getRules()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a {@link MediaQuery} object to JSON.
|
||||||
|
*
|
||||||
|
* @param mediaQuery The {@link MediaQuery} object to map.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the provided {@link MediaQuery}
|
||||||
|
* object.
|
||||||
|
*/
|
||||||
|
protected JsonObject mapMediaQueryToJson(final MediaQuery mediaQuery) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaQuery);
|
||||||
|
|
||||||
|
return Json
|
||||||
|
.createObjectBuilder()
|
||||||
|
.add("mediaQueryId", mediaQuery.getMediaQueryId())
|
||||||
|
.add("mediaType", mediaQuery.getMediaType().toString())
|
||||||
|
.add("minWidth", mapDimensionToJson(mediaQuery.getMinWidth()))
|
||||||
|
.add("maxWidth", mapDimensionToJson(mediaQuery.getMaxWidth()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a list of {@link Rule} objects to JSON.
|
||||||
|
*
|
||||||
|
* @param rules The list of {@link Rule} objects to map.
|
||||||
|
*
|
||||||
|
* @return A JSON array with the JSON representations of the {@link Rule}
|
||||||
|
* objects in the list.
|
||||||
|
*/
|
||||||
|
protected JsonArray mapRulesToJson(final List<Rule> rules) {
|
||||||
|
|
||||||
|
final JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
|
||||||
|
Objects
|
||||||
|
.requireNonNull(rules)
|
||||||
|
.stream()
|
||||||
|
.map(this::mapRuleToJson)
|
||||||
|
.forEach(arrayBuilder::add);
|
||||||
|
|
||||||
|
return arrayBuilder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a {@link Rule} object to JSON.
|
||||||
|
*
|
||||||
|
* @param rule The {@link Rule} object to map.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the provided {@link RuleObject}.
|
||||||
|
*/
|
||||||
|
protected JsonObject mapRuleToJson(final Rule rule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
|
||||||
|
return Json
|
||||||
|
.createObjectBuilder()
|
||||||
|
.add("ruleId", rule.getRuleId())
|
||||||
|
.add("selector", rule.getSelector())
|
||||||
|
.add("properties", mapPropertiesToJson(rule.getProperties()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a list of {@link CssProperty} objects to JSON.
|
||||||
|
*
|
||||||
|
* @param properties The list of {@link CssProperty} objects to map.
|
||||||
|
*
|
||||||
|
* @return A JSON array containing the JSON representations of the
|
||||||
|
* {@link CssProperty} objects in the list.
|
||||||
|
*/
|
||||||
|
protected JsonArray mapPropertiesToJson(final List<CssProperty> properties) {
|
||||||
|
|
||||||
|
final JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
|
||||||
|
Objects
|
||||||
|
.requireNonNull(properties)
|
||||||
|
.stream()
|
||||||
|
.map(this::mapCssPropertyToJson)
|
||||||
|
.forEach(arrayBuilder::add);
|
||||||
|
|
||||||
|
return arrayBuilder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maps a {@link CssProperty} object to JSON.
|
||||||
|
*
|
||||||
|
* @param property The {@link CssProperty} to map.
|
||||||
|
* @return The JSON representation of the provided {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
protected JsonObject mapCssPropertyToJson(final CssProperty property) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(property);
|
||||||
|
|
||||||
|
return Json
|
||||||
|
.createObjectBuilder()
|
||||||
|
.add("propertyId", property.getPropertyId())
|
||||||
|
.add("name", property.getName())
|
||||||
|
.add("value", property.getValue())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,622 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.rs;
|
||||||
|
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.pagemodel.ContainerModel;
|
||||||
|
import org.libreccm.pagemodel.styles.CssProperty;
|
||||||
|
import org.libreccm.pagemodel.styles.MediaRule;
|
||||||
|
import org.libreccm.pagemodel.styles.Rule;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesManager;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesRepository;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.libreccm.web.CcmApplication;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.json.JsonArray;
|
||||||
|
import javax.json.JsonObject;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DELETE;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.NotFoundException;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.PUT;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides RESTful endpoints for retrieving, creating, updating and deleting
|
||||||
|
* {@link MediaRule}s.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(StylesRs.MEDIA_RULE_PATH)
|
||||||
|
public class StylesMediaRule implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3257114872624583807L;
|
||||||
|
|
||||||
|
protected final static String PROPERTY_ID = "propertyId";
|
||||||
|
protected final static String RULE_ID = "ruleId";
|
||||||
|
|
||||||
|
protected final static String RULES_PATH = "/rules";
|
||||||
|
protected final static String RULE_PATH = RULES_PATH
|
||||||
|
+ "/{"
|
||||||
|
+ RULE_ID
|
||||||
|
+ "}";
|
||||||
|
protected final static String PROPERTIES_PATH = RULE_PATH + "/properties";
|
||||||
|
protected final static String PROPERTY_PATH = PROPERTIES_PATH
|
||||||
|
+ "/{"
|
||||||
|
+ PROPERTY_ID
|
||||||
|
+ "}";
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesJsonMapper stylesJsonMapper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesManager stylesManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRepository stylesRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRs stylesRs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all {@link Rule}s of a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @return A JSON array with the JSON representations of all {@link Rule}s
|
||||||
|
* belonging the {@link MediaRule} identified by the provided path.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(RULES_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonArray getRules(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
return stylesJsonMapper.mapRulesToJson(mediaRule.getRules());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link Rule} from a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the {@link Rule} identified by the
|
||||||
|
* provided path.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject getRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapRuleToJson(findRule(mediaRule,
|
||||||
|
ruleIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link Rule} for a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleData The data from which the new {@link Rule} is
|
||||||
|
* created.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the new {@link Rule}.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(RULES_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject createRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
final JsonObject ruleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleData);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = new Rule();
|
||||||
|
rule.setSelector(ruleData.getString("selector"));
|
||||||
|
stylesManager.addRuleToMediaRule(rule, mediaRule);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapRuleToJson(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates an existing {@link Rule}
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to update.
|
||||||
|
* @param ruleData The data from which used to update the
|
||||||
|
* {@link Rule}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the updated {@link Rule}.
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject updateRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam,
|
||||||
|
final JsonObject ruleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(ruleData);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
rule.setSelector(ruleData.getString("selector"));
|
||||||
|
stylesManager.addRuleToMediaRule(rule, mediaRule);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapRuleToJson(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DELETE
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
|
||||||
|
stylesManager.removeRuleFromMediaRule(rule, mediaRule);
|
||||||
|
stylesRepo.deleteRule(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all {@link CssProperty} objects assigned to {@link Rule} which
|
||||||
|
* is assigned to {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} from which the
|
||||||
|
* {@link CssProperty} objects are retrieved.
|
||||||
|
*
|
||||||
|
* @return A JSON array with the JSON representations of the
|
||||||
|
* {@link CssProperty} objects.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(PROPERTIES_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonArray getProperties(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapPropertiesToJson(rule.getProperties());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a {@link CssProperty} assigned to {@link Rule} which is assigned
|
||||||
|
* to {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} from which the
|
||||||
|
* {@link CssProperty} is retrieved.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the {@link CssProperty} identified by
|
||||||
|
* the provided path.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject getProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) final String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
final CssProperty property = findProperty(rule, propertyIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapCssPropertyToJson(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link CssProperty} for a {@link Rule} of a
|
||||||
|
* {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} for which the new
|
||||||
|
* {@link CssProperty} is created.
|
||||||
|
* @param propertyData The data from which the new {@link CssProperty}
|
||||||
|
* is created.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the new {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(PROPERTIES_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject createProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = new CssProperty();
|
||||||
|
setCssPropertyData(property, propertyData);
|
||||||
|
stylesManager.addCssPropertyToRule(property, rule);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapCssPropertyToJson(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates an existing {@link CssProperty} of {@link Rule} of a
|
||||||
|
* {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} belongs.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to update.
|
||||||
|
* @param propertyData The data which is used to update the
|
||||||
|
* {@link CssProperty}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the updated {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject updateProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = findProperty(rule, propertyIdParam);
|
||||||
|
setCssPropertyData(property, propertyData);
|
||||||
|
stylesRepo.saveCssProperty(property);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapCssPropertyToJson(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a {@link CssProperty} of a {@link Rule} assigned to a
|
||||||
|
* {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The path of the {@link CcmApplication} to which
|
||||||
|
* the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which
|
||||||
|
* the {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} belongs.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to delete.
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
@PathParam(RULE_ID) String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = stylesRs.findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = findRule(mediaRule, ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = findProperty(rule, propertyIdParam);
|
||||||
|
stylesManager.removeCssPropertyFromRule(property, rule);
|
||||||
|
stylesRepo.deleteCssProperty(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for finding a {@link CssProperty}.
|
||||||
|
*
|
||||||
|
* @param rule The {@link Rule} to which the {@link CssProperty}
|
||||||
|
* belongs.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
private CssProperty findProperty(final Rule rule,
|
||||||
|
final String propertyIdParam) {
|
||||||
|
|
||||||
|
final long propertyId;
|
||||||
|
try {
|
||||||
|
propertyId = Long.parseLong(propertyIdParam);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
throw new WebApplicationException(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rule
|
||||||
|
.getProperties()
|
||||||
|
.stream()
|
||||||
|
.filter(property -> propertyId == property.getPropertyId())
|
||||||
|
.findAny()
|
||||||
|
.orElseThrow(() -> new NotFoundException());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for finding a {@link Rule} assigned to {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param mediaRule The {@link MediaRule}.
|
||||||
|
* @param ruleIdParam The ID of {@link Rule} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link Rule}.
|
||||||
|
*/
|
||||||
|
private Rule findRule(final MediaRule mediaRule,
|
||||||
|
final String ruleIdParam) {
|
||||||
|
|
||||||
|
final long ruleId;
|
||||||
|
try {
|
||||||
|
ruleId = Long.parseLong(ruleIdParam);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
throw new WebApplicationException(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
return mediaRule
|
||||||
|
.getRules()
|
||||||
|
.stream()
|
||||||
|
.filter(rule -> ruleId == rule.getRuleId())
|
||||||
|
.findAny()
|
||||||
|
.orElseThrow(() -> new NotFoundException());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for updating the values of the properties of
|
||||||
|
* {@link CssProperty} object from its JSON representation.
|
||||||
|
*
|
||||||
|
* @param property The {@link CssProperty}.
|
||||||
|
* @param propertyData The {@link JsonObject} containing the data.
|
||||||
|
*/
|
||||||
|
private void setCssPropertyData(final CssProperty property,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(property);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
property.setName(propertyData.getString("name"));
|
||||||
|
property.setValue(propertyData.getString("value"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,666 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.rs;
|
||||||
|
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.pagemodel.ContainerModel;
|
||||||
|
import org.libreccm.pagemodel.PageModel;
|
||||||
|
import org.libreccm.pagemodel.styles.Dimension;
|
||||||
|
import org.libreccm.pagemodel.styles.MediaRule;
|
||||||
|
import org.libreccm.pagemodel.styles.MediaType;
|
||||||
|
import org.libreccm.pagemodel.styles.Rule;
|
||||||
|
import org.libreccm.pagemodel.styles.Styles;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesManager;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesRepository;
|
||||||
|
import org.libreccm.pagemodel.styles.Unit;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.libreccm.web.CcmApplication;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.json.JsonArray;
|
||||||
|
import javax.json.JsonObject;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DELETE;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.NotFoundException;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.PUT;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides RESTful endpoints for managing the (CSS) styles of a
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(PageModelsApp.STYLES_PATH)
|
||||||
|
public class StylesRs {
|
||||||
|
|
||||||
|
protected static final String MEDIA_RULE_ID = "mediaRuleId";
|
||||||
|
protected static final String RULE_ID = "ruleId";
|
||||||
|
|
||||||
|
protected static final String MEDIA_RULES_PATH = "/media-rules";
|
||||||
|
protected static final String MEDIA_RULE_PATH = MEDIA_RULES_PATH
|
||||||
|
+ "/{"
|
||||||
|
+ MEDIA_RULE_ID
|
||||||
|
+ "}";
|
||||||
|
protected static final String RULES_PATH = "/rules";
|
||||||
|
protected static final String RULE_PATH = RULES_PATH
|
||||||
|
+ "/{"
|
||||||
|
+ RULE_ID
|
||||||
|
+ "}";
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PageModelsController controller;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesJsonMapper stylesJsonMapper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesManager stylesManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRepository stylesRepo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all {@link MediaRule}s from the {@link Styles} entity of a
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @return The JSON Array with the JSON representations of all
|
||||||
|
* {@link MediaRule}s of the {@link ContainerModel} identified by
|
||||||
|
* the provided path.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(MEDIA_RULES_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonArray getMediaRules(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapMediaRulesToJson(styles.getMediaRules());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link MediaRule} from the {@link Styles} entity of
|
||||||
|
* a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the {@link MediaRule}.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(MEDIA_RULE_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject getMediaRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(MEDIA_RULE_ID) final String mediaRuleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper
|
||||||
|
.mapMediaRuleToJson(findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param mediaRuleData The data for the new {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the new {@link MediaRule}.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(MEDIA_RULES_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject createMediaRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
final JsonObject mediaRuleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleData);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final MediaRule mediaRule = new MediaRule();
|
||||||
|
setMediaRuleProperties(mediaRuleData, mediaRule);
|
||||||
|
stylesManager.addMediaRuleToStyles(mediaRule, styles);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapMediaRuleToJson(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule} to update.
|
||||||
|
* @param mediaRuleData The data for updating the {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the updated {@link MediaRule}.
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path(MEDIA_RULE_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject updateMediaRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(MEDIA_RULE_ID) final String mediaRuleIdParam,
|
||||||
|
final JsonObject mediaRuleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
Objects.requireNonNull(mediaRuleData);
|
||||||
|
|
||||||
|
final MediaRule mediaRule = findMediaRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
setMediaRuleProperties(mediaRuleData, mediaRule);
|
||||||
|
stylesRepo.saveMediaRule(mediaRule);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapMediaRuleToJson(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule} to delete.
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path(MEDIA_RULE_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteMediaRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(MEDIA_RULE_ID) final String mediaRuleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(mediaRuleIdParam);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final MediaRule mediaRule = findMediaRule(pageModel,
|
||||||
|
container,
|
||||||
|
mediaRuleIdParam);
|
||||||
|
stylesManager.removeMediaRuleFromStyles(mediaRule, styles);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all {@link Rule}s from the {@link Styles} entity of a
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @return A JSON array with the JSON representation of all {@link Rule}s of
|
||||||
|
* the {@link ContainerModel}.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(RULES_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonArray getRules(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapRulesToJson(styles.getRules());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link Rule} from the {@link Styles} entity of a
|
||||||
|
* {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the {@link Rule}.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject getRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(RULE_ID) final String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper
|
||||||
|
.mapRuleToJson(findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param ruleData The data for the new {@link Rule}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the new {@link Rule}.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(RULES_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject createRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
final JsonObject ruleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleData);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final Rule rule = new Rule();
|
||||||
|
rule.setSelector(ruleData.getString("selector"));
|
||||||
|
stylesManager.addRuleToStyles(rule, styles);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapRuleToJson(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates an existing {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to update.
|
||||||
|
* @param ruleData The data for updating the {@link Rule}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the updated {@link Rule}.
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject updateRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(RULE_ID) final String ruleIdParam,
|
||||||
|
final JsonObject ruleData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(ruleData);
|
||||||
|
|
||||||
|
final Rule rule = findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
rule.setSelector(ruleData.getString("selector"));
|
||||||
|
stylesRepo.saveRule(rule);
|
||||||
|
return stylesJsonMapper.mapRuleToJson(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to delete.
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path(RULE_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteRule(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(RULE_ID) final String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final Rule rule = findRule(pageModel, container, ruleIdParam);
|
||||||
|
stylesManager.removeRuleFromStyles(rule, styles);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An utility method for finding a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link MediaRule} with the provided {@code mediaRuleId}.
|
||||||
|
*/
|
||||||
|
protected MediaRule findMediaRule(final String appPath,
|
||||||
|
final String pageModelName,
|
||||||
|
final String containerKey,
|
||||||
|
final String mediaRuleIdParam) {
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
return findMediaRule(pageModel, container, mediaRuleIdParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An utility method for finding a {@link MediaRule}.
|
||||||
|
*
|
||||||
|
* @param pageModel The {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param container The {@link ContainerModel} to which the
|
||||||
|
* {@link MediaRule} belongs.
|
||||||
|
* @param mediaRuleIdParam The ID of the {@link MediaRule} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link MediaRule} with the ID {@code mediaRuleIdParam}.
|
||||||
|
*/
|
||||||
|
private MediaRule findMediaRule(final PageModel pageModel,
|
||||||
|
final ContainerModel container,
|
||||||
|
final String mediaRuleIdParam) {
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final long mediaRuleId;
|
||||||
|
try {
|
||||||
|
mediaRuleId = Long.parseLong(mediaRuleIdParam);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
throw new WebApplicationException(String.format(
|
||||||
|
"The provided mediaRuleId \"%s\" numeric.", mediaRuleIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
return styles
|
||||||
|
.getMediaRules()
|
||||||
|
.stream()
|
||||||
|
.filter(mediaRule -> mediaRuleId == mediaRule.getMediaRuleId())
|
||||||
|
.findAny()
|
||||||
|
.orElseThrow(() -> new NotFoundException(String.format(
|
||||||
|
"No MediaRule with ID %d available in the Styles for "
|
||||||
|
+ "Container \"%s\" of PageModel \"%s\".",
|
||||||
|
mediaRuleId,
|
||||||
|
container.getKey(),
|
||||||
|
pageModel.getName())));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility method for finding a {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication}.
|
||||||
|
* @param pageModelName The name of the {@link PageModel}.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel}.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link Rule} identified by {@code ruleIdParam}.
|
||||||
|
*/
|
||||||
|
protected Rule findRule(final String appPath,
|
||||||
|
final String pageModelName,
|
||||||
|
final String containerKey,
|
||||||
|
final String ruleIdParam) {
|
||||||
|
|
||||||
|
final CcmApplication app = controller.findCcmApplication(
|
||||||
|
String.format("/%s/", appPath));
|
||||||
|
|
||||||
|
final PageModel pageModel = controller.findPageModel(app,
|
||||||
|
pageModelName);
|
||||||
|
|
||||||
|
final ContainerModel container = controller.findContainer(app,
|
||||||
|
pageModel,
|
||||||
|
containerKey);
|
||||||
|
|
||||||
|
return findRule(pageModel, container, ruleIdParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An utility method for finding a {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param pageModel The {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param container The {@link ContainerModel} to which the {@link Rule}
|
||||||
|
* belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link Rule} with the ID {@code ruleIdParam}.
|
||||||
|
*/
|
||||||
|
private Rule findRule(final PageModel pageModel,
|
||||||
|
final ContainerModel container,
|
||||||
|
final String ruleIdParam) {
|
||||||
|
|
||||||
|
final Styles styles = container.getStyles();
|
||||||
|
|
||||||
|
final long ruleId;
|
||||||
|
try {
|
||||||
|
ruleId = Long.parseLong(ruleIdParam);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
throw new WebApplicationException(String.format(
|
||||||
|
"The provided mediaRuleId \"%s\" numeric.", ruleIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
return styles
|
||||||
|
.getRules()
|
||||||
|
.stream()
|
||||||
|
.filter(rule -> ruleId == rule.getRuleId())
|
||||||
|
.findAny()
|
||||||
|
.orElseThrow(() -> new NotFoundException(String.format(
|
||||||
|
"No Rule with ID %d available in the Styles for "
|
||||||
|
+ "Container \"%s\" of PageModel \"%s\".",
|
||||||
|
ruleId,
|
||||||
|
container.getKey(),
|
||||||
|
pageModel.getName())));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for setting the values of the properties of a
|
||||||
|
* {@link MediaRule} using the data from a JSON object.
|
||||||
|
*
|
||||||
|
* @param mediaRuleData The JSON object providing the data.
|
||||||
|
* @param mediaRule The {@link MediaRule}.
|
||||||
|
*/
|
||||||
|
private void setMediaRuleProperties(final JsonObject mediaRuleData,
|
||||||
|
final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaRuleData);
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
final JsonObject mediaQueryData = mediaRuleData
|
||||||
|
.getJsonObject("mediaQuery");
|
||||||
|
final JsonObject maxWidthData = mediaQueryData
|
||||||
|
.getJsonObject("maxWidth");
|
||||||
|
final JsonObject minWidthData = mediaQueryData
|
||||||
|
.getJsonObject("minWidth");
|
||||||
|
|
||||||
|
final Dimension maxWidth = new Dimension();
|
||||||
|
maxWidth.setUnit(Unit.valueOf(maxWidthData.getString("unit")));
|
||||||
|
maxWidth.setValue(maxWidthData.getJsonNumber("value").doubleValue());
|
||||||
|
final MediaType mediaType = MediaType.valueOf(mediaQueryData
|
||||||
|
.getString("mediaType"));
|
||||||
|
|
||||||
|
final Dimension minWidth = new Dimension();
|
||||||
|
minWidth.setUnit(Unit.valueOf(minWidthData.getString("unit")));
|
||||||
|
minWidth.setValue(minWidthData.getJsonNumber("minWidth").doubleValue());
|
||||||
|
|
||||||
|
mediaRule.getMediaQuery().setMaxWidth(maxWidth);
|
||||||
|
mediaRule.getMediaQuery().setMediaType(mediaType);
|
||||||
|
mediaRule.getMediaQuery().setMinWidth(minWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,355 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.rs;
|
||||||
|
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.pagemodel.ContainerModel;
|
||||||
|
import org.libreccm.pagemodel.styles.CssProperty;
|
||||||
|
import org.libreccm.pagemodel.styles.Rule;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesManager;
|
||||||
|
import org.libreccm.pagemodel.styles.StylesRepository;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
import org.libreccm.web.CcmApplication;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.json.JsonArray;
|
||||||
|
import javax.json.JsonObject;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.DELETE;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.NotFoundException;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.PUT;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides RESTful endpoints for retrieving, creating, updating and deleting
|
||||||
|
* {@link Rule} objects.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(StylesRs.RULE_PATH)
|
||||||
|
public class StylesRule implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -8447970787677773230L;
|
||||||
|
|
||||||
|
protected final static String PROPERTY_ID = "propertyId";
|
||||||
|
|
||||||
|
protected final static String PROPERTIES_PATH = "/properties";
|
||||||
|
protected final static String PROPERTY_PATH = PROPERTIES_PATH
|
||||||
|
+ "/{"
|
||||||
|
+ PROPERTY_ID
|
||||||
|
+ "}";
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesJsonMapper stylesJsonMapper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesManager stylesManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRepository stylesRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRs stylesRs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all {@link CssProperty} objects of a {@link Rule} assigned to
|
||||||
|
* the {@link Styles} entity of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which the
|
||||||
|
* {@link Rule} belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} from which the
|
||||||
|
* {@link CssProperty} objects are retrieved.
|
||||||
|
*
|
||||||
|
* @return A JSON array with the JSON representation of the
|
||||||
|
* {@link CssProperty} objects of the {@link Rule} identified by the
|
||||||
|
* provided path.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(PROPERTIES_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonArray getProperties(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.RULE_ID) final String ruleIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
|
||||||
|
final Rule rule = stylesRs.findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
return stylesJsonMapper.mapPropertiesToJson(rule.getProperties());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a specific {@link CssProperty} from a {@link Rule} assigned to
|
||||||
|
* the {@link Styles} entity of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which the
|
||||||
|
* {@link Rule} belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} is assigned.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to retrieve.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
@GET
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject getProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.RULE_ID) final String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
|
||||||
|
final Rule rule = stylesRs.findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
|
||||||
|
return stylesJsonMapper
|
||||||
|
.mapCssPropertyToJson(findProperty(rule,
|
||||||
|
propertyIdParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link CssProperty} for a {@link Rule} assigned to the
|
||||||
|
* {@link Styles} entity of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which the
|
||||||
|
* {@link Rule} belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} is assigned.
|
||||||
|
* @param propertyData The data used to create the new {@link CssProperty}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the new {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(PROPERTIES_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject createProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.RULE_ID) final String ruleIdParam,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
final Rule rule = stylesRs.findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = new CssProperty();
|
||||||
|
setCssPropertyData(property, propertyData);
|
||||||
|
stylesManager.addCssPropertyToRule(property, rule);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapCssPropertyToJson(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates an existing {@link CssProperty} for a {@link Rule} assigned to
|
||||||
|
* the {@link Styles} entity of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which the
|
||||||
|
* {@link Rule} belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} is assigned.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to update.
|
||||||
|
* @param propertyData The data used to update the {@link CssProperty}.
|
||||||
|
*
|
||||||
|
* @return The JSON representation of the updated {@link CssProperty}.
|
||||||
|
*/
|
||||||
|
@PUT
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Consumes("application/json; charset=utf-8")
|
||||||
|
@Produces("application/json; charset=utf-8")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public JsonObject updateProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.RULE_ID) final String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
final Rule rule = stylesRs.findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = findProperty(rule, propertyIdParam);
|
||||||
|
setCssPropertyData(property, propertyData);
|
||||||
|
stylesRepo.saveCssProperty(property);
|
||||||
|
|
||||||
|
return stylesJsonMapper.mapCssPropertyToJson(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes{@link CssProperty} for a {@link Rule} assigned to the
|
||||||
|
* {@link Styles} entity of a {@link ContainerModel}.
|
||||||
|
*
|
||||||
|
* @param appPath The primary URL of the {@link CcmApplication} to
|
||||||
|
* which the {@link PageModel} belongs.
|
||||||
|
* @param pageModelName The name of the {@link PageModel} to which the
|
||||||
|
* {@link ContainerModel} belongs.
|
||||||
|
* @param containerKey The key of the {@link ContainerModel} to which the
|
||||||
|
* {@link Rule} belongs.
|
||||||
|
* @param ruleIdParam The ID of the {@link Rule} to which the
|
||||||
|
* {@link CssProperty} is assigned.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to delete.
|
||||||
|
*/
|
||||||
|
@DELETE
|
||||||
|
@Path(PROPERTY_PATH)
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteProperty(
|
||||||
|
@PathParam(PageModelsApp.APP_NAME) final String appPath,
|
||||||
|
@PathParam(PageModelsApp.PAGE_MODEL_NAME) final String pageModelName,
|
||||||
|
@PathParam(PageModelsApp.CONTAINER_KEY) final String containerKey,
|
||||||
|
@PathParam(StylesRs.RULE_ID) final String ruleIdParam,
|
||||||
|
@PathParam(PROPERTY_ID) final String propertyIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(appPath);
|
||||||
|
Objects.requireNonNull(pageModelName);
|
||||||
|
Objects.requireNonNull(containerKey);
|
||||||
|
Objects.requireNonNull(ruleIdParam);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
|
||||||
|
final Rule rule = stylesRs.findRule(appPath,
|
||||||
|
pageModelName,
|
||||||
|
containerKey,
|
||||||
|
ruleIdParam);
|
||||||
|
|
||||||
|
final CssProperty property = findProperty(rule, propertyIdParam);
|
||||||
|
stylesManager.removeCssPropertyFromRule(property, rule);
|
||||||
|
stylesRepo.deleteCssProperty(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for finding a {@link CssProperty} assigned to {@link Rule}.
|
||||||
|
*
|
||||||
|
* @param rule The {@link Rule}.
|
||||||
|
* @param propertyIdParam The ID of the {@link CssProperty} to find.
|
||||||
|
*
|
||||||
|
* @return The {@link CssProperty} identified by {@code propertyIdParam}.
|
||||||
|
*/
|
||||||
|
private CssProperty findProperty(final Rule rule,
|
||||||
|
final String propertyIdParam) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
Objects.requireNonNull(propertyIdParam);
|
||||||
|
|
||||||
|
final long propertyId;
|
||||||
|
try {
|
||||||
|
propertyId = Long.parseLong(propertyIdParam);
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
throw new WebApplicationException(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rule
|
||||||
|
.getProperties()
|
||||||
|
.stream()
|
||||||
|
.filter(property -> propertyId == property.getPropertyId())
|
||||||
|
.findAny()
|
||||||
|
.orElseThrow(() -> new NotFoundException());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method for updating a {@link CssProperty} object with data from
|
||||||
|
* its JSON representation.
|
||||||
|
*
|
||||||
|
* @param property The {@link CssProperty}.
|
||||||
|
* @param propertyData The data.
|
||||||
|
*/
|
||||||
|
private void setCssPropertyData(final CssProperty property,
|
||||||
|
final JsonObject propertyData) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(property);
|
||||||
|
Objects.requireNonNull(propertyData);
|
||||||
|
|
||||||
|
property.setName(propertyData.getString("name"));
|
||||||
|
property.setValue(propertyData.getString("value"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The classes in this package provide a RESTful API as backend for PageModel
|
||||||
|
* editors.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.rs;
|
||||||
|
|
@ -41,14 +41,23 @@ public class CssProperty implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4697757123207731769L;
|
private static final long serialVersionUID = -4697757123207731769L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID of the CSS property
|
||||||
|
*/
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "PROPERTY_ID")
|
@Column(name = "PROPERTY_ID")
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private long propertyId;
|
private long propertyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the property.
|
||||||
|
*/
|
||||||
@Column(name = "NAME", length = 256)
|
@Column(name = "NAME", length = 256)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value of the property.
|
||||||
|
*/
|
||||||
@Column(name = "PROPERTY_VALUE", length = 4096)
|
@Column(name = "PROPERTY_VALUE", length = 4096)
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,17 +36,17 @@ public class Dimension implements Serializable {
|
||||||
private static final long serialVersionUID = 44299305931240403L;
|
private static final long serialVersionUID = 44299305931240403L;
|
||||||
|
|
||||||
@Column(name = "DIMENSION_VALUE")
|
@Column(name = "DIMENSION_VALUE")
|
||||||
private float value;
|
private double value;
|
||||||
|
|
||||||
@Column(name = "UNIT")
|
@Column(name = "UNIT")
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private Unit unit;
|
private Unit unit;
|
||||||
|
|
||||||
public float getValue() {
|
public double getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(final float value) {
|
public void setValue(final double value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,7 +61,9 @@ public class Dimension implements Serializable {
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 7;
|
int hash = 7;
|
||||||
hash = 37 * hash + Float.floatToIntBits(value);
|
hash = 37 * hash
|
||||||
|
+ (int) (Double.doubleToLongBits(value)
|
||||||
|
^ (Double.doubleToLongBits(value) >>> 32));
|
||||||
hash = 37 * hash + Objects.hashCode(unit);
|
hash = 37 * hash + Objects.hashCode(unit);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
@ -82,8 +84,8 @@ public class Dimension implements Serializable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Float.floatToIntBits(value) != Float
|
if (Double.doubleToLongBits(value)
|
||||||
.floatToIntBits(other.getValue())) {
|
!= Double.doubleToLongBits(other.getValue())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return unit == other.getUnit();
|
return unit == other.getUnit();
|
||||||
|
|
@ -113,4 +115,5 @@ public class Dimension implements Serializable {
|
||||||
public String toCss() {
|
public String toCss() {
|
||||||
return String.format("%s%s", value, unit.toString().toLowerCase());
|
return String.format("%s%s", value, unit.toString().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.styles;
|
||||||
|
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
public class StylesManager implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -2906584926633549611L;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private StylesRepository stylesRepo;
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
|
||||||
|
public void addCssPropertyToRule(final CssProperty property,
|
||||||
|
final Rule rule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(property);
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
|
||||||
|
rule.addProperty(property);
|
||||||
|
stylesRepo.saveRule(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void removeCssPropertyFromRule(final CssProperty property,
|
||||||
|
final Rule rule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(property);
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
|
||||||
|
rule.removeProperties(property);
|
||||||
|
stylesRepo.saveRule(rule);
|
||||||
|
stylesRepo.deleteCssProperty(property);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void addMediaRuleToStyles(final MediaRule mediaRule,
|
||||||
|
final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
styles.addMediaRule(mediaRule);
|
||||||
|
stylesRepo.saveStyles(styles);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void removeMediaRuleFromStyles(final MediaRule mediaRule,
|
||||||
|
final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
styles.removeMediaRule(mediaRule);
|
||||||
|
stylesRepo.saveStyles(styles);
|
||||||
|
stylesRepo.deleteMediaRule(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void addRuleToMediaRule(final Rule rule, final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
mediaRule.addRule(rule);
|
||||||
|
stylesRepo.saveMediaRule(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void removeRuleFromMediaRule(final Rule rule,
|
||||||
|
final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
mediaRule.removeRule(rule);
|
||||||
|
stylesRepo.saveMediaRule(mediaRule);
|
||||||
|
stylesRepo.deleteRule(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void addRuleToStyles(final Rule rule, final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
|
||||||
|
styles.addRule(rule);
|
||||||
|
stylesRepo.saveStyles(styles);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void removeRuleFromStyles(final Rule rule, final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
|
||||||
|
styles.removeRule(rule);
|
||||||
|
stylesRepo.deleteRule(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,168 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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 library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.pagemodel.styles;
|
||||||
|
|
||||||
|
import org.libreccm.core.CoreConstants;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.security.RequiresPrivilege;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
public class StylesRepository implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8350984709496516542L;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private EntityManager entityManager;
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void saveCssProperty(final CssProperty cssProperty) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(cssProperty);
|
||||||
|
|
||||||
|
if (cssProperty.getPropertyId() == 0) {
|
||||||
|
entityManager.persist(cssProperty);
|
||||||
|
} else {
|
||||||
|
entityManager.merge(cssProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteCssProperty(final CssProperty cssProperty) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(cssProperty);
|
||||||
|
|
||||||
|
entityManager.remove(cssProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void saveMediaQuery(final MediaQuery mediaQuery) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaQuery);
|
||||||
|
|
||||||
|
if (mediaQuery.getMediaQueryId() == 0) {
|
||||||
|
entityManager.persist(mediaQuery);
|
||||||
|
} else {
|
||||||
|
entityManager.merge(mediaQuery);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteMediaQuery(final MediaQuery mediaQuery){
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaQuery);
|
||||||
|
|
||||||
|
entityManager.remove(mediaQuery);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void saveMediaRule(final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
if (mediaRule.getMediaRuleId() == 0) {
|
||||||
|
entityManager.persist(mediaRule);
|
||||||
|
} else {
|
||||||
|
entityManager.merge(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteMediaRule(final MediaRule mediaRule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(mediaRule);
|
||||||
|
|
||||||
|
entityManager.remove(mediaRule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void saveRule(final Rule rule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
|
||||||
|
if (rule.getRuleId() == 0) {
|
||||||
|
entityManager.persist(rule);
|
||||||
|
} else {
|
||||||
|
entityManager.merge(rule);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteRule(final Rule rule) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(rule);
|
||||||
|
|
||||||
|
entityManager.remove(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void saveStyles(final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
|
||||||
|
if (styles.getStyleId() == 0) {
|
||||||
|
entityManager.persist(styles);
|
||||||
|
} else {
|
||||||
|
entityManager.merge(styles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@RequiresPrivilege(CoreConstants.PRIVILEGE_ADMIN)
|
||||||
|
public void deleteStyles(final Styles styles) {
|
||||||
|
|
||||||
|
Objects.requireNonNull(styles);
|
||||||
|
|
||||||
|
entityManager.remove(styles);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,637 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-docrepo</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>LibreCCM DocRepo</name>
|
||||||
|
|
||||||
|
<url>http://www.libreccm.org/moudles/ccm-docrepo</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Dependencies for log4j 2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-docrepo</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</param>
|
||||||
|
<param>postgresql9</param>
|
||||||
|
</dialects>
|
||||||
|
<packages>
|
||||||
|
<param>org.libreccm</param>
|
||||||
|
</packages>
|
||||||
|
<persistenceXml>src/main/resources/persistence-build.xml</persistenceXml>
|
||||||
|
<useEnvers>true</useEnvers>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>gen-ddl</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>
|
||||||
|
-sourceclasspath ${project.build.outputDirectory}
|
||||||
|
</additionalparam>
|
||||||
|
<!--<additionalparam>-Xdoclint:none</additionalparam>-->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<!--<report>project-team</report>
|
||||||
|
<report>mailing-list</report>
|
||||||
|
<report>cim</report>
|
||||||
|
<report>issue-tracking</report>-->
|
||||||
|
<report>license</report>
|
||||||
|
<!--<report>scm</report>-->
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-managed-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<!--<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>-->
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<id>wildfly-managed-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<!--<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>-->
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<id>wildfly-remote-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<!--<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>-->
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<id>wildfly-remote-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<!--<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>-->
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-editor</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Editor</name>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-editor</finalName>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/typescript</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.eirslett</groupId>
|
||||||
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
|
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Install node.js and NPM</id>
|
||||||
|
<goals>
|
||||||
|
<goal>install-node-and-npm</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<nodeVersion>v6.12.3</nodeVersion>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm install</id>
|
||||||
|
<goals>
|
||||||
|
<goal>npm</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>grunt build</id>
|
||||||
|
<goals>
|
||||||
|
<goal>grunt</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,709 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-shortcuts</artifactId>
|
||||||
|
<!--<version>7.0.0-SNAPSHOT</version>-->
|
||||||
|
|
||||||
|
<name>LibreCCM Shortcuts</name>
|
||||||
|
|
||||||
|
<url>http://www.libreccm.org/modules/ccm-shortcuts</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.junit</groupId>
|
||||||
|
<artifactId>arquillian-junit-container</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-impl-base</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-shortcuts</finalName>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>default-prepare-agent</id>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>default-report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</param>
|
||||||
|
<param>oracle12c</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>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>
|
||||||
|
-sourceclasspath ${project.build.outputDirectory}
|
||||||
|
</additionalparam>
|
||||||
|
<!--<additionalparam>-Xdoclint:none</additionalparam>-->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.spotbugs</groupId>
|
||||||
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.1.0-RC8</version>
|
||||||
|
<!--<configuration>
|
||||||
|
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
|
||||||
|
</configuration>-->
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<!--<report>project-team</report>
|
||||||
|
<report>mailing-list</report>
|
||||||
|
<report>cim</report>
|
||||||
|
<report>issue-tracking</report>-->
|
||||||
|
<report>license</report>
|
||||||
|
<!--<report>scm</report>-->
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-managed-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<groups>
|
||||||
|
org.libreccm.tests.categories.UnitTest,
|
||||||
|
org.libreccm.tests.categories.IntegrationTest
|
||||||
|
</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-managed-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<groups>
|
||||||
|
org.libreccm.tests.categories.UnitTest,
|
||||||
|
org.libreccm.tests.categories.IntegrationTest
|
||||||
|
</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-remote-h2-mem</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<groups>
|
||||||
|
org.libreccm.tests.categories.UnitTest,
|
||||||
|
org.libreccm.tests.categories.IntegrationTest
|
||||||
|
</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>wildfly-remote-pgsql</id>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-remote</artifactId>
|
||||||
|
<!--<version>8.2.1.Final</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>org.jacoco.core</artifactId>
|
||||||
|
<!--<version>0.7.5.201505241946</version>-->
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha8</version>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>${project.build.directory}/generated-resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<dialects>
|
||||||
|
<param>h2</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>
|
||||||
|
<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>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
<groups>
|
||||||
|
org.libreccm.tests.categories.UnitTest,
|
||||||
|
org.libreccm.tests.categories.IntegrationTest
|
||||||
|
</groups>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,211 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-testutils</artifactId>
|
||||||
|
<!--<version>7.0.0-SNAPSHOT</version>-->
|
||||||
|
|
||||||
|
<name>LibreCCM Test Utilities</name>
|
||||||
|
<url>http://www.libreccm.org/modules/ccm-testutils</url>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.findbugs</groupId>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.shrinkwrap.resolver</groupId>
|
||||||
|
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-testutils</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<version>1.4.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-maven</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<requireMavenVersion>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
</requireMavenVersion>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>
|
||||||
|
-sourceclasspath ${project.build.outputDirectory}
|
||||||
|
</additionalparam>
|
||||||
|
<!--<additionalparam>-Xdoclint:none</additionalparam>-->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>javancss-maven-plugin</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
</plugin>-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<!--<report>project-team</report>
|
||||||
|
<report>mailing-list</report>
|
||||||
|
<report>cim</report>
|
||||||
|
<report>issue-tracking</report>-->
|
||||||
|
<report>license</report>
|
||||||
|
<!--<report>scm</report>-->
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-theme-foundry</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM Foundry Theming Engine</name>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-theme-foundry</finalName>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,236 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.libreccm.files</groupId>
|
||||||
|
<artifactId>ccm-xafilesystemadapter</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<name>ccm-xafilesystemadapter</name>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Lesser GPL 2.1</name>
|
||||||
|
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<timestamp>${maven.build.timestamp}</timestamp>
|
||||||
|
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>ccm-core</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.xadisk</groupId>
|
||||||
|
<artifactId>xadisk</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>ccm-xafilesystemadapter</finalName>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-maven-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<requireJavaVersion>
|
||||||
|
<version>1.8.0</version>
|
||||||
|
</requireJavaVersion>
|
||||||
|
<requireMavenVersion>
|
||||||
|
<version>3.3</version>
|
||||||
|
</requireMavenVersion>
|
||||||
|
</rules>
|
||||||
|
<fail>true</fail>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<groups>org.libreccm.tests.categories.UnitTest</groups>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.10.4</version>
|
||||||
|
<configuration>
|
||||||
|
<detectLinks>true</detectLinks>
|
||||||
|
<detectJavaApiLinks>true</detectJavaApiLinks>
|
||||||
|
<links>
|
||||||
|
<link>http://docs.oracle.com/javase/7/docs/api/</link>
|
||||||
|
<link>http://docs.oracle.com/javaee/7/api/</link>
|
||||||
|
<link>http://docs.jboss.org/hibernate/orm/4.3/javadocs/</link>
|
||||||
|
</links>
|
||||||
|
<show>private</show>
|
||||||
|
<docfilessubdirs>true</docfilessubdirs>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<breakiterator>true</breakiterator>
|
||||||
|
<version>true</version>
|
||||||
|
<author>true</author>
|
||||||
|
<keywords>true</keywords>
|
||||||
|
<failOnError>false</failOnError>
|
||||||
|
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||||
|
<docletArtifact>
|
||||||
|
<groupId>org.jboss.apiviz</groupId>
|
||||||
|
<artifactId>apiviz</artifactId>
|
||||||
|
<version>1.3.2.GA</version>
|
||||||
|
</docletArtifact>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
<additionalparam>
|
||||||
|
-sourceclasspath ${project.build.outputDirectory}
|
||||||
|
</additionalparam>
|
||||||
|
<!--<additionalparam>-Xdoclint:none</additionalparam>-->
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jxr-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||||
|
<version>2.20</version>
|
||||||
|
<configuration>
|
||||||
|
<trimStackTrace>false</trimStackTrace>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.4</version>
|
||||||
|
<!--<configuration>
|
||||||
|
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
|
||||||
|
</configuration>-->
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/empty.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/typeresolution.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unnecessary.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>jdepend-maven-plugin</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>taglist-maven-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependencies</report>
|
||||||
|
<!--<report>project-team</report>
|
||||||
|
<report>mailing-list</report>
|
||||||
|
<report>cim</report>
|
||||||
|
<report>issue-tracking</report>-->
|
||||||
|
<report>license</report>
|
||||||
|
<!--<report>scm</report>-->
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
<configuration>
|
||||||
|
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,777 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<!--<ccm.version>7.0.0-SNAPSHOT</ccm.version>-->
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<prerequisites>
|
||||||
|
<maven>3.3.1</maven>
|
||||||
|
</prerequisites>
|
||||||
|
|
||||||
|
<groupId>org.libreccm</groupId>
|
||||||
|
<artifactId>libreccm-parent</artifactId>
|
||||||
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>LibreCCM</name>
|
||||||
|
<url>http://www.libreccm.org</url>
|
||||||
|
<distributionManagement>
|
||||||
|
<site>
|
||||||
|
<id>libreccm-site</id>
|
||||||
|
<name>LibreCCM</name>
|
||||||
|
<url>http://www.libreccm.org/project-sites/</url>
|
||||||
|
</site>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>LibreCCM Foundation</name>
|
||||||
|
</organization>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>LGPLv2 or newer</name>
|
||||||
|
<url>http://www.gnu.org/licenses/lgpl-2.0.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<developerConnection>scm:svn:https://svn.libreccm.org/ccm/ccm_ng</developerConnection>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
|
||||||
|
<!-- Provides basic functionality required by all modules -->
|
||||||
|
<module>ccm-core</module>
|
||||||
|
|
||||||
|
<!-- Additional modules used by most/all modules (including ccm-core) -->
|
||||||
|
<module>ccm-testutils</module>
|
||||||
|
<module>ccm-xafilesystemadapter</module>
|
||||||
|
|
||||||
|
<!-- Simple HTML editor for use in the backend -->
|
||||||
|
<module>ccm-editor</module>
|
||||||
|
|
||||||
|
<!-- CMS modules -->
|
||||||
|
<module>ccm-cms</module>
|
||||||
|
|
||||||
|
<module>ccm-cms-types-agenda</module>
|
||||||
|
<module>ccm-cms-types-bookmark</module>
|
||||||
|
<module>ccm-cms-types-decisiontree</module>
|
||||||
|
<module>ccm-cms-types-externallink</module>
|
||||||
|
<module>ccm-cms-types-faqitem</module>
|
||||||
|
<module>ccm-cms-types-glossaryitem</module>
|
||||||
|
<module>ccm-cms-types-minutes</module>
|
||||||
|
|
||||||
|
<!-- Miscellaneous modules -->
|
||||||
|
<module>ccm-docrepo</module>
|
||||||
|
<module>ccm-shortcuts</module>
|
||||||
|
|
||||||
|
<!-- Modules providing themes -->
|
||||||
|
<module>ccm-theme-foundry</module>
|
||||||
|
|
||||||
|
<!-- Bundle modules -->
|
||||||
|
<module>ccm-bundle-devel</module>
|
||||||
|
<module>ccm-bundle-devel-wildfly-web</module>
|
||||||
|
<module>ccm-bundle-devel-wildfly</module>
|
||||||
|
<module>ccm-bundle-devel-wildfly-swarm</module>
|
||||||
|
|
||||||
|
<!-- Archetypes -->
|
||||||
|
<module>ccm-archetype-module</module>
|
||||||
|
<module>ccm-cms-archetype-contenttype</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<reporting>
|
||||||
|
<excludeDefaults>true</excludeDefaults>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>summary</report>
|
||||||
|
<report>license</report>
|
||||||
|
<report>scm</report>
|
||||||
|
<report>dependency-management</report>
|
||||||
|
<report>plugin-management</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<configuration>
|
||||||
|
<rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
|
||||||
|
</configuration>
|
||||||
|
<reportSets>
|
||||||
|
<reportSet>
|
||||||
|
<reports>
|
||||||
|
<report>dependency-updates-report</report>
|
||||||
|
<report>plugin-updates-report</report>
|
||||||
|
<report>property-updates-report</report>
|
||||||
|
</reports>
|
||||||
|
</reportSet>
|
||||||
|
</reportSets>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Offical Maven plugins (in alphabetic order)
|
||||||
|
-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<optimize>true</optimize>
|
||||||
|
<debug>true</debug>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-ear-plugin</artifactId>
|
||||||
|
<version>2.10.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.0-M1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.8</version>
|
||||||
|
<configuration>
|
||||||
|
<linkXref>true</linkXref>
|
||||||
|
<sourceEncoding>utf-8</sourceEncoding>
|
||||||
|
<targetJdk>1.8</targetJdk>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>/rulesets/basic.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/braces.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/codesize.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/clone.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/coupling.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/design.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/finalizers.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/imports.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/javabeans.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/junit.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/naming.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/optimizations.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/strictexception.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/strings.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/sunsecure.xml</ruleset>
|
||||||
|
<ruleset>/rulesets/unusedcode.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>pmd</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>2.5.3</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.20.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Order plugins in alphabetic order (groupId, artifactId)
|
||||||
|
-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.eirslett</groupId>
|
||||||
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
|
<version>1.6</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.spotbugs</groupId>
|
||||||
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.1.0-RC8</version>
|
||||||
|
<configuration>
|
||||||
|
<findbugsXmlOutput>true</findbugsXmlOutput>
|
||||||
|
<xmlOutput>true</xmlOutput>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>findbugs</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-maven-plugin</artifactId>
|
||||||
|
<version>8.1.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>de.jpdigital</groupId>
|
||||||
|
<artifactId>hibernate50-ddl-maven-plugin</artifactId>
|
||||||
|
<version>2.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>findbugs-maven-plugin</artifactId>
|
||||||
|
<version>3.0.5</version>
|
||||||
|
<configuration>
|
||||||
|
<findbugsXmlOutput>true</findbugsXmlOutput>
|
||||||
|
<xmlOutput>true</xmlOutput>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>findbugs</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>0.7.9</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
<version>1.2.1.Final</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.swarm</groupId>
|
||||||
|
<artifactId>wildfly-swarm-plugin</artifactId>
|
||||||
|
<version>2017.11.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>enforce-maven-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>enforce</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<requireJavaVersion>
|
||||||
|
<version>1.8.0</version>
|
||||||
|
</requireJavaVersion>
|
||||||
|
<requireMavenVersion>
|
||||||
|
<version>3.3.1</version>
|
||||||
|
</requireMavenVersion>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.wildfly.plugins</groupId>
|
||||||
|
<artifactId>wildfly-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
|
<tagBase>https://svn.libreccm.org/ccm/ccm_ng-releases</tagBase>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!--
|
||||||
|
*******************************
|
||||||
|
JavaEE and related dependencies
|
||||||
|
*******************************
|
||||||
|
-->
|
||||||
|
<!-- JavaEE API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax</groupId>
|
||||||
|
<artifactId>javaee-api</artifactId>
|
||||||
|
<version>7.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hibernate, used as JPA provider, replacing the default
|
||||||
|
provider of the container. This is necessary because we use
|
||||||
|
some features/extensions only available for Hibernate,
|
||||||
|
for example Envers for versioning.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-entitymanager</artifactId>
|
||||||
|
<version>5.0.10.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hibernate Envers, used for providing versioning/auditing for
|
||||||
|
Entities.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-envers</artifactId>
|
||||||
|
<version>5.0.10.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hibernate Validator used as implemenation of the Bean
|
||||||
|
Validation API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<version>5.4.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-validator-cdi</artifactId>
|
||||||
|
<version>5.4.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.el</groupId>
|
||||||
|
<artifactId>javax.el-api</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish</groupId>
|
||||||
|
<artifactId>javax.el</artifactId>
|
||||||
|
<version>3.0.1-b08</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hibernate Search provides seamless integration of Apache Lucene with
|
||||||
|
Hibernate/JPA
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-search-orm</artifactId>
|
||||||
|
<version>5.5.4.Final</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Flyway framework for database schema migrations
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-core</artifactId>
|
||||||
|
<version>4.0.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Shiro lib for security stuff -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-core</artifactId>
|
||||||
|
<version>1.2.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.shiro</groupId>
|
||||||
|
<artifactId>shiro-web</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- PrimeFaces for JSF prototype -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.primefaces</groupId>
|
||||||
|
<artifactId>primefaces</artifactId>
|
||||||
|
<version>6.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Vaadin dependencies for Vaadin prototype -->
|
||||||
|
<!-- Vaadin dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-bom</artifactId>
|
||||||
|
<version>8.1.7</version>
|
||||||
|
<scope>import</scope>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-cdi</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-client-compiled</artifactId>
|
||||||
|
<version>8.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.vaadin</groupId>
|
||||||
|
<artifactId>vaadin-themes</artifactId>
|
||||||
|
<version>8.1.2</version>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
*********************
|
||||||
|
Libraries used by CCM
|
||||||
|
*********************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Unclear if needed anymore because javax.activation is part
|
||||||
|
of the standard API since JavaSE 6 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>javax.activation</groupId>
|
||||||
|
<artifactId>activation</artifactId>
|
||||||
|
<version>1.1.1</version>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-bom</artifactId>
|
||||||
|
<version>2.9.1</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Needs to be upgraded, but the complete search part needs
|
||||||
|
refactoring. Therefore we keep using the old version for now.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.lucene</groupId>
|
||||||
|
<artifactId>lucene-core</artifactId>
|
||||||
|
<version>2.4.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.pdfbox</groupId>
|
||||||
|
<artifactId>pdfbox</artifactId>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Libraries from the Apache Commons project -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-beanutils</groupId>
|
||||||
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
<version>1.9.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-cli</groupId>
|
||||||
|
<artifactId>commons-cli</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-codec</groupId>
|
||||||
|
<artifactId>commons-codec</artifactId>
|
||||||
|
<version>1.10</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-collections</groupId>
|
||||||
|
<artifactId>commons-collections</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-fileupload</groupId>
|
||||||
|
<artifactId>commons-fileupload</artifactId>
|
||||||
|
<version>1.3.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-httpclient</groupId>
|
||||||
|
<artifactId>commons-httpclient</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-lang</groupId>
|
||||||
|
<artifactId>commons-lang</artifactId>
|
||||||
|
<version>2.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-primitives</groupId>
|
||||||
|
<artifactId>commons-primitives</artifactId>
|
||||||
|
<version>1.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Apache Commons libraries end -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish</groupId>
|
||||||
|
<artifactId>javax.json</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.saxon</groupId>
|
||||||
|
<artifactId>Saxon-HE</artifactId>
|
||||||
|
<version>9.8.0-5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcmail-jdk16</artifactId>
|
||||||
|
<version>1.46</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.imgscalr</groupId>
|
||||||
|
<artifactId>imgscalr-lib</artifactId>
|
||||||
|
<version>4.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>1.10.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-artifact</artifactId>
|
||||||
|
<version>3.3.9</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.jtidy</groupId>
|
||||||
|
<artifactId>jtidy</artifactId>
|
||||||
|
<version>r938</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>oro</groupId>
|
||||||
|
<artifactId>oro</artifactId>
|
||||||
|
<version>2.0.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bouncycastle</groupId>
|
||||||
|
<artifactId>bcprov-jdk16</artifactId>
|
||||||
|
<version>1.46</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>poi</groupId>
|
||||||
|
<artifactId>poi-2.5-final</artifactId>
|
||||||
|
<version>20040302</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.xadisk</groupId>
|
||||||
|
<artifactId>xadisk</artifactId>
|
||||||
|
<version>1.2.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sourceforge.findbugs</groupId>
|
||||||
|
<artifactId>annotations</artifactId>
|
||||||
|
<version>1.3.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>xml-resolver</groupId>
|
||||||
|
<artifactId>xml-resolver</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson</groupId>
|
||||||
|
<artifactId>jackson-bom</artifactId>
|
||||||
|
<version>2.9.0</version>
|
||||||
|
<scope>import</scope>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- better xml library -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.woodstox</groupId>
|
||||||
|
<artifactId>woodstox-core-asl</artifactId>
|
||||||
|
<version>4.4.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
**********************
|
||||||
|
Dependencies for tests
|
||||||
|
**********************
|
||||||
|
-->
|
||||||
|
<!-- JUnit test framework -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.12</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Arquillian test framework for running tests inside an JavaEE
|
||||||
|
container
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian</groupId>
|
||||||
|
<artifactId>arquillian-bom</artifactId>
|
||||||
|
<version>1.1.12.Final</version>
|
||||||
|
<scope>import</scope>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-transaction-bom</artifactId>
|
||||||
|
<version>1.0.3.Final</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-persistence-dbunit</artifactId>
|
||||||
|
<version>1.0.0.Alpha7</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.arquillian.extension</groupId>
|
||||||
|
<artifactId>arquillian-jacoco</artifactId>
|
||||||
|
<version>1.0.0.Alpha9</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<version>8.2.1.Final</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.wildfly.arquillian</groupId>
|
||||||
|
<artifactId>wildfly-arquillian-container-managed</artifactId>
|
||||||
|
<version>2.0.2.Final</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</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.9</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hamcrest provides nice Matchers for JUnit test, making the
|
||||||
|
assertions in the tests for readable.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<version>1.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<version>1.3</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The EqualsVerifier from Jan Ouwens for checking the equals and
|
||||||
|
hashCode implementations for objects. Used especially for
|
||||||
|
verifying equals and hashCode implementations of entities.
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.jqno.equalsverifier</groupId>
|
||||||
|
<artifactId>equalsverifier</artifactId>
|
||||||
|
<!--<version>1.7.8</version>-->
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- h2 database in used to check some database related things -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>1.4.196</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
#release configuration
|
||||||
|
#Fri Feb 02 16:41:34 CET 2018
|
||||||
|
project.scm.org.libreccm\:libreccm-parent.tag=HEAD
|
||||||
|
project.scm.org.librecms\:ccm-cms.empty=true
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-minutes=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.libreccm\:ccm-bundle-devel-wildfly=7.0.0-alpha.1
|
||||||
|
scm.commentPrefix=[maven-release-plugin]
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-bookmark=7.0.0-alpha.1
|
||||||
|
project.dev.org.libreccm\:ccm-bundle-devel=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.libreccm\:ccm-bundle-devel.empty=true
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-decisiontree=7.0.0-alpha.1
|
||||||
|
project.scm.org.libreccm\:ccm-shortcuts.empty=true
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-glossaryitem=7.0.0-alpha.1
|
||||||
|
pushChanges=true
|
||||||
|
project.rel.org.libreccm\:ccm-theme-foundry=7.0.0-alpha.1
|
||||||
|
project.scm.org.libreccm\:ccm-archetype-module.empty=true
|
||||||
|
projectVersionPolicyId=default
|
||||||
|
exec.snapshotReleasePluginAllowed=false
|
||||||
|
project.dev.org.libreccm\:ccm-bundle-devel-wildfly-web=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-agenda=7.0.0-alpha.1
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-faqitem=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.libreccm\:ccm-core=7.0.0-alpha.1
|
||||||
|
project.scm.org.libreccm\:ccm-editor.empty=true
|
||||||
|
project.scm.org.libreccm.files\:ccm-xafilesystemadapter.empty=true
|
||||||
|
project.dev.org.libreccm\:ccm-archetype-module=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-bookmark.empty=true
|
||||||
|
completedPhase=end-release
|
||||||
|
project.rel.org.librecms\:ccm-cms=7.0.0-alpha.1
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-minutes=7.0.0-alpha.1
|
||||||
|
remoteTagging=true
|
||||||
|
project.scm.org.libreccm\:ccm-testutils.empty=true
|
||||||
|
project.dev.org.librecms\:ccm-cms-archetype-contenttype=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.librecms\:ccm-cms=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.libreccm\:ccm-shortcuts=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-externallink=7.0.0-alpha.1
|
||||||
|
project.rel.org.libreccm\:ccm-bundle-devel-wildfly-web=7.0.0-alpha.1
|
||||||
|
project.dev.org.libreccm\:ccm-bundle-devel-wildfly=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.libreccm\:ccm-docrepo=7.0.0-alpha.1
|
||||||
|
project.rel.org.libreccm\:ccm-bundle-devel-wildfly-swarm=7.0.0-alpha.1
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-glossaryitem=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.librecms\:ccm-cms-types-faqitem=7.0.0-alpha.1
|
||||||
|
project.dev.org.libreccm\:ccm-core=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.libreccm\:ccm-bundle-devel-wildfly-swarm=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.libreccm\:ccm-bundle-devel-wildfly.empty=true
|
||||||
|
project.rel.org.librecms\:ccm-cms-archetype-contenttype=7.0.0-alpha.1
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-agenda.empty=true
|
||||||
|
project.rel.org.libreccm\:ccm-testutils=7.0.0-alpha.1
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-minutes.empty=true
|
||||||
|
project.scm.org.librecms\:ccm-cms-archetype-contenttype.empty=true
|
||||||
|
project.scm.org.libreccm\:ccm-bundle-devel-wildfly-web.empty=true
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-decisiontree=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-glossaryitem.empty=true
|
||||||
|
project.dev.org.libreccm\:ccm-theme-foundry=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.libreccm\:ccm-archetype-module=7.0.0-alpha.1
|
||||||
|
project.scm.org.libreccm\:ccm-docrepo.empty=true
|
||||||
|
preparationGoals=clean verify
|
||||||
|
project.rel.org.libreccm\:ccm-bundle-devel=7.0.0-alpha.1
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-bookmark=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.libreccm\:ccm-theme-foundry.empty=true
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-decisiontree.empty=true
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-faqitem.empty=true
|
||||||
|
scm.tag=libreccm-7.0.0-alpha.1
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-externallink=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.libreccm\:ccm-core.empty=true
|
||||||
|
scm.tagNameFormat=@{project.artifactId}-@{project.version}
|
||||||
|
project.dev.org.libreccm\:ccm-editor=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.libreccm\:libreccm-parent=7.0.0-SNAPSHOT
|
||||||
|
project.scm.org.libreccm\:ccm-bundle-devel-wildfly-swarm.empty=true
|
||||||
|
project.scm.org.librecms\:ccm-cms-types-externallink.empty=true
|
||||||
|
project.dev.org.libreccm.files\:ccm-xafilesystemadapter=7.0.0-SNAPSHOT
|
||||||
|
scm.tagBase=https\://svn.libreccm.org/ccm/ccm_ng-releases
|
||||||
|
project.dev.org.librecms\:ccm-cms-types-agenda=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.libreccm\:ccm-testutils=7.0.0-SNAPSHOT
|
||||||
|
project.dev.org.libreccm\:ccm-docrepo=7.0.0-SNAPSHOT
|
||||||
|
project.rel.org.libreccm\:ccm-shortcuts=7.0.0-alpha.1
|
||||||
|
scm.url=scm\:svn\:https\://svn.libreccm.org/ccm/ccm_ng
|
||||||
|
project.scm.org.libreccm\:libreccm-parent.developerConnection=scm\:svn\:https\://svn.libreccm.org/ccm/ccm_ng
|
||||||
|
project.rel.org.libreccm\:libreccm-parent=7.0.0-alpha.1
|
||||||
|
project.rel.org.libreccm.files\:ccm-xafilesystemadapter=7.0.0-alpha.1
|
||||||
|
project.rel.org.libreccm\:ccm-editor=7.0.0-alpha.1
|
||||||
Loading…
Reference in New Issue