CINXE.COM

Building – Apache Syncope

<!DOCTYPE html> <!-- | Generated by Apache Maven Doxia Site Renderer 2.0.0 from src/site/xdoc/building.xml | Rendered using Apache Maven Fluido Skin 2.0.0-M11 --> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" /> <meta name="author" content="Apache Syncope Documentation Team" /> <title>Building – Apache Syncope</title> <link rel="stylesheet" href="./css/apache-maven-fluido-2.0.0-M11.min.css" /> <link rel="stylesheet" href="./css/site.css" /> <link rel="stylesheet" href="./css/print.css" media="print" /> <script src="./js/apache-maven-fluido-2.0.0-M11.min.js"></script> </head> <body> <!-- Load Facebook SDK for JavaScript --> <div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en/sdk.js#xfbml=1&version=v6.0"></script> <div class="container-fluid container-fluid-top"> <header> <div id="banner"> <div class="pull-left"></div> <div class="pull-right"></div> <div class="clear"><hr/></div> </div> <div id="breadcrumbs"> <ul class="breadcrumb"> <li><a href="https://www.apache.org/" class="externalLink">Apache</a><span class="divider">/</span></li> <li><a href="./">Apache Syncope</a><span class="divider">/</span></li> <li class="active">Building</li> </ul> </div> </header> <div class="row-fluid"> <header id="leftColumn" class="span2"> <nav class="well sidebar-nav"> <ul class="nav nav-list"> <li class="nav-header">Apache Syncope™</li> <li><a href="iam-scenario">IAM Scenario</a></li> <li><a href="architecture">Architecture</a></li> <li><a href="demo">Demo</a></li> <li><a href="downloads">Downloads</a></li> <li><a href="security">Security</a></li> <li><a href="docs/">Documentation</a></li> <li><a href="mailing-lists">Mailing Lists</a></li> <li><a href="team">Team</a></li> <li><a href="https://www.apache.org/licenses/" class="externalLink">License</a></li> <li><a href="professional-services">Professional Services</a></li> <li class="nav-header">Development</li> <li><a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Roadmap" class="externalLink">Roadmap</a></li> <li><a href="contributing">How to contribute?</a></li> <li><a href="source-repository">Source Repository</a></li> <li><a href="integration">Continuous Integration</a></li> <li><a href="issue-management">Issue Management</a></li> <li><a href="building">Building</a></li> <li><a href="release-process">Release Process</a></li> <li class="nav-header">ASF</li> <li><a href="https://www.apache.org/foundation/how-it-works" class="externalLink">How Apache Works</a></li> <li><a href="https://www.apache.org/foundation/" class="externalLink">Foundation</a></li> <li><a href="https://www.apache.org/foundation/sponsorship" class="externalLink">Sponsoring Apache</a></li> <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" class="externalLink">Privacy Policy</a></li> <li><a href="https://www.apache.org/foundation/thanks" class="externalLink">Thanks</a></li> </ul> </nav> <div class="well sidebar-nav"> <div id="poweredBy"> <div class="fb-like" style="border:none; margin-top: 10px" data-href="https://syncope.apache.org/" data-layout="box_count" data-show-faces="false" data-action="like" data-share="false"></div> <div class="clear"></div> <div id="twitter" style="border:none; margin-top: 10px"> <a href="https://twitter.com/syncopeidm" class="twitter-follow-button" data-show-count="false" data-align="left" data-size="medium" data-show-screen-name="true" data-lang="en" data-dnt="true" >Follow syncopeidm</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div> <div class="clear"></div> <a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a> </div> </div> </header> <main id="bodyColumn" class="span10"> <div class="toc_container"> <ul class="toc"> <li><a href="#Prerequisites">Prerequisites</a> <ul> <li><a href="#Additional_tools">Additional tools</a></li></ul></li> <li><a href="#Building_Syncope">Building Syncope</a> <ul> <li><a href="#Code_analysis">Code analysis</a></li></ul></li> <li><a href="#Building_documentation">Building documentation</a></li> <li><a href="#More_build_profiles">More build profiles</a> <ul> <li><a href="#fit.2Fcore-reference">fit/core-reference</a> <ul> <li><a href="#Other_Content-Type_values">Other Content-Type values</a></li> <li><a href="#Debug">Debug</a></li> <li><a href="#HotSwapAgent">HotSwapAgent</a></li> <li><a href="#DBMSes">DBMSes</a> <ul> <li><a href="#MySQL">MySQL</a></li> <li><a href="#MariaDB">MariaDB</a></li> <li><a href="#Oracle_database">Oracle database</a></li> <li><a href="#Neo4j">Neo4j</a></li></ul></li> <li><a href="#Java_EE_containers">Java EE containers</a> <ul> <li><a href="#Payara">Payara</a></li> <li><a href="#Wildfly">Wildfly</a></li></ul></li> <li><a href="#External_search_engines">External search engines</a> <ul> <li><a href="#Elasticsearch">Elasticsearch</a></li> <li><a href="#OpenSearch">OpenSearch</a></li></ul></li></ul></li> <li><a href="#fit.2Fconsole-reference">fit/console-reference</a> <ul> <li><a href="#Debug_1">Debug</a></li> <li><a href="#HotSwapAgent_1">HotSwapAgent</a></li></ul></li> <li><a href="#fit.2Fenduser-reference">fit/enduser-reference</a> <ul> <li><a href="#Debug_2">Debug</a></li> <li><a href="#HotSwapAgent_2">HotSwapAgent</a></li></ul></li> <li><a href="#fit.2Fwa-reference">fit/wa-reference</a> <ul> <li><a href="#Debug_3">Debug</a></li> <li><a href="#HotSwapAgent_3">HotSwapAgent</a></li></ul></li></ul></li></ul> </div> <section><a id="Prerequisites"></a> <h1>Prerequisites</h1> <p> </p> <ul> <li>JDK 8 for &#x2264; 2.1; JDK 11 for 3.0; JDK 21 for later versions</li> <li> Latest <a href="https://maven.apache.org/download.html" class="externalLink">Apache Maven</a> </li> <li> <a href="source-repository.html">Latest source code</a> </li> </ul> <section><a id="Additional_tools"></a> <h2>Additional tools</h2> <p> The <a href="https://www.gnu.org/software/patch/patch.html" class="externalLink">patch</a> program is needed. </p> <p> For Debian GNU / Linux and derivatives (as Ubuntu), install with </p> <pre class="prettyprint"><code>sudo apt install patch</code></pre> <p> On RPM yum style GNU / Linux systems, install with: </p> <pre class="prettyprint"><code>sudo yum install patch</code></pre> <p> On RPM dnf style GNU / Linux systems, install with: </p> <pre class="prettyprint"><code>sudo dnf install patch</code></pre> <p> On Windows you can find it in several distributions including <a href="http://gnuwin32.sourceforge.net/packages/patch.htm" class="externalLink">GNUWin32</a> </p> </section> </section> <section><a id="Building_Syncope"></a> <h1>Building Syncope</h1> <p> Before building Syncope, you need to setup an environment variable to give Maven more memory. </p> <p> On Unix </p> <pre class="prettyprint"><code>export MAVEN_OPTS=&quot;-Xms512m -Xmx1024m&quot;</code></pre> <p> On Windows </p> <pre class="prettyprint"><code>set MAVEN_OPTS=-Xms512m -Xmx1024m</code></pre> <p> To build Syncope simply execute (from within the top-level source directory): </p> <pre class="prettyprint"><code>$ mvn clean install</code></pre> <p> To build Syncope without running any test nor check do: </p> <pre class="prettyprint"><code>$ mvn -PskipTests,all</code></pre> <p> To build Syncope without running any test nor check, but generating Docker images, do: </p> <pre class="prettyprint"><code>$ mvn -PskipTests,all,docker</code></pre> <section><a id="Code_analysis"></a> <h2>Code analysis</h2> After build, it is possible to examine code quality by submitting the generated reports to a <a href="https://www.sonarqube.org/" class="externalLink">SonarQube</a> instance. Various installation methods are available, but the quicker seems to be via Docker: <pre class="prettyprint"><code>$ docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube</code></pre> Once SonarQube is up and runninig, submit the reports as follows: <pre class="prettyprint"><code>$ mvn sonar:sonar</code></pre> At the end, browse http://localhost:9000/dashboard?id=org.apache.syncope%3Asyncope to see results. </section> </section> <section><a id="Building_documentation"></a> <h1>Building documentation</h1> <p> To build Syncope documentation execute (from within the top-level source directory): </p> <pre class="prettyprint"><code>$ mvn -N -P site clean generate-resources</code></pre> The documentation artifacts are now be available under <code>target/generated-docs/</code>. </section> <section><a id="More_build_profiles"></a> <h1>More build profiles</h1> <p> Besides default, other Maven <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html" class="externalLink">build profiles</a> are provided, for developer convenience.<br /> Such profiles are limited to a specific module, hence Maven needs to be invoked from the corresponding subdirectory, not from top-level. </p> <section><a id="fit.2Fcore-reference"></a> <h2>fit/core-reference</h2> <section><section><a id="Other_Content-Type_values"></a> <h4>Other Content-Type values</h4> By default, integration tests are run using <code>application/json</code> for both <code>Accept</code> and <code>Content-Type</code> HTTP headers; it is possible, however, to use <code>application/xml</code> or <code>application/yaml</code>. <pre class="prettyprint"><code>$ mvn clean verify -DjaxrsContentType=application/xml</code></pre> <pre class="prettyprint"><code>$ mvn clean verify -DjaxrsContentType=application/yaml</code></pre> </section><section><a id="Debug"></a> <h4>Debug</h4> Starts the full environment used by integration tests (with same components available when running new project in <a href="docs/getting-started.html#paths-and-components">embedded mode</a> but console) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat). <pre class="prettyprint"><code>$ mvn -Pdebug,all</code></pre> or, without extensions <pre class="prettyprint"><code>$ mvn -Pdebug</code></pre> <p> Once started in debug mode, individual test methods can be executed as follows (the <a href="https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html" class="externalLink"> Maven Surefire Plugins rules</a> apply here): </p> <pre class="prettyprint"><code>$ mvn test -Dtest=UserITCase#list</code></pre> </section><section><a id="HotSwapAgent"></a> <h4>HotSwapAgent</h4> Similar to Debug, but with <a href="http://hotswapagent.org/" class="externalLink">HotSwapAgent</a> features enabled. <pre class="prettyprint"><code>$ mvn -Photswap,all</code></pre> </section><section><a id="DBMSes"></a> <h4>DBMSes</h4> <div class="alert alert-warning"> <p>The build profiles enlisted below require <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> <section><a id="MySQL"></a> <h5>MySQL</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Perform the full test suite against a real <a href="https://www.mysql.com/" class="externalLink">MySQL</a> database via <pre class="prettyprint"><code>$ mvn -Pmysql-it</code></pre> or <pre class="prettyprint"><code>$ mvn -Pmyjson-it</code></pre> (for JSON support) </section><section><a id="MariaDB"></a> <h5>MariaDB</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Perform the full test suite against a real <a href="https://mariadb.org/" class="externalLink">MariaDB</a> database via <pre class="prettyprint"><code>$ mvn -Pmariadb-it</code></pre> or <pre class="prettyprint"><code>$ mvn -Pmajson-it</code></pre> (for JSON support) </section><section><a id="Oracle_database"></a> <h5>Oracle database</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Perform the full test suite against a real <a href="https://www.oracle.com/products/database/" class="externalLink">Oracle</a> database via <pre class="prettyprint"><code>$ mvn -Poracle-it</code></pre> or <pre class="prettyprint"><code>$ mvn -Pojson-it</code></pre> (for JSON support) </section><section><a id="Neo4j"></a> <h5>Neo4j</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Prform the full test suite against a real <a href="https://neo4j.com/" class="externalLink">Neo4j</a> instance via <pre class="prettyprint"><code>$ mvn -Pneo4j-it</code></pre> </section></section><section><a id="Java_EE_containers"></a> <h4>Java EE containers</h4> <section><a id="Payara"></a> <h5>Payara</h5> Perform the full test suite by deploying Syncope core in <a href="http://www.payara.fish/" class="externalLink">Payara</a> via <pre class="prettyprint"><code>$ mvn -Ppayara-it</code></pre> </section><section><a id="Wildfly"></a> <h5>Wildfly</h5> Perform the full test suite by deploying Syncope core in <a href="http://www.wildfly.org" class="externalLink">Wildfly</a> via <pre class="prettyprint"><code>$ mvn -Pwildfly-it</code></pre> </section></section><section><a id="External_search_engines"></a> <h4>External search engines</h4> <section><a id="Elasticsearch"></a> <h5>Elasticsearch</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Perform the full test suite relying on a real <a href="https://www.elastic.co/" class="externalLink">Elasticsearch</a> instance via <pre class="prettyprint"><code>$ mvn -Pelasticsearch-it</code></pre> </section><section><a id="OpenSearch"></a> <h5>OpenSearch</h5> <div class="alert alert-warning"> <p>This build profile requires <a href="https://www.docker.com/" class="externalLink">Docker</a> to work.</p> </div> Perform the full test suite relying on a real <a href="https://opensearch.org/" class="externalLink">OpenSearch</a> instance via <pre class="prettyprint"><code>$ mvn -Popensearch-it</code></pre> </section></section></section></section> <section><a id="fit.2Fconsole-reference"></a> <h2>fit/console-reference</h2> <section><section><a id="Debug_1"></a> <h4>Debug</h4> Starts the full environment used by core's integration tests (with same components available when running new project in <a href="docs/getting-started.html#paths-and-components">embedded mode</a>, including Console) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat). <pre class="prettyprint"><code>$ mvn -Pdebug</code></pre> </section><section><a id="HotSwapAgent_1"></a> <h4>HotSwapAgent</h4> Similar to Debug, but with <a href="http://hotswapagent.org/" class="externalLink">HotSwapAgent</a> features enabled. <pre class="prettyprint"><code>$ mvn -Photswap</code></pre> </section></section></section> <section><a id="fit.2Fenduser-reference"></a> <h2>fit/enduser-reference</h2> <section><section><a id="Debug_2"></a> <h4>Debug</h4> Starts the full environment used by core's integration tests (with same components available when running new project in <a href="docs/getting-started.html#paths-and-components">embedded mode</a>, including Console and Enduser) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat). <pre class="prettyprint"><code>$ mvn -Pdebug</code></pre> </section><section><a id="HotSwapAgent_2"></a> <h4>HotSwapAgent</h4> Similar to Debug, but with <a href="http://hotswapagent.org/" class="externalLink">HotSwapAgent</a> features enabled. <pre class="prettyprint"><code>$ mvn -Photswap</code></pre> </section></section></section> <section><a id="fit.2Fwa-reference"></a> <h2>fit/wa-reference</h2> <section><section><a id="Debug_3"></a> <h4>Debug</h4> Starts the full environment used by core's integration tests (with same components available when running new project in <a href="docs/getting-started.html#paths-and-components">embedded mode</a>, including Console, Enduser and WA) and enables remote JPDA debugging on port 8000 in the running Java EE container (Tomcat). <pre class="prettyprint"><code>$ mvn -Pdebug</code></pre> </section><section><a id="HotSwapAgent_3"></a> <h4>HotSwapAgent</h4> Similar to Debug, but with <a href="http://hotswapagent.org/" class="externalLink">HotSwapAgent</a> features enabled. <pre class="prettyprint"><code>$ mvn -Photswap</code></pre> </section></section></section> </section> </main> </div> </div> <hr/> <footer> <div class="container-fluid"> <div class="row-fluid"> Copyright &copy; 2024, the Apache Software Foundation.<br/> Apache, Syncope, Apache Syncope, the Apache feather logo and the Apache Syncope project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. <div class="pull-right"> <a href="https://www.openhub.net/p/syncope"><img src="https://www.openhub.net/p/syncope/widgets/project_thin_badge.gif"/></a> <a href="https://bestpractices.coreinfrastructure.org/projects/154"> <img src="https://bestpractices.coreinfrastructure.org/projects/154/badge" style="vertical-align: top"/> </a> <img src="https://img.shields.io/maven-central/v/org.apache.syncope/syncope.png" style="vertical-align: top"/> <a href="https://github.com/apache/syncope/actions/workflows/crosschecks.yml"> <img src="https://github.com/apache/syncope/actions/workflows/crosschecks.yml/badge.svg" style="max-width:100%;vertical-align: top"> </a> <a href="https://github.com/apache/syncope/actions/workflows/codeql-analysis.yml"> <img src="https://github.com/apache/syncope/actions/workflows/codeql-analysis.yml/badge.svg" style="max-width:100%;vertical-align: top"> </a> </div> </div> </div> </footer> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10