syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Syncope > Create a new Syncope project
Date Thu, 26 Jul 2012 14:34:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/3/_/styles/combined.css?spaceKey=SYNCOPE&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Create
a new Syncope project</a></h2>
    <h4>Page <b>edited</b> by             <a href="">Fabio
                         <h4>Changes (1)</h4>
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >    -DarchetypeArtifactId=syncope-archetype
\ <br>    -DarchetypeRepository= \ <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-changed-words">-DarchetypeVersion=1.0.0-RC<span
class="diff-added-chars"style="background-color: #dfd;">3</span>-incubating</span>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
div.rbtoc1343313203939 {margin-left: 1.5em;padding: 0px;}
div.rbtoc1343313203939 ul {list-style: decimal;margin-left: 0px;}
div.rbtoc1343313203939 li {margin-left: 0px;padding-left: 0px;}

/*]]>*/</style><div class='rbtoc1343313203939'>
    <li><a href='#CreateanewSyncopeproject-Introduction'>Introduction</a></li>
    <li><a href='#CreateanewSyncopeproject-Prerequisites'>Prerequisites</a></li>
    <li><a href='#CreateanewSyncopeproject-Createnewproject'>Create new project</a></li>
    <li><a href='#CreateanewSyncopeproject-Stablereleases'>Stable releases</a></li>
    <li><a href='#CreateanewSyncopeproject-Snapshot%28development%29releases'>Snapshot
(development) releases</a></li>
    <li><a href='#CreateanewSyncopeproject-Buildnewproject'>Build new project</a></li>
    <li><a href='#CreateanewSyncopeproject-Wheretogofromhere%3F'>Where to go from
<h1><a name="CreateanewSyncopeproject-Introduction"></a>Introduction</h1>

<p>This document describes how to create a new Syncope project.<br/>
A Syncope project includes (at least) two web applications: the <b>core</b> and
the <b>console</b>. This page helps you get both web applications up and running
with your own project as quickly as possible.</p>

<h1><a name="CreateanewSyncopeproject-Prerequisites"></a>Prerequisites</h1>

<p>The preferred way to create a Syncope project is to generate a Maven project starting
from published archetype.</p>

<p>Hence you need:</p>

	<li><a href="" class="external-link" rel="nofollow">Apache
Maven</a> (version 3.0.3 or higher) installed;</li>
	<li>Some basic knowledge about Maven;</li>
	<li>Some basic knowledge about <a href=""
class="external-link" rel="nofollow">Maven WAR overlays</a>;</li>
	<li>Some basic knowledge about <a href=""
class="external-link" rel="nofollow">Maven archetypes</a>.</li>

<h1><a name="CreateanewSyncopeproject-Createnewproject"></a>Create new project</h1>

<p>Maven archetypes are templates of projects. Maven can generate a new project from
such a template. For a project using Syncope, you need the website archetype. In the folder
in which the new project folder should be created, type the command shown below. On Windows,
run the command on a single line and leave out the line continuation characters ('\').</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn archetype:generate \
    -DarchetypeGroupId=org.apache.syncope \
    -DarchetypeArtifactId=syncope-archetype \
    -DarchetypeRepository=http:<span class="code-comment">// \
</span>    -DarchetypeVersion=1.0.0-RC3-incubating

<p>The archetype is configured with default values for all properties required by the
archetype. If you want to customize any of these property values, type 'n' when prompted for

<p>You will be asked for:</p>
	<li>the groupId, (something like 'com.mycompany')</li>
	<li>the artifactId (something like 'myproject')</li>
	<li>the version number (you can use the default, it is good practice to have 'SNAPSHOT'
in the version number during development and the maven release plugin makes use of that string.
But ensure to comply to the desired numbering scheme for your project).</li>
	<li>the package name. This is the java package name. A folder structure according to
this name will be generated automatically. Use the default, which is equal to the groupId.</li>

<p>Maven will create a project for you (in a newly created directory named after the
value of the artifactId property you specified) containing two subprojects:</p>
	<li>core - a pre-configured RESTful server, with JPA persistence</li>
	<li>console - a web interface for dealing with the core</li>

<h2><a name="CreateanewSyncopeproject-Stablereleases"></a>Stable releases</h2>

<p>Take a look at available releases of the archetype project at <a href=""
class="external-link" rel="nofollow">central Maven repository</a>, then change the
<tt>archetypeVersion</tt> in the mvn command above accordingly.</p>

<h2><a name="CreateanewSyncopeproject-Snapshot%28development%29releases"></a>Snapshot
(development) releases</h2>

<p>As development go on, snapshot releases are published at <a href=""
class="external-link" rel="nofollow">ASF repository</a>.</p>

<p>If you want to test a snapshot release, be sure to:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">http:<span class="code-comment">//</span></pre>
<p> to </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">http:<span class="code-comment">//</span></pre>
<p> in the mvn command above</p></li>
	<li>add the following code right before <tt>&lt;/project&gt;</tt>
in root <tt>pom.xml</tt> of the generated project:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
      &lt;url&gt;https:<span class="code-comment">//;/url&gt;
</span>      &lt;snapshots&gt;
        &lt;enabled&gt;<span class="code-keyword">true</span>&lt;/enabled&gt;

<h1><a name="CreateanewSyncopeproject-Buildnewproject"></a>Build new project</h1>

<p>Now build your project using the following command in the root folder of your project:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean <span class="code-keyword">package</span>

<p>This will produce two WAR files:</p>

<h1><a name="CreateanewSyncopeproject-Wheretogofromhere%3F"></a>Where to
go from here?</h1>

<p>Once you have create your project and verified that build went fine, you can now
see how to <a href="/confluence/display/SYNCOPE/Run+Syncope+in+embedded+mode" title="Run
Syncope in embedded mode">run an embedded demo</a> or <a href="/confluence/display/SYNCOPE/Run+Syncope+in+real+environments"
title="Run Syncope in real environments">deploy to a real environment</a>.</p>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message