Prerequisites

Building Syncope

Before building Syncope, you need to setup an environment variable to give Maven more memory.

On Unix

export MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"

On Windows

set MAVEN_OPTS=-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

To build Syncope simply execute (from within the top-level source directory):

$ mvn clean install

To build Syncope without running any test nor check do:

$ mvn -PskipTests,all

Building documentation

To build Syncope documentation execute (from within the top-level source directory):

$ mvn -N -P site clean generate-resources
The documentation artifacts are now be available under target/generated-docs/.

More build profiles

Besides default, other Maven build profiles are provided, for developer convenience.
Such profiles are limited to a specific module, hence Maven needs to be invoked from the corresponding subdirectory, not from top-level.

fit/core-reference

application/xml

By default, integration tests are run using application/json for both Accept and Content-Type HTTP headers; it is possible, however, to use application/xml.
$ mvn clean verify -DjaxrsContentType=application/xml

Debug

Starts the full environment used by integration tests (with same components available when running new project in embedded mode but console) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat).
$ mvn -Pdebug,all
or, without Activiti and Camel support
$ mvn -Pdebug

Once started in debug mode, individual test methods can be executed as follows (the Maven Surefire Plugins rules apply here):

$ mvn test -Dtest=UserITCase#list

JRebel

As with Debug, but with JRebel features enabled.
$ export REBEL_HOME=/opt/jrebel
$ mvn -Pjrebel,all
or, without Activiti and Camel support
$ export REBEL_HOME=/opt/jrebel
$ mvn -Pjrebel

DBMSes

PostgreSQL
After providing connection information in src/main/resources/postgres/domains/Master.properties, perform the full test suite against a real PostgreSQL database via
$ mvn -Ppostgres-it
MySQL
After providing connection information in src/main/resources/mysql/domains/Master.properties, perform the full test suite against a real MySQL database via
$ mvn -Pmysql-it
MariaDB
After providing connection information in src/main/resources/mariadb/domains/Master.properties, perform the full test suite against a MariaDB database via
$ mvn -Pmariadb-it
Oracle database
After providing connection information in src/main/resources/oracle/domains/Master.properties and having set up the appropriate JDBC driver in your local Maven repository, perform the full test suite against a real Oracle database via
$ mvn -Poracle-it
MS SQL Server
After providing connection information in src/main/resources/sqlserver/domains/Master.properties and having set up the appropriate JDBC driver in your local Maven repository, perform the full test suite against a real MS SQL Server database via
$ mvn -Psqlserver-it

Java EE containers

Glassfish
Perform the full test suite by deploying Syncope core in Glassfish via
$ mvn -Pglassfish-it
Payara
Perform the full test suite by deploying Syncope core in Payara via
$ mvn -Ppayara-it
Wildfly
Perform the full test suite by deploying Syncope core in Wildfly via
$ mvn -Pjboss-it

fit/console-reference

Debug

Starts the full environment used by core's integration tests (with same components available when running new project in embedded mode, including console) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat).
$ mvn -Pdebug

JRebel

As with Debug, but with JRebel features enabled.
$ export REBEL_HOME=/opt/jrebel
$ mvn -Pjrebel

fit/enduser-reference

Debug

Starts the full environment used by core's integration tests (with same components available when running new project in embedded mode, including console and enduser) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat).
$ mvn -Pdebug

Once started in debug mode, the test cases can be executed as follows:

$ cd target/enduser-test
$ nodejs/node/node nodejs/bin/protractor protractor-conf.js
where the actual tests to be run can be selected by modifying the protractor-conf.js content.

JRebel

As with Debug, but with JRebel features enabled.
$ export REBEL_HOME=/opt/jrebel
$ mvn -Pjrebel

ide/eclipse/bundles/org.apache.syncope.ide.eclipse.tests

Eclipse IDE Plugin

Starts the full environment used by core's integration tests (with same components available when running new project in embedded mode, and runs the Eclipse IDE plugin tests against it. Cannot run headless.
$ mvn -Peclipse-it