You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/02/13 12:26:47 UTC
[1/5] syncope git commit: [SYNCOPE-620] installer
Repository: syncope
Updated Branches:
refs/heads/2_0_X 6907427fb -> 50a9236ed
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/modelerPom.xml
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/modelerPom.xml b/syncope620/installer/src/main/resources/modelerPom.xml
new file mode 100644
index 0000000..f0f01f6
--- /dev/null
+++ b/syncope620/installer/src/main/resources/modelerPom.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<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>
+
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>activitiModelerSetup</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <activiti.version>5.16.4</activiti.version>
+ <activiti-modeler.directory>${modeler.directory}</activiti-modeler.directory>
+ <tokenValueMap>${modeler.directory}/oryx.debug.js-tokenValueMap.properties</tokenValueMap>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.activiti</groupId>
+ <artifactId>activiti-webapp-explorer2</artifactId>
+ <version>${activiti.version}</version>
+ <type>war</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>setupActivitiModeler</id>
+ <phase>process-resources</phase>
+ <configuration>
+ <target>
+ <unzip src="${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war"
+ dest="${project.build.directory}/activiti-webapp-explorer2" />
+
+ <mkdir dir="${activiti-modeler.directory}" />
+
+ <mkdir dir="${activiti-modeler.directory}/editor" />
+ <copy todir="${activiti-modeler.directory}/editor">
+ <fileset dir="${project.build.directory}/activiti-webapp-explorer2/editor">
+ <exclude name="oryx.js" />
+ </fileset>
+ </copy>
+ <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml"
+ todir="${activiti-modeler.directory}/editor" />
+ <copy file="${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json"
+ todir="${activiti-modeler.directory}/editor" />
+
+ <mkdir dir="${activiti-modeler.directory}/explorer" />
+ <copy todir="${activiti-modeler.directory}/explorer">
+ <fileset dir="${project.build.directory}/activiti-webapp-explorer2/explorer" />
+ </copy>
+
+ <mkdir dir="${activiti-modeler.directory}/libs" />
+ <copy todir="${activiti-modeler.directory}/libs">
+ <fileset dir="${project.build.directory}/activiti-webapp-explorer2/libs" />
+ </copy>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>replacer</artifactId>
+ <version>1.5.3</version>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <file>${activiti-modeler.directory}/editor/oryx.debug.js</file>
+ <tokenValueMap>${tokenValueMap}</tokenValueMap>
+ <unescape>true</unescape>
+ <regex>false</regex>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/pom.xml b/syncope620/pom.xml
index 37c783b..6593b97 100644
--- a/syncope620/pom.xml
+++ b/syncope620/pom.xml
@@ -371,6 +371,10 @@ under the License.
<wicket.version>6.19.0</wicket.version>
+ <izpack.version>5.0.0-rc4</izpack.version>
+ <httpclient.version>4.3.6</httpclient.version>
+ <maven-invoker.version>2.1.1</maven-invoker.version>
+
<testds.port>1389</testds.port>
<testdb.webport>9082</testdb.webport>
@@ -913,6 +917,34 @@ under the License.
<version>1.47</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-compiler</artifactId>
+ <version>${izpack.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-panel</artifactId>
+ <version>${izpack.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-invoker</artifactId>
+ <version>${maven-invoker.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+
<!-- TEST -->
<dependency>
<groupId>net.tirasa.connid.bundles.soap</groupId>
@@ -1167,6 +1199,18 @@ under the License.
<artifactId>jdeb</artifactId>
<version>1.3</version>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-maven-plugin</artifactId>
+ <version>${izpack.version}</version>
+ </plugin>
</plugins>
</pluginManagement>
@@ -1438,6 +1482,7 @@ under the License.
<module>archetype</module>
<module>standalone</module>
<module>deb</module>
+ <module>installer</module>
</modules>
</project>
[4/5] syncope git commit: [SYNCOPE-620] installer
Posted by il...@apache.org.
[SYNCOPE-620] installer
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f5017841
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f5017841
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f5017841
Branch: refs/heads/2_0_X
Commit: f5017841565bbe3a6594c4f23192f297f6c0e08b
Parents: 689e8bb
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Feb 13 12:26:22 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 13 12:26:22 2015 +0100
----------------------------------------------------------------------
syncope620/client/cli/pom.xml | 47 +-
syncope620/installer/LICENSE | 426 +++++++++++++++++++
syncope620/installer/NOTICE | 73 ++++
syncope620/installer/pom.xml | 219 ++++++++++
.../installer/containers/AbstractContainer.java | 31 ++
.../syncope/installer/containers/Glassfish.java | 49 +++
.../syncope/installer/containers/Tomcat.java | 84 ++++
.../installer/containers/jboss/JBoss.java | 79 ++++
.../containers/jboss/JBossAddResponse.java | 72 ++++
.../jboss/JBossDeployRequestContent.java | 70 +++
.../syncope/installer/enums/Containers.java | 49 +++
.../org/apache/syncope/installer/enums/DBs.java | 52 +++
.../installer/files/ConsoleProperties.java | 31 ++
.../installer/files/GlassfishCoreWebXml.java | 33 ++
.../files/JBossDeploymentStructureXml.java | 28 ++
.../syncope/installer/files/ModelerPom.java | 80 ++++
.../installer/files/ModelerTokenValueMap.java | 58 +++
.../apache/syncope/installer/files/OrmXml.java | 381 +++++++++++++++++
.../syncope/installer/files/ParentPom.java | 37 ++
.../files/PersistenceContextEMFactoryXml.java | 31 ++
.../installer/files/PersistenceProperties.java | 94 ++++
.../installer/processes/ArchetypeProcess.java | 134 ++++++
.../installer/processes/BaseProcess.java | 54 +++
.../installer/processes/ContainerProcess.java | 322 ++++++++++++++
.../installer/processes/PersistenceProcess.java | 93 ++++
.../installer/utilities/DriverLoader.java | 102 +++++
.../installer/utilities/FileSystemUtils.java | 171 ++++++++
.../syncope/installer/utilities/HttpUtils.java | 212 +++++++++
.../syncope/installer/utilities/InstallLog.java | 70 +++
.../syncope/installer/utilities/JsonUtils.java | 48 +++
.../syncope/installer/utilities/MavenUtils.java | 210 +++++++++
.../installer/utilities/PasswordGenerator.java | 41 ++
.../installer/validators/AbstractValidator.java | 28 ++
.../validators/ArchetypeValidator.java | 91 ++++
.../validators/ContainerValidator.java | 158 +++++++
.../validators/PersistenceValidator.java | 134 ++++++
.../src/main/resources/installer.properties | 26 ++
.../main/resources/izpack/ProcessPanel.Spec.xml | 94 ++++
.../resources/izpack/html/prerequisites.html | 66 +++
.../src/main/resources/izpack/html/welcome.html | 50 +++
.../izpack/img/apache-syncope-vert.png | Bin 0 -> 27925 bytes
.../resources/izpack/img/welcome_background.jpg | Bin 0 -> 80658 bytes
.../src/main/resources/izpack/install.xml | 174 ++++++++
.../main/resources/izpack/userInputLang.xml_eng | 66 +++
.../main/resources/izpack/userInputLang.xml_ita | 66 +++
.../src/main/resources/izpack/userInputSpec.xml | 247 +++++++++++
.../installer/src/main/resources/modelerPom.xml | 113 +++++
syncope620/pom.xml | 45 ++
48 files changed, 4822 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/client/cli/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/client/cli/pom.xml b/syncope620/client/cli/pom.xml
index fa70a01..f7fa07d 100644
--- a/syncope620/client/cli/pom.xml
+++ b/syncope620/client/cli/pom.xml
@@ -34,10 +34,6 @@ under the License.
<groupId>org.apache.syncope</groupId>
<artifactId>syncope-client-cli</artifactId>
<packaging>jar</packaging>
-
- <properties>
- <log.directory>/tmp</log.directory>
- </properties>
<dependencies>
<dependency>
@@ -84,9 +80,28 @@ under the License.
<plugins>
<plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ project.properties['log.directory'] = System.getProperty("java.io.tmpdir")
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>2.3</version>
+ <inherited>true</inherited>
<executions>
<execution>
<phase>package</phase>
@@ -126,25 +141,23 @@ under the License.
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
- <targetPath>${project.build.directory}/classes</targetPath>
- <includes>
- <include>log4j2.xml</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <targetPath>${project.build.directory}/classes</targetPath>
- <includes>
- <include>syncope.properties</include>
- </includes>
</resource>
+
<resource>
<directory>..</directory>
<targetPath>META-INF</targetPath>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/LICENSE
----------------------------------------------------------------------
diff --git a/syncope620/installer/LICENSE b/syncope620/installer/LICENSE
new file mode 100644
index 0000000..9690c72
--- /dev/null
+++ b/syncope620/installer/LICENSE
@@ -0,0 +1,426 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+==
+
+For ASM (http://asm.ow2.org/):
+This is licensed under the BSD license.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted
+provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of
+ conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+ * Neither the name of the author nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+==
+
+For IzPack (http://izpack.org/):
+This is licensed under the AL 2.0, see above.
+
+==
+
+For Jackson (http://wiki.fasterxml.com/JacksonHome):
+This is licensed under the AL 2.0, see above.
+
+==
+
+For JDOM (http://www.jdom.org/):
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the disclaimer that follows
+ these conditions in the documentation and/or other materials
+ provided with the distribution.
+
+ 3. The name "JDOM" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact <request_AT_jdom_DOT_org>.
+
+ 4. Products derived from this software may not be called "JDOM", nor
+ may "JDOM" appear in their name, without prior written permission
+ from the JDOM Project Management <request_AT_jdom_DOT_org>.
+
+ In addition, we request (but do not require) that you include in the
+ end-user documentation provided with the redistribution and/or in the
+ software itself an acknowledgement equivalent to the following:
+ "This product includes software developed by the
+ JDOM Project (http://www.jdom.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos
+ available at http://www.jdom.org/images/logos.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the JDOM Project and was originally
+ created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
+ Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
+ on the JDOM Project, please see <http://www.jdom.org/>.
+
+==
+
+For Laf-widget (https://java.net/projects/laf-widget/):
+This is licensed under the BSD license, see above.
+
+==
+
+For Jgoodies (https://java.net/projects/jgoodies/):
+This is licensed under the BSD license, see above.
+
+==
+
+For NanoXML (http://nanoxml.sourceforge.net/orig/):
+This is licensed under the zlib/libpng license.
+
+This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source distribution.
+
+==
+
+For PicoContainer (http://picocontainer.codehaus.org/):
+This is licensed under the BSD license, see above.
+
+==
+
+For Plexus (http://plexus.codehaus.org/):
+This is licensed under the AL 2.0, see above.
+
+==
+
+For Substance (http://insubstantial.github.io/insubstantial/)
+This is licensed under the BSD license, see above.
+
+==
+
+For Eclipse SWT Win32 (http://www.eclipse.org/swt/):
+
+This program and the accompanying materials are licensed under
+the terms of the Eclipse Public License v 1.0.
+
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with this Agreement.
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within the Program.
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Los
ses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b)
above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+==
+
+For Trident (https://github.com/kirillcool/trident):
+This is licensed under the Eclipse Public License v 1.0 license, see above.
+
+==
+
+For XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/):
+This is licensed under the Indiana University Extreme! Lab Software License, version 1.1.1.
+
+Indiana University Extreme! Lab Software License
+Version 1.1.1
+Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+3. The end-user documentation included with the redistribution, if any, must
+include the following acknowledgment:
+"This product includes software developed by the Indiana University Extreme! Lab
+(http://www.extreme.indiana.edu/)."
+Alternately, this acknowledgment may appear in the software itself, if and
+wherever such third-party acknowledgments normally appear.
+4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" must not
+be used to endorse or promote products derived from this software without prior
+written permission. For written permission, please contact
+http://www.extreme.indiana.edu/.
+5. Products derived from this software may not use "Indiana Univeristy" name nor
+may "Indiana Univeristy" appear in their name, without prior written permission
+of the Indiana University.
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS,
+COPYRIGHT HOLDERS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/NOTICE
----------------------------------------------------------------------
diff --git a/syncope620/installer/NOTICE b/syncope620/installer/NOTICE
new file mode 100644
index 0000000..1c07583
--- /dev/null
+++ b/syncope620/installer/NOTICE
@@ -0,0 +1,73 @@
+Apache Syncope
+Copyright 2012-2014 The Apache Software Foundation
+
+This product includes software developed by:
+The Apache Software Foundation (http://www.apache.org/).
+
+The following copyright notice(s) were affixed to portions of this code
+with which this file is now or was at one time distributed.
+
+==
+
+This product includes software developed by the ASM project (http://asm.ow2.org/).
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+==
+
+This product includes software developed by the IzPack project (http://izpack.org/).
+Copyright 2001-2008 Julien Ponge
+All rights reserved.
+
+==
+
+This product includes software developed by the Jackson project (http://wiki.fasterxml.com/JacksonHome).
+
+==
+
+This product includes software developed by the JDOM project (http://www.jdom.org/).
+Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
+All rights reserved.
+
+==
+
+This product includes software developed by the Laf-widget project (https://java.net/projects/laf-widget/).
+
+==
+
+This product includes software developed by the Jgoodies project (https://java.net/projects/jgoodies/).
+
+==
+
+This product includes software developed by the NanoXML project (http://nanoxml.sourceforge.net/orig/).
+Copyright (C) 2000-2002 Marc De Scheemaecker.
+All Rights Reserved
+
+==
+
+This product includes software developed by the PicoContainer project (http://picocontainer.codehaus.org/).
+
+==
+
+This product includes software developed by the Plexus project (http://plexus.codehaus.org/).
+
+==
+
+This product includes software developed by the Insubstantial project (http://insubstantial.github.io/insubstantial/).
+Copyright (c) 2006-2007 Nigel Hughes
+
+==
+
+This product includes software developed by the Eclipse Software Foundation (http://www.eclipse.org/swt/).
+This software is included in binary form only.
+
+==
+
+This product includes software developed by the Trident project (https://github.com/kirillcool/trident).
+This software is included in binary form only.
+
+==
+
+This product includes software developed by the Indiana University Extreme! Lab.
+Copyright (c) 2002 Extreme! Lab, Indiana University.
+All rights reserved.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/installer/pom.xml b/syncope620/installer/pom.xml
new file mode 100644
index 0000000..5dabca4
--- /dev/null
+++ b/syncope620/installer/pom.xml
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<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.apache.syncope</groupId>
+ <artifactId>syncope</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <name>Apache Syncope Installer</name>
+ <description>Apache Syncope Installer</description>
+
+ <groupId>org.apache.syncope</groupId>
+ <artifactId>syncope-installer</artifactId>
+ <packaging>jar</packaging>
+
+ <properties>
+ <staging.dir>${project.build.directory}/staging</staging.dir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-compiler</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.incors</groupId>
+ <artifactId>kunstoff-laf</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-panel</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-invoker</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+ <defaultGoal>package</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${staging.dir}</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/izpack</directory>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>..</directory>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-izpack-dependencies</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/staging/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.izpack</groupId>
+ <artifactId>izpack-maven-plugin</artifactId>
+ <configuration>
+ <attach>false</attach>
+ <descriptorEncoding>${project.build.sourceEncoding}</descriptorEncoding>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>izpack</goal>
+ </goals>
+ <configuration>
+ <baseDir>${staging.dir}</baseDir>
+ <installFile>${staging.dir}/install.xml</installFile>
+ <classifier>uber</classifier>
+ <excludeGroupIds>junit</excludeGroupIds>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>installer.properties</include>
+ <include>modelerPom.xml</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>${basedir}/../fit/core-reference/src/main/resources/jboss</directory>
+ <includes>
+ <include>**/persistenceContextEMFactory.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>apache-release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/AbstractContainer.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/AbstractContainer.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/AbstractContainer.java
new file mode 100644
index 0000000..61d9927
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/AbstractContainer.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers;
+
+public abstract class AbstractContainer {
+
+ protected static final String UNIX_CORE_RELATIVE_PATH = "%s/%s/core/target/syncope.war";
+
+ protected static final String WIN_CORE_RELATIVE_PATH = "%s\\%s\\core\\target\\syncope.war";
+
+ protected static final String UNIX_CONSOLE_RELATIVE_PATH = "%s/%s/console/target/syncope-console.war";
+
+ protected static final String WIN_CONSOLE_RELATIVE_PATH = "%s\\%s\\console\\target\\syncope-console.war";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Glassfish.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Glassfish.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Glassfish.java
new file mode 100644
index 0000000..5f174df
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Glassfish.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers;
+
+public class Glassfish extends AbstractContainer {
+
+ private final String installPath;
+
+ private final String artifactId;
+
+ public Glassfish(final String installPath, final String artifactId) {
+ this.installPath = installPath;
+ this.artifactId = artifactId;
+ }
+
+ public String deployCore() {
+ return deploy(UNIX_CORE_RELATIVE_PATH);
+ }
+
+ public String deployConsole() {
+ return deploy(UNIX_CONSOLE_RELATIVE_PATH);
+ }
+
+ public String deploy(final String what) {
+ return String.format(what, installPath, artifactId);
+ }
+
+ public static final String CREATE_JAVA_OPT_COMMAND = "/bin/asadmin create-jvm-options"
+ + "-Dcom.sun.enterprise.overrideablejavaxpackages=javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext";
+
+ public static final String DEPLOY_COMMAND = "/bin/asadmin deploy ";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Tomcat.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Tomcat.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Tomcat.java
new file mode 100644
index 0000000..56b68ed
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/Tomcat.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import org.apache.syncope.installer.utilities.HttpUtils;
+
+public class Tomcat extends AbstractContainer {
+
+ private static final boolean IS_WIN = System.getProperty("os.name").toLowerCase().contains("win");
+
+ private static final String DEPLOY_SYNCOPE_CORE_QUERY = "/manager/text/deploy?path=/syncope&war=file:";
+
+ private static final String DEPLOY_SYNCOPE_CONSOLE_QUERY = "/manager/text/deploy?path=/syncope-console&war=file:";
+
+ private final String installPath;
+
+ private final String artifactId;
+
+ private final HttpUtils httpUtils;
+
+ public Tomcat(final boolean tomcatSsl, final String tomcatHost, final String tomcatPort,
+ final String installPath, final String artifactId, final String tomcatUser, final String tomcatPassword,
+ final AbstractUIProcessHandler handler) {
+ this.installPath = installPath;
+ this.artifactId = artifactId;
+ httpUtils = new HttpUtils(tomcatSsl, tomcatHost, tomcatPort, tomcatUser, tomcatPassword, handler);
+ }
+
+ public boolean deployCore() {
+ int status;
+ if (IS_WIN) {
+ status = httpUtils.getWithBasicAuth(DEPLOY_SYNCOPE_CORE_QUERY
+ + pathEncoded(String.format(WIN_CORE_RELATIVE_PATH, installPath, artifactId)));
+ } else {
+ status = httpUtils.getWithBasicAuth(path(DEPLOY_SYNCOPE_CORE_QUERY + UNIX_CORE_RELATIVE_PATH));
+ }
+
+ return status == 200;
+ }
+
+ public boolean deployConsole() {
+ int status;
+ if (IS_WIN) {
+ status = httpUtils.getWithBasicAuth(DEPLOY_SYNCOPE_CONSOLE_QUERY
+ + pathEncoded(String.format(WIN_CONSOLE_RELATIVE_PATH, installPath, artifactId)));
+ } else {
+ status = httpUtils.getWithBasicAuth(path(DEPLOY_SYNCOPE_CONSOLE_QUERY + UNIX_CONSOLE_RELATIVE_PATH));
+ }
+
+ return status == 200;
+ }
+
+ private String pathEncoded(final String what) {
+ String path = "";
+ try {
+ path = URLEncoder.encode(what, "UTF-8");
+ } catch (UnsupportedEncodingException uee) {
+ }
+ return path;
+ }
+
+ private String path(final String what) {
+ return String.format(what, installPath, artifactId);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBoss.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBoss.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBoss.java
new file mode 100644
index 0000000..c0e6722
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBoss.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers.jboss;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import org.apache.syncope.installer.containers.AbstractContainer;
+import org.apache.syncope.installer.utilities.HttpUtils;
+import org.apache.syncope.installer.utilities.JsonUtils;
+
+public class JBoss extends AbstractContainer {
+
+ private final String addContentUrl = "http://%s:%s/management/add-content";
+
+ private final String enableUrl = "http://%s:%s/management/";
+
+ private final boolean jbossSsl;
+
+ private final String jbossHost;
+
+ private final String jbossManagementPort;
+
+ private final String installPath;
+
+ private final String artifactId;
+
+ private final HttpUtils httpUtils;
+
+ public JBoss(final boolean jbossSsl, final String jbossHost, final String jbossManagementPort,
+ final String jbossAdminUsername, final String jbossAdminPassword,
+ final String installPath, final String artifactId, final AbstractUIProcessHandler handler) {
+ this.jbossSsl = jbossSsl;
+ this.jbossHost = jbossHost;
+ this.jbossManagementPort = jbossManagementPort;
+ this.installPath = installPath;
+ this.artifactId = artifactId;
+ httpUtils = new HttpUtils(jbossSsl, jbossHost, jbossManagementPort, jbossAdminUsername, jbossAdminPassword, handler);
+
+ }
+
+ public boolean deployCore() {
+ return deploy(UNIX_CORE_RELATIVE_PATH, "syncope.war");
+ }
+
+ public boolean deployConsole() {
+ return deploy(UNIX_CONSOLE_RELATIVE_PATH, "syncope-console.war");
+ }
+
+ public boolean deploy(final String whatDeploy, final String warName) {
+ final String responseBodyAsString = httpUtils.postWithDigestAuth(
+ String.format(addContentUrl, jbossHost, jbossManagementPort),
+ String.format(whatDeploy, installPath, artifactId));
+
+ final JBossAddResponse jBossAddResponse = JsonUtils.jBossAddResponse(responseBodyAsString);
+
+ final JBossDeployRequestContent jBossDeployRequestContent = new JBossDeployRequestContent(
+ jBossAddResponse.getResult().getBYTES_VALUE(), warName);
+
+ int status = httpUtils.
+ postWithStringEntity(String.format(enableUrl, jbossHost, jbossManagementPort),
+ JsonUtils.jBossDeployRequestContent(jBossDeployRequestContent));
+ return status == 200;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossAddResponse.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossAddResponse.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossAddResponse.java
new file mode 100644
index 0000000..48ee621
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossAddResponse.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers.jboss;
+
+public class JBossAddResponse {
+
+ public class JBossBytesValue {
+
+ public String BYTES_VALUE;
+
+ public JBossBytesValue() {
+ }
+
+ public JBossBytesValue(String BYTES_VALUE) {
+ this.BYTES_VALUE = BYTES_VALUE;
+ }
+
+ public String getBYTES_VALUE() {
+ return BYTES_VALUE;
+ }
+
+ public void setBYTES_VALUE(String BYTES_VALUE) {
+ this.BYTES_VALUE = BYTES_VALUE;
+ }
+
+ }
+
+ public String outcome;
+
+ public JBossBytesValue result;
+
+ public JBossAddResponse() {
+ }
+
+ public JBossAddResponse(String outcome, JBossBytesValue result) {
+ this.outcome = outcome;
+ this.result = result;
+ }
+
+ public void setOutcome(String outcome) {
+ this.outcome = outcome;
+ }
+
+ public void setResult(JBossBytesValue result) {
+ this.result = result;
+ }
+
+ public String getOutcome() {
+ return outcome;
+ }
+
+ public JBossBytesValue getResult() {
+ return result;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossDeployRequestContent.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossDeployRequestContent.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossDeployRequestContent.java
new file mode 100644
index 0000000..4775cfa
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/containers/jboss/JBossDeployRequestContent.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.containers.jboss;
+
+public class JBossDeployRequestContent {
+
+ public final JBossDeployRequest[] content = new JBossDeployRequest[1];
+
+ public final JBossDeployment[] address = new JBossDeployment[1];
+
+ public final String operation = "add";
+
+ public final String enabled = "true";
+
+ public JBossDeployRequestContent(final String hash, final String address) {
+ this.content[0] = new JBossDeployRequest(hash);
+ this.address[0] = new JBossDeployment(address);
+ }
+
+ public class JBossDeployRequest {
+
+ public JBossBytesValue hash;
+
+ public JBossBytesValue getHash() {
+ return hash;
+ }
+
+ public JBossDeployRequest(final String hash) {
+ this.hash = new JBossBytesValue(hash);
+ }
+ }
+
+ public class JBossBytesValue {
+
+ public String BYTES_VALUE;
+
+ public JBossBytesValue(final String BYTES_VALUE) {
+ this.BYTES_VALUE = BYTES_VALUE;
+ }
+ }
+
+ public class JBossDeployment {
+
+ public String deployment;
+
+ public JBossDeployment(String deployment) {
+ this.deployment = deployment;
+ }
+
+ public String getDeployment() {
+ return deployment;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/Containers.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/Containers.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/Containers.java
new file mode 100644
index 0000000..ac8e036
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/Containers.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.enums;
+
+public enum Containers {
+
+ TOMCAT("tomcat"),
+ JBOSS("jboss"),
+ GLASSFISH("glassfish");
+
+ private Containers(final String name) {
+ this.name = name;
+ }
+
+ private final String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public static Containers fromContainerName(final String containerName) {
+ Containers container = null;
+ if (TOMCAT.getName().equalsIgnoreCase(containerName)) {
+ container = TOMCAT;
+ } else if (JBOSS.getName().equalsIgnoreCase(containerName)) {
+ container = JBOSS;
+ } else if (GLASSFISH.getName().equalsIgnoreCase(containerName)) {
+ container = GLASSFISH;
+ }
+ return container;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/DBs.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/DBs.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/DBs.java
new file mode 100644
index 0000000..db7f8ec
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/enums/DBs.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.enums;
+
+public enum DBs {
+
+ POSTGRES("postgres"),
+ MYSQL("mysql"),
+ SQLSERVER("sqlserver"),
+ ORACLE("oracle");
+
+ private DBs(final String name) {
+ this.name = name;
+ }
+
+ private final String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public static DBs fromDbName(final String containerName) {
+ DBs db = null;
+ if (POSTGRES.getName().equalsIgnoreCase(containerName)) {
+ db = POSTGRES;
+ } else if (MYSQL.getName().equalsIgnoreCase(containerName)) {
+ db = MYSQL;
+ } else if (ORACLE.getName().equalsIgnoreCase(containerName)) {
+ db = ORACLE;
+ } else {
+ db = SQLSERVER;
+ }
+
+ return db;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ConsoleProperties.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ConsoleProperties.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ConsoleProperties.java
new file mode 100644
index 0000000..d6d2deb
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ConsoleProperties.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class ConsoleProperties {
+
+ public static final String PLACEHOLDER = "scheme=http\n"
+ + "host=localhost\n"
+ + "port=8080";
+
+ public static final String CONSOLE = "scheme=%s\n"
+ + "host=%s\n"
+ + "port=%s";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java
new file mode 100644
index 0000000..9eadedd
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class GlassfishCoreWebXml {
+
+ public static final String PLACEHOLDER = " <!--<resource-ref>\n"
+ + " <res-ref-name>jdbc/syncopeDataSource</res-ref-name>\n"
+ + " <jndi-name>jdbc/syncopeDataSource</jndi-name>\n"
+ + " </resource-ref>-->";
+
+ public static final String DATA_SOURCE = " <resource-ref>\n"
+ + " <res-ref-name>jdbc/syncopeDataSource</res-ref-name>\n"
+ + " <jndi-name>jdbc/syncopeDataSource</jndi-name>\n"
+ + " </resource-ref>";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/JBossDeploymentStructureXml.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/JBossDeploymentStructureXml.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/JBossDeploymentStructureXml.java
new file mode 100644
index 0000000..1d70e36
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/JBossDeploymentStructureXml.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class JBossDeploymentStructureXml {
+
+ public static final String PLACEHOLDER = "<module name=\"org.apache.xalan\"/>";
+
+ public static final String JBOSSMODULE = "<module name=\"org.apache.xalan\"/>\n"
+ + "<module name=\"%s\"/>";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java
new file mode 100644
index 0000000..143d849
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class ModelerPom {
+
+ public static final String PATH = "/pom.xml";
+
+ public static final String FILE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ + "<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n"
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+ + " xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0\n"
+ + " http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n"
+ + " <modelVersion>4.0.0</modelVersion>\n" + " \n" + " <groupId>org.apache.syncope</groupId>\n"
+ + " <artifactId>activitiModelerSetup</artifactId>\n" + " <version>1.0-SNAPSHOT</version>\n"
+ + " <packaging>jar</packaging>\n" + " \n" + " <properties>\n"
+ + " <activiti.version>5.16.2</activiti.version>\n"
+ + " <activiti-modeler.directory>%s</activiti-modeler.directory>\n"
+ + " <tokenValueMap>%s/oryx.debug.js-tokenValueMap.properties</tokenValueMap>\n" + " \n"
+ + " <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n" + " </properties>\n" + " \n"
+ + " <dependencies>\n" + " <dependency>\n" + " <groupId>org.activiti</groupId>\n"
+ + " <artifactId>activiti-webapp-explorer2</artifactId> \n"
+ + " <version>${activiti.version}</version>\n" + " <type>war</type>\n"
+ + " <scope>test</scope>\n" + " </dependency> \n" + " </dependencies>\n" + " \n"
+ + " <build> \n" + " <plugins>\n" + " <plugin>\n"
+ + " <groupId>org.apache.maven.plugins</groupId>\n"
+ + " <artifactId>maven-antrun-plugin</artifactId>\n" + " <version>1.7</version>\n"
+ + " <executions>\n" + " <execution>\n" + " <id>setupActivitiModeler</id>\n"
+ + " <phase>process-resources</phase>\n" + " <configuration>\n"
+ + " <target>\n"
+ + " <unzip src=\"${settings.localRepository}/org/activiti/activiti-webapp-explorer2/${activiti.version}/activiti-webapp-explorer2-${activiti.version}.war\"\n"
+ + " dest=\"${project.build.directory}/activiti-webapp-explorer2\" />\n"
+ + " \n" + " <mkdir dir=\"${activiti-modeler.directory}\" />\n"
+ + " \n" + " <mkdir dir=\"${activiti-modeler.directory}/editor\" />\n"
+ + " <copy todir=\"${activiti-modeler.directory}/editor\">\n"
+ + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/editor\">\n"
+ + " <exclude name=\"oryx.js\" />\n" + " </fileset>\n"
+ + " </copy>\n"
+ + " <copy file=\"${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/plugins.xml\"\n"
+ + " todir=\"${activiti-modeler.directory}/editor\" />\n"
+ + " <copy file=\"${project.build.directory}/activiti-webapp-explorer2/WEB-INF/classes/stencilset.json\"\n"
+ + " todir=\"${activiti-modeler.directory}/editor\" />\n" + " \n"
+ + " <mkdir dir=\"${activiti-modeler.directory}/explorer\" />\n"
+ + " <copy todir=\"${activiti-modeler.directory}/explorer\">\n"
+ + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/explorer\" />\n"
+ + " </copy>\n" + " \n"
+ + " <mkdir dir=\"${activiti-modeler.directory}/libs\" />\n"
+ + " <copy todir=\"${activiti-modeler.directory}/libs\">\n"
+ + " <fileset dir=\"${project.build.directory}/activiti-webapp-explorer2/libs\" />\n"
+ + " </copy>\n" + " </target>\n" + " </configuration>\n"
+ + " <goals>\n" + " <goal>run</goal>\n" + " </goals>\n"
+ + " </execution>\n" + " </executions>\n" + " </plugin>\n" + " <plugin>\n"
+ + " <groupId>com.google.code.maven-replacer-plugin</groupId>\n"
+ + " <artifactId>replacer</artifactId>\n" + " <version>1.5.3</version>\n"
+ + " <executions>\n" + " <execution>\n" + " <phase>process-resources</phase>\n"
+ + " <goals>\n" + " <goal>replace</goal>\n"
+ + " </goals> \n" + " </execution>\n" + " </executions>\n"
+ + " <configuration>\n"
+ + " <file>${activiti-modeler.directory}/editor/oryx.debug.js</file>\n"
+ + " <tokenValueMap>${tokenValueMap}</tokenValueMap>\n" + " <unescape>true</unescape>\n"
+ + " <regex>false</regex>\n" + " </configuration>\n" + " </plugin>\n"
+ + " </plugins>\n" + " </build>\n" + "</project>";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java
new file mode 100644
index 0000000..e99bd0d
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class ModelerTokenValueMap {
+
+ public static final String PATH = "/oryx.debug.js-tokenValueMap.properties";
+
+ public static final String FILE = "# Licensed to the Apache Software Foundation (ASF) under one\n"
+ + "# or more contributor license agreements. See the NOTICE file\n"
+ + "# distributed with this work for additional information\n"
+ + "# regarding copyright ownership. The ASF licenses this file\n"
+ + "# to you under the Apache License, Version 2.0 (the\n"
+ + "# \"License\"); you may not use this file except in compliance\n"
+ + "# with the License. You may obtain a copy of the License at\n" + "#\n"
+ + "# http://www.apache.org/licenses/LICENSE-2.0\n" + "#\n"
+ + "# Unless required by applicable law or agreed to in writing,\n"
+ + "# software distributed under the License is distributed on an\n"
+ + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
+ + "# KIND, either express or implied. See the License for the\n"
+ + "# specific language governing permissions and limitations\n" + "# under the License.\n"
+ + "ORYX.CONFIG.ROOT_PATH \\= \"../editor/\"; //TODO: Remove last slash!!=BASE_PATH = window.location.toString().substr(0, window.location.toString().indexOf('/wicket'));\\nORYX.CONFIG.ROOT_PATH = BASE_PATH + \"/activiti-modeler/editor/\";\n"
+ + "ORYX.CONFIG.EXPLORER_PATH \\= \"../explorer\";=ORYX.CONFIG.EXPLORER_PATH = BASE_PATH + \"/activiti-modeler/explorer\";\n"
+ + "ORYX.CONFIG.LIBS_PATH \\= \"../libs\";=ORYX.CONFIG.LIBS_PATH = BASE_PATH + \"/activiti-modeler/libs\";\n"
+ + "ORYX.CONFIG.SYNTAXCHECKER_URL \\==ORYX.CONFIG.PLUGINS_CONFIG = ORYX.CONFIG.ROOT_PATH + \"plugins.xml\";\\nORYX.CONFIG.SYNTAXCHECKER_URL =\n"
+ + "this._baseUrl \\= \"../editor/stencilsets/bpmn2.0/\";=this._baseUrl = ORYX.CONFIG.ROOT_PATH + \"stencilsets/bpmn2.0/\";\n"
+ + "this._source \\= \"../stencilsets/bpmn2.0/bpmn2.0.json\";=this._source = ORYX.CONFIG.ROOT_PATH + \"stencilsets/bpmn2.0/bpmn2.0.json\";\n"
+ + "\"../service/editor/stencilset\"=ORYX.CONFIG.ROOT_PATH + \"stencilset.json\"\n"
+ + "ORYX.Editor.createByUrl=modelUrl = BASE_PATH + \"/workflowDefGET\";\\nORYX.Editor.createByUrl\n"
+ + "../explorer/src/img/signavio/smoky/logo2.png=\"+ORYX.CONFIG.EXPLORER_PATH+\"/src/img/signavio/smoky/logo2.png\n"
+ + "<a href\\=\\\\\"\"+ORYX.CONFIG.WEB_URL+\"\\\\\" target\\=\\\\\"_self\\\\\" title\\=\\\\\"close modeler\\\\\">=<a href=\\\\\"#\\\\\" title=\\\\\"close modeler\\\\\" onclick=\\\\\"window.close();\\\\\">\n"
+ + "../editor/images/close_button.png=\"+ORYX.CONFIG.ROOT_PATH+\"images/close_button.png\n"
+ + "height:16px;width:16px;margin-bottom:-4px;background: transparent url(../libs/ext-2.0.2/resources/images/default/tree/loading.gif) no-repeat center;=height:16px;width:16px;margin-bottom:-4px;background: transparent url(\"+ORYX.CONFIG.LIBS_PATH+\"/ext-2.0.2/resources/images/default/tree/loading.gif) no-repeat center;\n"
+ + "icon: '../editor/images/add.png',=icon: ORYX.CONFIG.ROOT_PATH + 'images/add.png',\n"
+ + "icon: '../editor/images/delete.png',=icon: ORYX.CONFIG.ROOT_PATH + 'images/delete.png',\n"
+ + "id\\=\"edit_model_title\"=id=\"edit_model_title\" readonly=\"readonly\"\n"
+ + "id\\=\"edit_model_summary\"=id=\"edit_model_summary\" readonly=\"readonly\"\n"
+ + "\"../service/model/\" + modelMeta.modelId + \"/json\"=BASE_PATH + \"/workflowDefGET\"\n"
+ + "// Send the request to the server.=saveUri = BASE_PATH + \"/workflowDefPUT\";\\n// Send the request to the server.\n"
+ + "'Accept':\"application/json\", 'Content-Type':'charset\\=UTF-8'='Accept':\"application/json\", 'Content-Type':'application/json'";
+
+}
[3/5] syncope git commit: [SYNCOPE-620] installer
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/OrmXml.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/OrmXml.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/OrmXml.java
new file mode 100644
index 0000000..8b8115b
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/OrmXml.java
@@ -0,0 +1,381 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class OrmXml {
+
+ public static final String PATH_DIR = "core/src/main/resources/META-INF";
+
+ public static final String PATH_COMPLETE = PATH_DIR + "/orm.xml";
+
+ public static final String ORACLE_ORM = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<!--\n"
+ + "Licensed to the Apache Software Foundation (ASF) under one\n"
+ + "or more contributor license agreements. See the NOTICE file\n"
+ + "distributed with this work for additional information\n"
+ + "regarding copyright ownership. The ASF licenses this file\n"
+ + "to you under the Apache License, Version 2.0 (the\n"
+ + "\"License\"); you may not use this file except in compliance\n"
+ + "with the License. You may obtain a copy of the License at\n" + "\n"
+ + " http://www.apache.org/licenses/LICENSE-2.0\n" + "\n"
+ + "Unless required by applicable law or agreed to in writing,\n"
+ + "software distributed under the License is distributed on an\n"
+ + "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
+ + "KIND, either express or implied. See the License for the\n"
+ + "specific language governing permissions and limitations\n" + "under the License.\n" + "\n" + "-->\n"
+ + "<entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\"\n"
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+ + " xsi:schemaLocation=\"http://java.sun.com/xml/ns/persistence/orm \n"
+ + " http://java.sun.com/xml/ns/persistence/orm_2_0.xsd\"\n"
+ + " version=\"2.0\">\n" + "\n" + " <persistence-unit-metadata>\n"
+ + " <persistence-unit-defaults>\n" + " <entity-listeners>\n"
+ + " <entity-listener class=\"org.apache.syncope.core.persistence.validation.entity.EntityValidationListener\">\n"
+ + " <pre-persist method-name=\"validate\"/>\n"
+ + " <pre-update method-name=\"validate\"/>\n" + " </entity-listener>\n"
+ + " </entity-listeners>\n" + " </persistence-unit-defaults>\n" + " </persistence-unit-metadata>\n"
+ + " \n"
+ + " <table-generator name=\"SEQ_UAttrValue\" pk-column-value=\"SEQ_UAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_RAttrValue\" pk-column-value=\"SEQ_RAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_MAttrValue\" pk-column-value=\"SEQ_MAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_CAttrValue\" pk-column-value=\"SEQ_CAttrValue\" initial-value=\"100\"/>\n"
+ + "\n" + " <entity class=\"org.apache.syncope.core.persistence.beans.user.SyncopeUser\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SyncopeUser\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SyncopeUser\" pk-column-value=\"SEQ_SyncopeUser\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.SyncopeRole\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SyncopeRole\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SyncopeRole\" pk-column-value=\"SEQ_SyncopeRole\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.Membership\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_Membership\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Membership\" pk-column-value=\"SEQ_Membership\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UMapping\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_UMapping\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UMapping\" pk-column-value=\"SEQ_UMapping\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RMapping\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_RMapping\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RMapping\" pk-column-value=\"SEQ_RMapping\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UMappingItem\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UMappingItem\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UMappingItem\" pk-column-value=\"SEQ_UMappingItem\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RMappingItem\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RMappingItem\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RMappingItem\" pk-column-value=\"SEQ_RMappingItem\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ConnInstance\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ConnInstance\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ConnInstance\" pk-column-value=\"SEQ_ConnInstance\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_UAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UAttr\" pk-column-value=\"SEQ_UAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_RAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RAttr\" pk-column-value=\"SEQ_RAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_MAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_MAttr\" pk-column-value=\"SEQ_MAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_CAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_CAttr\" pk-column-value=\"SEQ_CAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>dateValue</column-name>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>doubleValue</column-name>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>dateValue</column-name>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>doubleValue</column-name>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttrValue\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_MAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttrUniqueValue\">\n"
+ + " <table>\n" + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>dateValue</column-name>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>doubleValue</column-name>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_MAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_CAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>dateValue</column-name>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>doubleValue</column-name>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_CAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Task\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Task\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Task\" pk-column-value=\"SEQ_Task\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.TaskExec\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_TaskExec\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_TaskExec\" pk-column-value=\"SEQ_TaskExec\" initial-value=\"10\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Policy\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Policy\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Policy\" pk-column-value=\"SEQ_Policy\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + " \n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Report\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Report\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Report\" pk-column-value=\"SEQ_Report\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ReportExec\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ReportExec\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ReportExec\" pk-column-value=\"SEQ_ReportExec\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ReportletConfInstance\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ReportletConfInstance\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ReportletConfInstance\" pk-column-value=\"SEQ_ReportletConfInstance\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Notification\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_Notification\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Notification\" pk-column-value=\"SEQ_Notification\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.SecurityQuestion\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SecurityQuestion\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SecurityQuestion\" pk-column-value=\"SEQ_SecurityQuestion\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity> \n" + "</entity-mappings>\n" + "";
+
+ public static final String SQLSERVER_ORM = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<!--\n"
+ + "Licensed to the Apache Software Foundation (ASF) under one\n"
+ + "or more contributor license agreements. See the NOTICE file\n"
+ + "distributed with this work for additional information\n"
+ + "regarding copyright ownership. The ASF licenses this file\n"
+ + "to you under the Apache License, Version 2.0 (the\n"
+ + "\"License\"); you may not use this file except in compliance\n"
+ + "with the License. You may obtain a copy of the License at\n" + "\n"
+ + " http://www.apache.org/licenses/LICENSE-2.0\n" + "\n"
+ + "Unless required by applicable law or agreed to in writing,\n"
+ + "software distributed under the License is distributed on an\n"
+ + "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
+ + "KIND, either express or implied. See the License for the\n"
+ + "specific language governing permissions and limitations\n" + "under the License.\n" + "\n" + "-->\n"
+ + "<entity-mappings xmlns=\"http://java.sun.com/xml/ns/persistence/orm\"\n"
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+ + " xsi:schemaLocation=\"http://java.sun.com/xml/ns/persistence/orm \n"
+ + " http://java.sun.com/xml/ns/persistence/orm_2_0.xsd\"\n"
+ + " version=\"2.0\">\n" + " \n" + " <persistence-unit-metadata>\n"
+ + " <persistence-unit-defaults>\n" + " <entity-listeners>\n"
+ + " <entity-listener class=\"org.apache.syncope.core.persistence.validation.entity.EntityValidationListener\">\n"
+ + " <pre-persist method-name=\"validate\"/>\n"
+ + " <pre-update method-name=\"validate\"/>\n" + " </entity-listener>\n"
+ + " </entity-listeners>\n" + " </persistence-unit-defaults>\n" + " </persistence-unit-metadata>\n"
+ + " \n"
+ + " <table-generator name=\"SEQ_UAttrValue\" pk-column-value=\"SEQ_UAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_RAttrValue\" pk-column-value=\"SEQ_RAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_MAttrValue\" pk-column-value=\"SEQ_MAttrValue\" initial-value=\"100\"/>\n"
+ + " <table-generator name=\"SEQ_CAttrValue\" pk-column-value=\"SEQ_CAttrValue\" initial-value=\"100\"/>\n"
+ + "\n" + " <entity class=\"org.apache.syncope.core.persistence.beans.user.SyncopeUser\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SyncopeUser\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SyncopeUser\" pk-column-value=\"SEQ_SyncopeUser\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.SyncopeRole\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SyncopeRole\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SyncopeRole\" pk-column-value=\"SEQ_SyncopeRole\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.Membership\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_Membership\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Membership\" pk-column-value=\"SEQ_Membership\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UMapping\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_UMapping\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UMapping\" pk-column-value=\"SEQ_UMapping\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RMapping\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_RMapping\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RMapping\" pk-column-value=\"SEQ_RMapping\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UMappingItem\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UMappingItem\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UMappingItem\" pk-column-value=\"SEQ_UMappingItem\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RMappingItem\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RMappingItem\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RMappingItem\" pk-column-value=\"SEQ_RMappingItem\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ConnInstance\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ConnInstance\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ConnInstance\" pk-column-value=\"SEQ_ConnInstance\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_UAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_UAttr\" pk-column-value=\"SEQ_UAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_RAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_RAttr\" pk-column-value=\"SEQ_RAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_MAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_MAttr\" pk-column-value=\"SEQ_MAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttr\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_CAttr\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_CAttr\" pk-column-value=\"SEQ_CAttr\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + " \n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.user.UAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>dateValue</column-name>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>doubleValue</column-name>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_UAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.role.RAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>dateValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>doubleValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_RAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttrValue\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_MAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.membership.MAttrUniqueValue\">\n"
+ + " <table>\n" + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>dateValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>doubleValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_MAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttrValue\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_CAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.conf.CAttrUniqueValue\">\n" + " <table>\n"
+ + " <unique-constraint>\n" + " <column-name>booleanValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>dateValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>stringValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>doubleValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n"
+ + " <unique-constraint>\n" + " <column-name>longValue</column-name>\n"
+ + " <column-name>schema_name</column-name>\n" + " </unique-constraint>\n" + " </table>\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_CAttrValue\" strategy=\"TABLE\"/>\n" + " </id>\n"
+ + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Task\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Task\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Task\" pk-column-value=\"SEQ_Task\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.TaskExec\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_TaskExec\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_TaskExec\" pk-column-value=\"SEQ_TaskExec\" initial-value=\"10\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + " \n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Policy\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Policy\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Policy\" pk-column-value=\"SEQ_Policy\" initial-value=\"1000\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n" + "\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Report\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n" + " <generated-value generator=\"SEQ_Report\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Report\" pk-column-value=\"SEQ_Report\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ReportExec\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ReportExec\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ReportExec\" pk-column-value=\"SEQ_ReportExec\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.ReportletConfInstance\">\n"
+ + " <attributes>\n" + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_ReportletConfInstance\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_ReportletConfInstance\" pk-column-value=\"SEQ_ReportletConfInstance\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.Notification\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_Notification\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_Notification\" pk-column-value=\"SEQ_Notification\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity>\n"
+ + " <entity class=\"org.apache.syncope.core.persistence.beans.SecurityQuestion\">\n" + " <attributes>\n"
+ + " <id name=\"id\">\n"
+ + " <generated-value generator=\"SEQ_SecurityQuestion\" strategy=\"TABLE\"/>\n"
+ + " <table-generator name=\"SEQ_SecurityQuestion\" pk-column-value=\"SEQ_SecurityQuestion\" initial-value=\"100\"/>\n"
+ + " </id>\n" + " </attributes>\n" + " </entity> \n" + "</entity-mappings>\n" + "";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java
new file mode 100644
index 0000000..49c05f3
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class ParentPom {
+
+ public static final String PLACEHOLDER = "</project>";
+
+ public static final String REPOSITORY =
+ " <repositories>\n"
+ + " <repository>\n"
+ + " <id>ASF</id>\n"
+ + " <url>https://repository.apache.org/content/repositories/snapshots/</url>\n"
+ + " <snapshots>\n"
+ + " <enabled>true</enabled>\n"
+ + " </snapshots>\n"
+ + " </repository>\n"
+ + "</repositories>\n"
+ + "</project>\n";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceContextEMFactoryXml.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceContextEMFactoryXml.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceContextEMFactoryXml.java
new file mode 100644
index 0000000..a64ea36
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceContextEMFactoryXml.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class PersistenceContextEMFactoryXml {
+
+ public static final String PLACEHOLDER = "<entry key=\"openjpa.MetaDataFactory\"\n"
+ + " value=\"jpa(URLs=vfs:${project.build.directory}/cargo/configurations/wildfly8x/"
+ + "deployments/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)\"/>";
+
+ public static final String JBOSS =
+ "<entry key=\"openjpa.MetaDataFactory\" value=\"jpa(URLs=vfs:/content/${project.build.finalName}.war/"
+ + "WEB-INF/classes/, Resources=META-INF/orm.xml)\"/>";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java
new file mode 100644
index 0000000..ba560df
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.files;
+
+public class PersistenceProperties {
+
+ public static final String HEADER = "# Licensed to the Apache Software Foundation (ASF) under one\n"
+ + "# or more contributor license agreements. See the NOTICE file\n"
+ + "# distributed with this work for additional information\n"
+ + "# regarding copyright ownership. The ASF licenses this file\n"
+ + "# to you under the Apache License, Version 2.0 (the\n"
+ + "# \"License\"); you may not use this file except in compliance\n"
+ + "# with the License. You may obtain a copy of the License at\n" + "#\n"
+ + "# http://www.apache.org/licenses/LICENSE-2.0\n" + "#\n"
+ + "# Unless required by applicable law or agreed to in writing,\n"
+ + "# software distributed under the License is distributed on an\n"
+ + "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
+ + "# KIND, either express or implied. See the License for the\n"
+ + "# specific language governing permissions and limitations\n" + "# under the License.\n";
+
+ public static final String POSTGRES = ""
+ + "jpa.driverClassName=org.postgresql.Driver\n"
+ + "jpa.url=%s\n"
+ + "jpa.username=%s\n"
+ + "jpa.password=%s\n"
+ + "jpa.dialect=org.apache.openjpa.jdbc.sql.PostgresDictionary\n"
+ + "jpa.pool.validationQuery=SELECT 1\n"
+ + "jpa.orm=META-INF/spring-orm.xml\n"
+ + "quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate\n"
+ + "quartz.sql=tables_postgres.sql\n"
+ + "audit.sql=audit.sql\n"
+ + "database.schema=\n";
+
+ public static final String MYSQL = ""
+ + "jpa.driverClassName=com.mysql.jdbc.Driver\n"
+ + "jpa.url=%s\n"
+ + "jpa.username=%s\n"
+ + "jpa.password=%s\n"
+ + "jpa.dialect=org.apache.openjpa.jdbc.sql.MySQLDictionary\n"
+ + "jpa.pool.validationQuery=SELECT 1\n"
+ + "jpa.orm=META-INF/spring-orm.xml\n"
+ + "quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n"
+ + "audit.sql=audit.sql\n"
+ + "database.schema=\n";
+
+ public static final String ORACLE = "jpa.driverClassName=oracle.jdbc.OracleDriver\n"
+ + "jpa.url=%s\n"
+ + "jpa.username=%s\n"
+ + "jpa.password=%s\n"
+ + "jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionary\n"
+ + "jpa.pool.validationQuery=SELECT 1 FROM DUAL\n"
+ + "jpa.orm=META-INF/spring-orm-oracle.xml\n"
+ + "#note: other connection pool settings can also be configured here, see persistenceContext.xml\n"
+ + "quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate\n"
+ + "quartz.scheduler.idleWaitTime=5000\n"
+ + "quartz.sql=tables_oracle.sql\n"
+ + "audit.sql=audit_oracle.sql\n"
+ + "database.schema=%s\n";
+
+ public static final String SQLSERVER = "jpa.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver\n"
+ + "jpa.url=%s\n"
+ + "jpa.username=%s\n"
+ + "jpa.password=%s\n"
+ + "jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary\n"
+ + "jpa.pool.validationQuery=SELECT 1\n"
+ + "jpa.orm=META-INF/spring-orm-sqlserver.xml\n"
+ + "#note: other connection pool settings can also be configured here, see persistenceContext.xml\n"
+ + "quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate\n"
+ + "quartz.scheduler.idleWaitTime=5000\n"
+ + "quartz.sql=tables_sqlServer.sql\n"
+ + "audit.sql=audit_sqlserver.sql\n"
+ + "database.schema=";
+
+ public static final String QUARTZ_INNO_DB = "quartz.sql=tables_mysql_innodb.sql";
+
+ public static final String QUARTZ = "quartz.sql=tables_mysql.sql";
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java
new file mode 100644
index 0000000..0c7bdea
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.processes;
+
+import org.apache.syncope.installer.utilities.FileSystemUtils;
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.apache.syncope.installer.files.ParentPom;
+import org.apache.syncope.installer.utilities.InstallLog;
+import org.apache.syncope.installer.utilities.MavenUtils;
+import org.xml.sax.SAXException;
+
+public class ArchetypeProcess extends BaseProcess {
+
+ public void run(final AbstractUIProcessHandler handler, final String[] args) {
+ final String installPath = args[0];
+ final String mavenDir = args[1];
+ final String groupId = args[2];
+ final String artifactId = args[3];
+ final String secretKey = args[4];
+ final String anonymousKey = args[5];
+ final String confDirectory = args[6];
+ final String logsDirectory = args[7];
+ final String bundlesDirectory = args[8];
+ final String modelerDirectory = args[9];
+ final String syncopeVersion = args[10];
+ final String syncopeAdminPassword = args[11];
+ final boolean isProxyEnabled = Boolean.valueOf(args[12]);
+ final String proxyHost = args[13];
+ final String proxyPort = args[14];
+ final String proxyUser = args[15];
+ final String proxyPwd = args[16];
+ final boolean mavenProxyAutoconf = Boolean.valueOf(args[17]);
+
+ setSyncopeInstallDir(installPath, artifactId);
+
+ final FileSystemUtils fileSystemUtils = new FileSystemUtils(handler);
+ fileSystemUtils.createDirectory(installPath);
+ InstallLog.initialize(installPath, handler);
+ final MavenUtils mavenUtils = new MavenUtils(mavenDir, handler);
+ File customMavenProxySettings = null;
+ try {
+ if (isProxyEnabled && mavenProxyAutoconf) {
+ customMavenProxySettings = MavenUtils.createSettingsWithProxy(installPath, proxyHost, proxyPort,
+ proxyUser, proxyPwd);
+ }
+ } catch (IOException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "I/O error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (ParserConfigurationException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "Parser configuration error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (TransformerException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "Transformer error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (SAXException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "XML parsing error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ }
+ handler.logOutput("########################## IMPORTANT ##########################", true);
+ handler.logOutput("See " + InstallLog.getInstance().getFileAbsolutePath() + " for the maven logs", true);
+ handler.logOutput("########################## IMPORTANT ##########################", true);
+ mavenUtils.archetypeGenerate(
+ syncopeVersion, groupId, artifactId, secretKey, anonymousKey, installPath, customMavenProxySettings);
+
+ if (syncopeVersion.contains("SNAPSHOT")) {
+ final File pomFile =
+ new File(syncopeInstallDir + properties.getProperty("pomFile"));
+ String contentPomFile = fileSystemUtils.readFile(pomFile);
+ fileSystemUtils.writeToFile(pomFile, contentPomFile.replace(ParentPom.PLACEHOLDER, ParentPom.REPOSITORY));
+ }
+
+ fileSystemUtils.createDirectory(confDirectory);
+ fileSystemUtils.createDirectory(logsDirectory);
+ fileSystemUtils.createDirectory(bundlesDirectory);
+ fileSystemUtils.createDirectory(modelerDirectory);
+
+ fileSystemUtils.copyFileFromResources("/" + properties.getProperty("modelerPomFile"),
+ modelerDirectory + "/" + properties.getProperty("pomFile"), handler);
+
+ fileSystemUtils.copyFile(
+ syncopeInstallDir
+ + properties.getProperty("consoleResDirectory")
+ + "/" + properties.getProperty("tokenValueMapFile"),
+ modelerDirectory + "/" + properties.getProperty("tokenValueMapFile"));
+
+ final Properties modelerProperties = new Properties();
+ modelerProperties.setProperty("modeler.directory", modelerDirectory);
+ mavenUtils.mvnCleanPackageWithProperties(modelerDirectory, modelerProperties, customMavenProxySettings);
+
+ final Properties syncopeProperties = new Properties();
+ syncopeProperties.setProperty("conf.directory", confDirectory);
+ syncopeProperties.setProperty("log.directory", logsDirectory);
+ syncopeProperties.setProperty("bundles.directory", bundlesDirectory);
+ mavenUtils.mvnCleanPackageWithProperties(
+ installPath + "/" + artifactId, syncopeProperties, customMavenProxySettings);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/BaseProcess.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/BaseProcess.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/BaseProcess.java
new file mode 100644
index 0000000..e11ef54
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/BaseProcess.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.processes;
+
+import static org.apache.syncope.installer.processes.ArchetypeProcess.properties;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import org.apache.commons.io.IOUtils;
+
+public class BaseProcess {
+
+ protected final static Properties properties = new Properties();
+
+ protected String syncopeInstallDir;
+
+ private static InputStream is = null;
+
+ static {
+ try {
+ is = BaseProcess.class.getResourceAsStream("/installer.properties");
+ properties.load(is);
+ } catch (final IOException e) {
+ } finally {
+ IOUtils.closeQuietly(is);
+ }
+ }
+
+ protected void setSyncopeInstallDir(final String installPath, final String artifactId) {
+ final StringBuilder path = new StringBuilder();
+ path.append(installPath);
+ path.append("/");
+ path.append(artifactId);
+ path.append("/");
+ syncopeInstallDir = path.toString();
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
new file mode 100644
index 0000000..4ccc0d2
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
@@ -0,0 +1,322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.processes;
+
+import org.apache.syncope.installer.utilities.FileSystemUtils;
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.apache.syncope.installer.containers.Glassfish;
+import org.apache.syncope.installer.containers.Tomcat;
+import org.apache.syncope.installer.containers.jboss.JBoss;
+import org.apache.syncope.installer.enums.Containers;
+import org.apache.syncope.installer.files.ConsoleProperties;
+import org.apache.syncope.installer.files.GlassfishCoreWebXml;
+import org.apache.syncope.installer.files.PersistenceContextEMFactoryXml;
+import org.apache.syncope.installer.utilities.InstallLog;
+import org.apache.syncope.installer.utilities.MavenUtils;
+import org.xml.sax.SAXException;
+
+public class ContainerProcess extends BaseProcess {
+
+ private final static String HTTP = "http";
+
+ private final static String HTTPS = "https";
+
+ private final static String DEFAULT_HOST = "localhost";
+
+ private final static String DEFAULT_PORT = "8080";
+
+ private String installPath;
+
+ private String mavenDir;
+
+ private String artifactId;
+
+ private String tomcatUser;
+
+ private String tomcatPassword;
+
+ private boolean tomcatSsl;
+
+ private String tomcatHost;
+
+ private String tomcatPort;
+
+ private String glassfishDir;
+
+ private boolean glassfishSsl;
+
+ private String glassfishHost;
+
+ private String glassfishPort;
+
+ private String confDirectory;
+
+ private String logsDirectory;
+
+ private String bundlesDirectory;
+
+ private boolean withDataSource;
+
+ private boolean jbossSsl;
+
+ private String jbossHost;
+
+ private String jbossPort;
+
+ private String jbossJdbcModuleName;
+
+ private String jbossAdminUsername;
+
+ private String jbossAdminPassword;
+
+ private String jbossManagementPort;
+
+ private boolean isProxyEnabled;
+
+ private String proxyHost;
+
+ private String proxyPort;
+
+ private String proxyUser;
+
+ private String proxyPwd;
+
+ private boolean mavenProxyAutoconf;
+
+ public void run(final AbstractUIProcessHandler handler, final String[] args) {
+
+ installPath = args[0];
+ mavenDir = args[1];
+ artifactId = args[2];
+ final Containers selectedContainer = Containers.fromContainerName(args[3]);
+ tomcatSsl = Boolean.valueOf(args[4]);
+ tomcatHost = args[5];
+ tomcatPort = args[6];
+ tomcatUser = args[7];
+ tomcatPassword = args[8];
+ glassfishSsl = Boolean.valueOf(args[9]);
+ glassfishHost = args[10];
+ glassfishPort = args[11];
+ glassfishDir = args[12];
+ confDirectory = args[13];
+ logsDirectory = args[14];
+ bundlesDirectory = args[15];
+ withDataSource = Boolean.valueOf(args[16]);
+ jbossSsl = Boolean.valueOf(args[17]);
+ jbossHost = args[18];
+ jbossPort = args[19];
+ jbossJdbcModuleName = args[20];
+ jbossAdminUsername = args[21];
+ jbossAdminPassword = args[22];
+ jbossManagementPort = args[23];
+ isProxyEnabled = Boolean.valueOf(args[24]);
+ proxyHost = args[25];
+ proxyPort = args[26];
+ proxyUser = args[27];
+ proxyPwd = args[28];
+ mavenProxyAutoconf = Boolean.valueOf(args[28]);
+
+ final FileSystemUtils fileSystemUtils = new FileSystemUtils(handler);
+
+ handler.logOutput("Configure web.xml file according to " + selectedContainer + " properties", true);
+ InstallLog.getInstance().info("Configure web.xml file according to " + selectedContainer + " properties");
+
+ setSyncopeInstallDir(installPath, artifactId);
+
+ if (withDataSource) {
+ switch (selectedContainer) {
+ case GLASSFISH:
+ final File glassfishCoreWebXmlFile =
+ new File(syncopeInstallDir + properties.getProperty("glassfishCoreWebXmlFile"));
+ final String contentGlassfishWebXmlFile = fileSystemUtils.readFile(glassfishCoreWebXmlFile);
+ fileSystemUtils.writeToFile(glassfishCoreWebXmlFile,
+ contentGlassfishWebXmlFile.replace(GlassfishCoreWebXml.PLACEHOLDER,
+ GlassfishCoreWebXml.DATA_SOURCE));
+ break;
+
+ default:
+ }
+ }
+
+ final File consolePropertiesFile = new File(syncopeInstallDir
+ + properties.getProperty("consoleResDirectory")
+ + File.separator + properties.getProperty("consolePropertiesFile"));
+ final String contentConsolePropertiesFile = fileSystemUtils.readFile(consolePropertiesFile);
+
+ final String scheme;
+ final String host;
+ final String port;
+ switch (selectedContainer) {
+ case TOMCAT:
+ scheme = tomcatSsl ? HTTPS : HTTP;
+ host = tomcatHost;
+ port = tomcatPort;
+ break;
+ case JBOSS:
+ scheme = jbossSsl ? HTTPS : HTTP;
+ host = jbossHost;
+ port = jbossPort;
+ persistenceContextEMFactory(fileSystemUtils, handler);
+ break;
+ case GLASSFISH:
+ scheme = glassfishSsl ? HTTPS : HTTP;
+ host = glassfishHost;
+ port = glassfishPort;
+ break;
+ default:
+ scheme = HTTP;
+ host = DEFAULT_HOST;
+ port = DEFAULT_PORT;
+ }
+
+ fileSystemUtils.writeToFile(consolePropertiesFile,
+ contentConsolePropertiesFile.replace(ConsoleProperties.PLACEHOLDER,
+ String.format(ConsoleProperties.CONSOLE, scheme, host, port)));
+
+ final MavenUtils mavenUtils = new MavenUtils(mavenDir, handler);
+ File customMavenProxySettings = null;
+ try {
+ if (isProxyEnabled && mavenProxyAutoconf) {
+ customMavenProxySettings = MavenUtils.createSettingsWithProxy(installPath, proxyHost, proxyPort,
+ proxyUser, proxyPwd);
+ }
+ } catch (IOException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "I/O error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (ParserConfigurationException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "Parser configuration error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (TransformerException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "Transformer error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ } catch (SAXException ex) {
+ final StringBuilder messageError = new StringBuilder(
+ "XML parsing error during creation of Maven custom settings.xml");
+ final String emittedError = messageError.toString();
+ handler.emitError(emittedError, emittedError);
+ InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
+ toString());
+ }
+
+ final Properties mvnProperties = new Properties();
+ mvnProperties.setProperty("conf.directory", confDirectory);
+ mvnProperties.setProperty("log.directory", logsDirectory);
+ mvnProperties.setProperty("bundles.directory", bundlesDirectory);
+ mavenUtils.mvnCleanPackageWithProperties(
+ installPath + "/" + artifactId, mvnProperties, customMavenProxySettings);
+
+ if (isProxyEnabled && mavenProxyAutoconf) {
+ FileSystemUtils.delete(customMavenProxySettings);
+ }
+
+ switch (selectedContainer) {
+ case TOMCAT:
+ final Tomcat tomcat = new Tomcat(
+ tomcatSsl, tomcatHost, tomcatPort, installPath, artifactId, tomcatUser, tomcatPassword,
+ handler);
+ boolean deployCoreResult = tomcat.deployCore();
+ if (deployCoreResult) {
+ handler.logOutput("Core successfully deployed ", true);
+ InstallLog.getInstance().info("Core successfully deployed ");
+ } else {
+ final String messageError = "Deploy core on Tomcat failed";
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+
+ boolean deployConsoleResult = tomcat.deployConsole();
+ if (deployConsoleResult) {
+ handler.logOutput("Console successfully deployed ", true);
+ InstallLog.getInstance().info("Console successfully deployed ");
+ } else {
+ final String messageError = "Deploy console on Tomcat failed";
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+ break;
+ case JBOSS:
+ final JBoss jBoss = new JBoss(
+ jbossSsl, jbossHost, jbossManagementPort, jbossAdminUsername,
+ jbossAdminPassword, installPath, artifactId, handler);
+
+ boolean deployCoreJboss = jBoss.deployCore();
+ if (deployCoreJboss) {
+ handler.logOutput("Core successfully deployed ", true);
+ InstallLog.getInstance().info("Core successfully deployed ");
+ } else {
+ final String messageError = "Deploy core on JBoss failed";
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+
+ boolean deployConsoleJBoss = jBoss.deployConsole();
+ if (deployConsoleJBoss) {
+ handler.logOutput("Console successfully deployed ", true);
+ InstallLog.getInstance().info("Console successfully deployed ");
+ } else {
+ final String messageError = "Deploy console on JBoss failed";
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+ break;
+ case GLASSFISH:
+ final String createJavaOptCommand = "sh " + glassfishDir + Glassfish.CREATE_JAVA_OPT_COMMAND;
+ fileSystemUtils.exec(createJavaOptCommand, null);
+
+ final Glassfish glassfish = new Glassfish(installPath, artifactId);
+
+ fileSystemUtils.exec("sh " + glassfishDir
+ + Glassfish.DEPLOY_COMMAND + glassfish.deployCore(), null);
+ fileSystemUtils.exec("sh " + glassfishDir
+ + Glassfish.DEPLOY_COMMAND + glassfish.deployConsole(), null);
+ break;
+ }
+ }
+
+ private void persistenceContextEMFactory(
+ final FileSystemUtils fileSystemUtils, final AbstractUIProcessHandler handler) {
+ fileSystemUtils.copyFileFromResources("/jboss/persistenceContextEMFactory.xml",
+ syncopeInstallDir
+ + properties.getProperty("persistenceContextEMFactoryFile"), handler);
+ final File persistenceContextEMFactoryFile = new File(
+ syncopeInstallDir + properties.getProperty("persistenceContextEMFactoryFile"));
+ final String contentPersistenceContextEMFactory = fileSystemUtils.readFile(persistenceContextEMFactoryFile);
+ fileSystemUtils.writeToFile(
+ persistenceContextEMFactoryFile,
+ contentPersistenceContextEMFactory.replace(PersistenceContextEMFactoryXml.PLACEHOLDER,
+ PersistenceContextEMFactoryXml.JBOSS));
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
new file mode 100644
index 0000000..16a6057
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.processes;
+
+import org.apache.syncope.installer.utilities.FileSystemUtils;
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import org.apache.syncope.installer.enums.DBs;
+import org.apache.syncope.installer.files.PersistenceProperties;
+import org.apache.syncope.installer.utilities.InstallLog;
+
+public class PersistenceProcess extends BaseProcess {
+
+ private String installPath;
+
+ private String artifactId;
+
+ private DBs dbSelected;
+
+ private String persistenceUrl;
+
+ private String persistenceUser;
+
+ private String persistencePassword;
+
+ private boolean mysqlInnoDB;
+
+ private String oracleTableSpace;
+
+ public void run(final AbstractUIProcessHandler handler, final String[] args) {
+
+ installPath = args[0];
+ artifactId = args[1];
+ dbSelected = DBs.fromDbName(args[2]);
+ persistenceUrl = args[3];
+ persistenceUser = args[4];
+ persistencePassword = args[5];
+ mysqlInnoDB = Boolean.valueOf(args[6]);
+ oracleTableSpace = args[7];
+
+ final FileSystemUtils fileSystemUtils = new FileSystemUtils(handler);
+ final StringBuilder persistenceProperties = new StringBuilder(PersistenceProperties.HEADER);
+ setSyncopeInstallDir(installPath, artifactId);
+
+ handler.logOutput("Configure persistence file according to " + dbSelected + " properties", true);
+ InstallLog.getInstance().info("Configure persistence file according to " + dbSelected + " properties");
+
+ switch (dbSelected) {
+ case POSTGRES:
+ persistenceProperties.append(String.format(
+ PersistenceProperties.POSTGRES, persistenceUrl, persistenceUser, persistencePassword));
+ break;
+ case MYSQL:
+ persistenceProperties.append(String.format(
+ PersistenceProperties.MYSQL, persistenceUrl, persistenceUser, persistencePassword));
+ if (mysqlInnoDB) {
+ persistenceProperties.append(PersistenceProperties.QUARTZ_INNO_DB);
+ } else {
+ persistenceProperties.append(PersistenceProperties.QUARTZ);
+ }
+ break;
+ case ORACLE:
+ persistenceProperties.append(String.format(
+ PersistenceProperties.ORACLE, persistenceUrl, persistenceUser, persistencePassword,
+ oracleTableSpace));
+ break;
+ case SQLSERVER:
+ persistenceProperties.append(String.format(
+ PersistenceProperties.SQLSERVER, persistenceUrl, persistenceUser, persistencePassword));
+ break;
+ }
+
+ fileSystemUtils.writeToFile(new File(
+ syncopeInstallDir + properties.getProperty("persistencePropertiesFile")),
+ persistenceProperties.toString());
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
new file mode 100644
index 0000000..41982f8
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/DriverLoader.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import java.net.Authenticator;
+import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
+import org.apache.syncope.installer.enums.DBs;
+
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.sql.Driver;
+
+public final class DriverLoader extends URLClassLoader {
+
+ private final static String POSTGRES_JAR =
+ "http://repo1.maven.org/maven2/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar";
+
+ private final static String MYSQL_JAR =
+ "http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar";
+
+ private static final String POSTGRES_CLASS_DRIVER = "org.postgresql.Driver";
+
+ private static final String MYSQL_CLASS_DRIVER = "com.mysql.jdbc.Driver";
+
+ private DriverLoader(final URL[] urls) {
+ super(urls);
+ addURL(urls[0]);
+ }
+
+ private static DriverLoader driverLoader;
+
+ public static Driver load(final DBs selectedDB, final boolean isProxyEnabled, final String proxyHost,
+ final String proxyPort, final String proxyUser, final String proxyPwd) {
+ Driver driver = null;
+ switch (selectedDB) {
+ case POSTGRES:
+ driver = downloadDriver(POSTGRES_JAR, POSTGRES_CLASS_DRIVER, isProxyEnabled, proxyHost, proxyPort,
+ proxyUser, proxyPwd);
+ break;
+ case MYSQL:
+ driver = downloadDriver(MYSQL_JAR, MYSQL_CLASS_DRIVER, isProxyEnabled, proxyHost, proxyPort,
+ proxyUser, proxyPwd);
+ break;
+ case SQLSERVER:
+ break;
+ case ORACLE:
+ break;
+ default:
+ break;
+ }
+ return driver;
+ }
+
+ private static Driver downloadDriver(final String driverUrl, final String driverClassName,
+ final boolean isProxyEnabled, final String proxyHost, final String proxyPort, final String proxyUser,
+ final String proxyPwd) {
+ Driver driver = null;
+ try {
+ if (isProxyEnabled) {
+ System.setProperty("http.proxyHost", proxyHost);
+ System.setProperty("http.proxyPort", proxyPort);
+ if (proxyUser != null && !proxyUser.isEmpty() && proxyPwd != null) {
+ Authenticator.setDefault(new Authenticator() {
+
+ @Override
+ public PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(proxyUser, proxyPwd.toCharArray());
+ }
+ });
+ System.setProperty("http.proxyUser", proxyUser);
+ System.setProperty("http.proxyPassword", proxyPwd);
+ }
+ }
+ final URL[] url = { new URL(driverUrl) };
+ driverLoader = new DriverLoader(url);
+ driver = (Driver) driverLoader.loadClass(driverClassName).newInstance();
+ } catch (ClassNotFoundException e) {
+ } catch (InstantiationException ex) {
+ } catch (IllegalAccessException ex) {
+ } catch (MalformedURLException ex) {
+ }
+
+ return driver;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
new file mode 100644
index 0000000..7e9f7b8
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.URL;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.w3c.dom.Document;
+
+public class FileSystemUtils {
+
+ private final AbstractUIProcessHandler handler;
+
+ public FileSystemUtils(final AbstractUIProcessHandler handler) {
+ this.handler = handler;
+ }
+
+ public void createDirectory(final String directoryPath) {
+ final File directory = new File(directoryPath);
+ if (!directory.exists()) {
+ directory.mkdirs();
+ }
+ }
+
+ public void copyFile(final String sourceFilePath, final String targetFilePath) {
+ try {
+ FileUtils.copyFile(new File(sourceFilePath), new File(targetFilePath));
+ } catch (final IOException ex) {
+ final String errorMessage =
+ "Error copy file " + sourceFilePath + " to " + targetFilePath;
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ }
+
+ public void exec(final String cmd, final String path) {
+ try {
+ handler.logOutput("Executing " + cmd, true);
+ final ProcessBuilder builder = new ProcessBuilder(cmd.split(" "));
+ if (path != null && !path.isEmpty()) {
+ builder.directory(new File(path));
+ }
+ final Process process = builder.start();
+ readResponse(process.getInputStream());
+ } catch (final IOException ex) {
+ final String errorMessage = "Error executing " + cmd + ": " + ex.getMessage();
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ }
+
+ private void readResponse(final InputStream inputStream) throws
+ IOException {
+ final BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+ String line = reader.readLine();
+ while (line != null) {
+ line = reader.readLine();
+ final String content = line == null ? "" : line;
+ handler.logOutput(content, false);
+ InstallLog.getInstance().info(content);
+ }
+ inputStream.close();
+ }
+
+ public void writeToFile(final File file, final String content) {
+ try {
+ final FileWriter fw = new FileWriter(file.getAbsoluteFile());
+ final BufferedWriter bw = new BufferedWriter(fw);
+ bw.write(content);
+ bw.close();
+ } catch (final IOException ex) {
+ final String errorMessage = "Error writing file " + file.getAbsolutePath() + ": " + ex.getMessage();
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ }
+
+ public String readFile(final File file) {
+ String content = "";
+ try {
+ content = FileUtils.readFileToString(file);
+ } catch (IOException ex) {
+ final String errorMessage = "Error reading file " + file.getAbsolutePath() + ": " + ex.getMessage();
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ return content;
+ }
+
+ public void appendToFile(final File file, final String content) {
+ try {
+ if (!file.exists()) {
+ file.createNewFile();
+ }
+ final PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file, true)));
+ out.println(content);
+ out.close();
+ } catch (IOException ex) {
+ final String errorMessage = "Error writing file " + file.getAbsolutePath() + ": " + ex.getMessage();
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ }
+
+ public static void writeXML(final Document doc, final OutputStream out) throws IOException,
+ TransformerException {
+ try {
+ final TransformerFactory factory = TransformerFactory.newInstance();
+ final Transformer transformer = factory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.transform(new DOMSource(doc),
+ new StreamResult(new OutputStreamWriter(out, "UTF-8")));
+ } finally {
+ IOUtils.closeQuietly(out);
+ }
+ }
+
+ public static void delete(final File file) {
+ FileUtils.deleteQuietly(file);
+ }
+
+ public void copyFileFromResources(final String filePath,
+ final String destination, final AbstractUIProcessHandler handler) {
+ try {
+ final URL url = getClass().getResource(filePath);
+ final File dest = new File(destination);
+ FileUtils.copyURLToFile(url, dest);
+ } catch (IOException ex) {
+ final String errorMessage = "Error copy file " + filePath;
+ handler.emitError(errorMessage, errorMessage);
+ InstallLog.getInstance().error(errorMessage);
+ }
+ }
+}
[2/5] syncope git commit: [SYNCOPE-620] installer
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
new file mode 100644
index 0000000..1e8e94c
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/HttpUtils.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import java.io.IOException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import org.apache.commons.io.IOUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.auth.AuthScheme;
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.AuthCache;
+import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLContextBuilder;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.entity.mime.content.FileBody;
+import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.impl.auth.DigestScheme;
+import org.apache.http.impl.client.BasicAuthCache;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+
+public class HttpUtils {
+
+ private static final String HTTPS_URL_TEMPLATE = "https://%s:%s";
+
+ private static final String HTTP_URL_TEMPLATE = "http://%s:%s";
+
+ private final CloseableHttpClient httpClient;
+
+ private final boolean isSsl;
+
+ private final String host;
+
+ private final int port;
+
+ private final String username;
+
+ private final String password;
+
+ private final HttpHost targetHost;
+
+ private final AbstractUIProcessHandler handler;
+
+ public HttpUtils(final boolean isSsl, final String host,
+ final String port, final String username, final String password, final AbstractUIProcessHandler handler) {
+
+ this.isSsl = isSsl;
+ this.host = host;
+ this.port = Integer.valueOf(port);
+
+ if (isSsl) {
+ httpClient = createHttpsClient();
+ this.targetHost = new HttpHost(this.host, this.port, "https");
+ } else {
+ httpClient = HttpClients.createDefault();
+ this.targetHost = new HttpHost(this.host, this.port, "http");
+ }
+
+ this.username = username;
+ this.password = password;
+
+ this.handler = handler;
+ }
+
+ public int getWithBasicAuth(final String path) {
+ final HttpGet httpGet;
+ if (isSsl) {
+ httpGet = new HttpGet(String.format(HTTPS_URL_TEMPLATE, host, port) + path);
+ } else {
+ httpGet = new HttpGet(String.format(HTTP_URL_TEMPLATE, host, port) + path);
+ }
+ int status = 0;
+ try {
+ handler.logOutput("Calling " + httpGet.getURI(), true);
+ InstallLog.getInstance().info("Calling " + httpGet.getURI());
+ final CloseableHttpResponse response = httpClient.execute(
+ targetHost, httpGet, setAuth(targetHost, new BasicScheme()));
+ status = response.getStatusLine().getStatusCode();
+ handler.logOutput("Calling status " + status, true);
+ InstallLog.getInstance().info("Calling status " + status);
+ response.close();
+ } catch (final IOException ex) {
+ final String messageError = "Error in " + path + ": " + ex.getMessage();
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+ return status;
+ }
+
+ public String postWithDigestAuth(final String url, final String file) {
+ String responseBodyAsString = "";
+ try {
+ final CloseableHttpResponse response = httpClient.execute(targetHost,
+ httpPost(url, MultipartEntityBuilder.create().addPart("bin", new FileBody(new File(file))).build()),
+ setAuth(targetHost, new DigestScheme()));
+ responseBodyAsString = IOUtils.toString(response.getEntity().getContent());
+ handler.logOutput("Http status: " + response.getStatusLine().getStatusCode(), true);
+ InstallLog.getInstance().info("Http status: " + response.getStatusLine().getStatusCode());
+ response.close();
+ } catch (final IOException ex) {
+ final String messageError = "Error calling " + url + ": " + ex.getMessage();
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+ }
+
+ return responseBodyAsString;
+ }
+
+ public int postWithStringEntity(final String url, final String stringEntity) {
+ int status = 0;
+ try {
+ final HttpPost httPost = httpPost(url, new StringEntity(stringEntity));
+ httPost.addHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType());
+ final CloseableHttpResponse response = httpClient.execute(
+ targetHost, httPost, setAuth(targetHost, new DigestScheme()));
+ status = response.getStatusLine().getStatusCode();
+ handler.logOutput("Http status: " + status, true);
+ InstallLog.getInstance().info("Http status: " + status);
+
+ response.close();
+ } catch (final IOException ioe) {
+ final String messageError = "Error calling " + url + ": " + ioe.getMessage();
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().error(messageError);
+
+ }
+ return status;
+ }
+
+ private HttpClientContext setAuth(final HttpHost targetHost, final AuthScheme authScheme) {
+ final CredentialsProvider credsProvider = new BasicCredentialsProvider();
+ credsProvider.setCredentials(new AuthScope(targetHost.getHostName(), targetHost.getPort()),
+ new UsernamePasswordCredentials(username, password));
+ final HttpClientContext context = HttpClientContext.create();
+ final AuthCache authCache = new BasicAuthCache();
+ authCache.put(targetHost, authScheme);
+ context.setAuthCache(authCache);
+ context.setCredentialsProvider(credsProvider);
+ return context;
+ }
+
+ private HttpPost httpPost(final String url, final HttpEntity reqEntity) {
+ final HttpPost httppost = new HttpPost(url);
+ httppost.setEntity(reqEntity);
+ handler.logOutput("Calling " + httppost.getURI(), true);
+ InstallLog.getInstance().info("Calling " + httppost.getURI());
+ return httppost;
+ }
+
+ public static int ping(final boolean isSsl, final String host, final String port) {
+ int status = 0;
+ try {
+ if (isSsl) {
+ status = createHttpsClient().execute(
+ new HttpGet(String.format(HTTPS_URL_TEMPLATE, host, port))).getStatusLine().
+ getStatusCode();
+ } else {
+ status = HttpClients.createDefault().execute(
+ new HttpGet(String.format(HTTP_URL_TEMPLATE, host, port))).getStatusLine().getStatusCode();
+ }
+ } catch (IOException ex) {
+ }
+
+ return status;
+ }
+
+ private static CloseableHttpClient createHttpsClient() {
+ CloseableHttpClient chc = null;
+ try {
+ final SSLContextBuilder builder = new SSLContextBuilder();
+ builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
+ chc = HttpClients.custom().setSSLSocketFactory(
+ new SSLConnectionSocketFactory(builder.build(),
+ SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER)).build();
+ } catch (KeyManagementException ex) {
+ } catch (NoSuchAlgorithmException ex) {
+ } catch (KeyStoreException ex) {
+ }
+ return chc;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
new file mode 100644
index 0000000..91c03df
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/InstallLog.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import java.util.Date;
+
+public class InstallLog {
+
+ private static InstallLog installLog = null;
+
+ private final File log;
+
+ private final FileSystemUtils fileSystemUtils;
+
+ private final String fileAbsolutePath;
+
+ private InstallLog(final String installPath, final AbstractUIProcessHandler handler) {
+ fileAbsolutePath = installPath + "/install.log";
+ log = new File(fileAbsolutePath);
+ fileSystemUtils = new FileSystemUtils(handler);
+ }
+
+ public static InstallLog initialize(final String installPath, final AbstractUIProcessHandler handler) {
+ synchronized (InstallLog.class) {
+ if (installLog == null) {
+ installLog = new InstallLog(installPath, handler);
+ }
+ }
+ return installLog;
+ }
+
+ public static InstallLog getInstance() {
+ return installLog;
+ }
+
+ public void error(final String msg) {
+ writeToFile("Error", msg);
+ }
+
+ public void info(final String msg) {
+ writeToFile("Info", msg);
+ }
+
+ public String getFileAbsolutePath() {
+ return fileAbsolutePath;
+ }
+
+ private void writeToFile(final String what, final String msg) {
+ fileSystemUtils.appendToFile(log, new Date() + " | " + what + ": " + msg);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
new file mode 100644
index 0000000..f8f6b64
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/JsonUtils.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import org.apache.syncope.installer.containers.jboss.JBossAddResponse;
+import org.apache.syncope.installer.containers.jboss.JBossDeployRequestContent;
+
+public class JsonUtils {
+
+ private final static ObjectMapper objectMapper = new ObjectMapper();
+
+ public static JBossAddResponse jBossAddResponse(final String responseBodyAsString) {
+ JBossAddResponse jBossAddResponse = null;
+ try {
+ jBossAddResponse = objectMapper.readValue(responseBodyAsString, JBossAddResponse.class);
+ } catch (IOException ioe) {
+ }
+ return jBossAddResponse;
+ }
+
+ public static String jBossDeployRequestContent(final JBossDeployRequestContent jBossDeployRequestContent) {
+ String jBossDeployRequestContentString = "";
+ try {
+ jBossDeployRequestContentString = objectMapper.writeValueAsString(jBossDeployRequestContent);
+ } catch (JsonProcessingException ioe) {
+ }
+ return jBossDeployRequestContentString;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
new file mode 100644
index 0000000..f39d4b4
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import com.izforge.izpack.panels.process.AbstractUIProcessHandler;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.shared.invoker.DefaultInvocationRequest;
+import org.apache.maven.shared.invoker.DefaultInvoker;
+import org.apache.maven.shared.invoker.InvocationRequest;
+import org.apache.maven.shared.invoker.InvocationResult;
+import org.apache.maven.shared.invoker.Invoker;
+import org.apache.maven.shared.invoker.MavenInvocationException;
+import org.apache.maven.shared.invoker.PrintStreamHandler;
+import org.apache.maven.shared.invoker.PrintStreamLogger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+public class MavenUtils {
+
+ private static final String MAVEN_HOME_PROPERTY = "maven.home";
+
+ private final AbstractUIProcessHandler handler;
+
+ public MavenUtils(final String mavenHomeDirectory, final AbstractUIProcessHandler handler) {
+ if (System.getProperty(MAVEN_HOME_PROPERTY) == null || System.getProperty(MAVEN_HOME_PROPERTY).isEmpty()) {
+ System.setProperty(MAVEN_HOME_PROPERTY, mavenHomeDirectory);
+ }
+ this.handler = handler;
+ }
+
+ public void archetypeGenerate(final String archetypeVersion, final String groupId,
+ final String artifactId, final String secretKey, final String anonymousKey, final String installPath,
+ final File customSettingsFile) {
+
+ final InvocationRequest request = new DefaultInvocationRequest();
+ request.setGoals(Collections.singletonList("archetype:generate"));
+ request.setInteractive(false);
+ final Properties properties =
+ archetypeProperties(archetypeVersion, groupId, artifactId, secretKey, anonymousKey);
+ request.setProperties(properties);
+ if (customSettingsFile != null && FileUtils.sizeOf(customSettingsFile) > 0) {
+ request.setUserSettingsFile(customSettingsFile);
+ }
+ logToHandler(request.getGoals(), properties);
+ logToFile(request.getGoals(), properties);
+ invoke(request, installPath);
+ }
+
+ private Properties archetypeProperties(final String archetypeVersion, final String groupId,
+ final String artifactId, final String secretKey, final String anonymousKey) {
+ final Properties properties = new Properties();
+ properties.setProperty("archetypeGroupId", "org.apache.syncope");
+ properties.setProperty("archetypeArtifactId", "syncope-archetype");
+ if (archetypeVersion.contains("SNAPSHOT")) {
+ properties.setProperty("archetypeRepository", "http://repository.apache.org/content/repositories/snapshots");
+ } else {
+ properties.setProperty("archetypeRepository", "http://repo1.maven.org/maven2");
+ }
+ properties.setProperty("archetypeVersion", archetypeVersion);
+ properties.setProperty("groupId", groupId);
+ properties.setProperty("artifactId", artifactId);
+ properties.setProperty("secretKey", secretKey);
+ properties.setProperty("anonymousKey", anonymousKey);
+ return properties;
+ }
+
+ public void mvnCleanPackageWithProperties(final String path, final Properties properties, final File customSettingsFile) {
+ final InvocationRequest request = new DefaultInvocationRequest();
+ request.setProperties(properties);
+ if (customSettingsFile != null && FileUtils.sizeOf(customSettingsFile) > 0) {
+ request.setUserSettingsFile(customSettingsFile);
+ }
+ final List<String> mavenGoals = new ArrayList<String>();
+ mavenGoals.add("clean");
+ mavenGoals.add("package");
+ request.setGoals(mavenGoals);
+ logToHandler(request.getGoals(), properties);
+ logToFile(request.getGoals(), properties);
+ invoke(request, path);
+ }
+
+ private void logToHandler(final List<String> goals, final Properties properties) {
+ handler.logOutput("Executing maven command:", true);
+ final StringBuilder mavenCommand = new StringBuilder("mvn ");
+ for (final String goal : goals) {
+ mavenCommand.append(goal).append(" ");
+ }
+ handler.logOutput(mavenCommand.toString(), true);
+ for (final String propertyName : properties.stringPropertyNames()) {
+ handler.logOutput("-D " + propertyName + "=" + properties.getProperty(propertyName), true);
+ }
+ }
+
+ private void logToFile(final List<String> goals, final Properties properties) {
+ InstallLog.getInstance().info("Executing maven command:");
+ final StringBuilder mavenCommand = new StringBuilder("mvn ");
+ for (final String goal : goals) {
+ mavenCommand.append(goal).append(" ");
+ }
+ InstallLog.getInstance().info(mavenCommand.toString());
+ for (final String propertyName : properties.stringPropertyNames()) {
+ InstallLog.getInstance().info("-D " + propertyName + "=" + properties.getProperty(propertyName));
+ }
+ }
+
+ private InvocationResult invoke(final InvocationRequest request, final String path) {
+ InvocationResult result = null;
+ final Invoker invoker = new DefaultInvoker();
+ try {
+ invoker.setLogger(new PrintStreamLogger(
+ new PrintStream(InstallLog.getInstance().getFileAbsolutePath()), 1000));
+ invoker.setOutputHandler(new PrintStreamHandler(
+ new PrintStream(InstallLog.getInstance().getFileAbsolutePath()), true));
+ invoker.setWorkingDirectory(new File(path));
+ result = invoker.execute(request);
+ } catch (MavenInvocationException ex) {
+ final String messageError = "Maven exception: " + ex.getMessage();
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().info(messageError);
+ } catch (FileNotFoundException ex) {
+ final String messageError = "Maven exception: " + ex.getMessage();
+ handler.emitError(messageError, messageError);
+ InstallLog.getInstance().info(messageError);
+ }
+ return result;
+ }
+
+ public static File createSettingsWithProxy(final String path, final String proxyHost, final String proxyPort,
+ final String proxyUser, final String proxyPassword) throws IOException, ParserConfigurationException,
+ TransformerException, SAXException {
+ final File settingsXML = new File(System.getProperty(MAVEN_HOME_PROPERTY) + (System.getProperty(
+ MAVEN_HOME_PROPERTY).endsWith("/") ? "conf/settings.xml" : "/conf/settings.xml"));
+ final File tempSettingsXML = new File(path + (path.endsWith("/") ? "settings_temp.xml" : "/settings_temp.xml"));
+ if (settingsXML.canRead() && !tempSettingsXML.exists()) {
+ tempSettingsXML.createNewFile();
+
+ final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ final DocumentBuilder builder = dbf.newDocumentBuilder();
+ // parse settings.xml
+ final Document settings = builder.parse(settingsXML);
+
+ final Element proxies = (Element) settings.getDocumentElement().getElementsByTagName("proxies").item(0);
+
+ final Element proxy = settings.createElement("proxy");
+
+ final Element id = settings.createElement("id");
+ final Element active = settings.createElement("active");
+ final Element protocol = settings.createElement("protocol");
+ final Element host = settings.createElement("host");
+ final Element port = settings.createElement("port");
+ final Element nonProxyHosts = settings.createElement("nonProxyHosts");
+ id.appendChild(settings.createTextNode("optional"));
+ active.appendChild(settings.createTextNode("true"));
+ protocol.appendChild(settings.createTextNode("http"));
+ host.appendChild(settings.createTextNode(proxyHost));
+ port.appendChild(settings.createTextNode(proxyPort));
+ proxy.appendChild(id);
+ proxy.appendChild(active);
+ proxy.appendChild(protocol);
+ // create username and password tags only if required
+ if (proxyUser != null && !proxyUser.isEmpty() && proxyPassword != null) {
+ final Element username = settings.createElement("username");
+ final Element password = settings.createElement("password");
+ username.appendChild(settings.createTextNode(proxyUser));
+ password.appendChild(settings.createTextNode(proxyPassword));
+ proxy.appendChild(username);
+ proxy.appendChild(password);
+ }
+ proxy.appendChild(host);
+ proxy.appendChild(port);
+ proxy.appendChild(nonProxyHosts);
+
+ proxies.appendChild(proxy);
+
+ FileSystemUtils.writeXML(settings, new FileOutputStream(tempSettingsXML));
+
+ }
+ return tempSettingsXML;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
new file mode 100644
index 0000000..be661a7
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/utilities/PasswordGenerator.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.utilities;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.apache.commons.codec.binary.Hex;
+
+public class PasswordGenerator {
+
+ public static String password(final String password, final String digest) {
+ String pwd = "";
+ try {
+ final MessageDigest cript = MessageDigest.getInstance("SHA-1");
+ pwd = new String(Hex.encodeHex(cript.digest()));
+ } catch (final NoSuchAlgorithmException ex) {
+ Logger.getLogger(PasswordGenerator.class.getName()).log(Level.SEVERE, "NoSuchAlgorithmException", ex);
+
+ }
+ return pwd;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/AbstractValidator.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/AbstractValidator.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/AbstractValidator.java
new file mode 100644
index 0000000..6ff54e9
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/AbstractValidator.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.validators;
+
+import com.izforge.izpack.api.installer.DataValidator;
+
+public abstract class AbstractValidator implements DataValidator {
+
+ protected boolean isEmpty(final String string) {
+ return !(string != null && string.length() != 0);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
new file mode 100644
index 0000000..4fe3363
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ArchetypeValidator.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.validators;
+
+import com.izforge.izpack.api.data.InstallData;
+import java.io.File;
+
+public class ArchetypeValidator extends AbstractValidator {
+
+ private StringBuilder error;
+
+ @Override
+ public Status validateData(final InstallData installData) {
+
+ final String mavenDir = installData.getVariable("mvn.directory");
+ final String mavenGroupId = installData.getVariable("mvn.groupid");
+ final String mavenArtifactId = installData.getVariable("mvn.artifactid");
+ final String mavenSecretKey = installData.getVariable("mvn.secretkey");
+ final String mavenAnonymousKey = installData.getVariable("mvn.anonymous.key");
+ final String mavenLogDirectory = installData.getVariable("mvn.log.directory");
+ final String mavenBundleDirectory = installData.getVariable("mvn.bundle.directory");
+
+ boolean verified = true;
+ error = new StringBuilder("Required fields:\n");
+ if (isEmpty(mavenDir)) {
+ error.append("Maven home directory\n");
+ verified = false;
+ } else if (!new File(mavenDir + "/bin/mvn").exists()){
+ error.append("Maven home directory not valid, check it please...\n");
+ verified = false;
+ }
+ if (isEmpty(mavenGroupId)) {
+ error.append("GroupID\n");
+ verified = false;
+ }
+ if (isEmpty(mavenArtifactId)) {
+ error.append("ArtifactID\n");
+ verified = false;
+ }
+ if (isEmpty(mavenSecretKey)) {
+ error.append("SecretKey\n");
+ verified = false;
+ }
+ if (isEmpty(mavenAnonymousKey)) {
+ error.append("AnonymousKey\n");
+ verified = false;
+ }
+ if (isEmpty(mavenLogDirectory)) {
+ error.append("Logs directory\n");
+ verified = false;
+ }
+ if (isEmpty(mavenBundleDirectory)) {
+ error.append("Bundles directory\n");
+ verified = false;
+ }
+
+ return verified ? Status.OK : Status.ERROR;
+ }
+
+ @Override
+ public String getErrorMessageId() {
+ return error.toString();
+ }
+
+ @Override
+ public String getWarningMessageId() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean getDefaultAnswer() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ContainerValidator.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ContainerValidator.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ContainerValidator.java
new file mode 100644
index 0000000..02c7b5a
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/ContainerValidator.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.validators;
+
+import com.izforge.izpack.api.data.InstallData;
+import java.io.File;
+import org.apache.syncope.installer.enums.Containers;
+import org.apache.syncope.installer.utilities.HttpUtils;
+
+public class ContainerValidator extends AbstractValidator {
+
+ private StringBuilder error;
+
+ @Override
+ public Status validateData(final InstallData installData) {
+
+ final Containers selectedContainer = Containers.fromContainerName(
+ installData.getVariable("install.container.selection"));
+ final String tomcatSsl = installData.getVariable("tomcat.container.ssl");
+ final String tomcatHost = installData.getVariable("tomcat.container.host");
+ final String tomcatPort = installData.getVariable("tomcat.container.port");
+ final String tomcatUser = installData.getVariable("tomcat.container.user");
+ final String tomcatPassword = installData.getVariable("tomcat.container.pwd");
+ final String glassfishDir = installData.getVariable("glassfish.container.dir");
+ final String jbossSsl = installData.getVariable("jboss.container.ssl");
+ final String jbossHost = installData.getVariable("jboss.container.host");
+ final String jbossPort = installData.getVariable("jboss.container.port");
+ final String jbossJdbcModule = installData.getVariable("jboss.container.jdbc.module");
+ final String jbossAdminUsername = installData.getVariable("jboss.container.user");
+ final String jbossAdminPassword = installData.getVariable("jboss.container.pwd");
+
+ switch (selectedContainer) {
+ case TOMCAT:
+
+ boolean verified = true;
+ error = new StringBuilder("Required fields:\n");
+ if (isEmpty(tomcatHost)) {
+ error.append("Tomcat host\n");
+ verified = false;
+ }
+ if (isEmpty(tomcatPort)) {
+ error.append("Tomcat port\n");
+ verified = false;
+ }
+ if (isEmpty(tomcatUser)) {
+ error.append("Tomcat user\n");
+ verified = false;
+ }
+ if (isEmpty(tomcatPassword)) {
+ error.append("Tomcat password\n");
+ verified = false;
+ }
+
+ if (!verified) {
+ return Status.ERROR;
+ }
+
+ int responseCode = HttpUtils.ping(Boolean.valueOf(tomcatSsl), tomcatHost, tomcatPort);
+
+ if (responseCode == 200) {
+ return Status.OK;
+ } else {
+ error = new StringBuilder("Tomcat URL is offline");
+ return Status.ERROR;
+ }
+ case JBOSS:
+ boolean virified = true;
+ error = new StringBuilder("Required fields:\n");
+ if (isEmpty(jbossHost)) {
+ error.append("JBoss Host\n");
+ virified = false;
+ }
+ if (isEmpty(jbossPort)) {
+ error.append("JBoss Port\n");
+ virified = false;
+ }
+ if (isEmpty(jbossJdbcModule)) {
+ error.append("JBoss JDBC module name\n");
+ virified = false;
+ }
+ if (isEmpty(jbossAdminUsername)) {
+ error.append("JBoss admin username\n");
+ virified = false;
+ }
+ if (isEmpty(jbossAdminPassword)) {
+ error.append("JBoss admin password\n");
+ virified = false;
+ }
+
+ if (!virified) {
+ return Status.ERROR;
+ }
+
+ int jResponseCode = HttpUtils.ping(Boolean.valueOf(jbossSsl), jbossHost, jbossPort);
+
+ if (jResponseCode == 200) {
+ return Status.OK;
+ } else {
+ error = new StringBuilder("JBoss URL is offline");
+ return Status.ERROR;
+ }
+ case GLASSFISH:
+ error = new StringBuilder("Required fields:\n");
+ if (isEmpty(glassfishDir)) {
+ error.append("Glassfish directory\n");
+ return Status.ERROR;
+ }
+
+ final File dir = new File(glassfishDir);
+
+ if (!dir.exists()) {
+ error.append("Glassfish directory not found");
+ return Status.ERROR;
+ }
+
+ if (!dir.isDirectory()) {
+ error.append("Glassfish directory is not a directory");
+ return Status.ERROR;
+ }
+ return Status.OK;
+ default:
+ error = new StringBuilder("Container not supported yet");
+ return Status.ERROR;
+ }
+ }
+
+ @Override
+ public String getErrorMessageId() {
+ return error.toString();
+ }
+
+ @Override
+ public String getWarningMessageId() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean getDefaultAnswer() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/PersistenceValidator.java
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/PersistenceValidator.java b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/PersistenceValidator.java
new file mode 100644
index 0000000..33608a9
--- /dev/null
+++ b/syncope620/installer/src/main/java/org/apache/syncope/installer/validators/PersistenceValidator.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.installer.validators;
+
+import com.izforge.izpack.api.data.InstallData;
+import java.sql.Driver;
+import java.util.Properties;
+import org.apache.syncope.installer.enums.DBs;
+import org.apache.syncope.installer.utilities.DriverLoader;
+
+public class PersistenceValidator extends AbstractValidator {
+
+ private String persistenceUrl;
+
+ private String persistenceDbuser;
+
+ private String persistenceDbPassword;
+
+ private StringBuilder error;
+
+ private StringBuilder warning;
+
+ private boolean isProxyEnabled;
+
+ private String proxyHost;
+
+ private String proxyPort;
+
+ private String proxyUser;
+
+ private String proxyPwd;
+
+ @Override
+ public Status validateData(final InstallData installData) {
+
+ final DBs selectedDB = DBs.fromDbName(
+ installData.getVariable("install.type.selection"));
+
+ persistenceUrl = installData.getVariable("persistence.url");
+ persistenceDbuser = installData.getVariable("persistence.dbuser");
+ persistenceDbPassword = installData.getVariable("persistence.dbpassword");
+ isProxyEnabled = Boolean.valueOf(installData.getVariable("mvn.proxy"));
+ proxyHost = installData.getVariable("mvn.proxy.host");
+ proxyPort = installData.getVariable("mvn.proxy.port");
+ proxyUser = installData.getVariable("mvn.proxy.user");
+ proxyPwd = installData.getVariable("mvn.proxy.pwd");
+
+ boolean verified = true;
+ error = new StringBuilder("Required fields:\n");
+ if (isEmpty(persistenceUrl)) {
+ error.append("Persistence URL\n");
+ verified = false;
+ }
+ if (isEmpty(persistenceDbuser)) {
+ error.append("Persistence user\n");
+ verified = false;
+ }
+ if (isEmpty(persistenceDbPassword)) {
+ error.append("Persistence password\n");
+ verified = false;
+ }
+
+ if (!verified) {
+ return Status.ERROR;
+ }
+
+ switch (selectedDB) {
+ case POSTGRES:
+ return checkConnection(selectedDB);
+ case MYSQL:
+ return checkConnection(selectedDB);
+ case SQLSERVER:
+ warning = new StringBuilder("Remember to check your SqlServer db connection");
+ return Status.WARNING;
+ case ORACLE:
+ warning = new StringBuilder("Remember to check your Oracle db connection");
+ return Status.WARNING;
+ default:
+ error = new StringBuilder("DB not supported yet");
+ return Status.ERROR;
+ }
+ }
+
+ private Status checkConnection(final DBs selectedDb) {
+ Driver driver = null;
+ try {
+ driver = DriverLoader.load(selectedDb, isProxyEnabled, proxyHost, proxyPort, proxyUser, proxyPwd);
+ final Properties props = new Properties();
+ props.put("user", persistenceDbuser);
+ props.put("password", persistenceDbPassword);
+ driver.connect(persistenceUrl, props);
+ return Status.OK;
+ } catch (Exception ex) {
+ error = new StringBuilder(
+ "Error during connection to database: please check inserted data.");
+ error.append(driver == null
+ ? new StringBuilder(" Unable to get ").append(selectedDb.getName()).append(" driver!").toString()
+ : "");
+ return Status.ERROR;
+ }
+ }
+
+ @Override
+ public String getErrorMessageId() {
+ return error.toString();
+ }
+
+ @Override
+ public String getWarningMessageId() {
+ return warning.toString();
+ }
+
+ @Override
+ public boolean getDefaultAnswer() {
+ return true;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/installer.properties
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/installer.properties b/syncope620/installer/src/main/resources/installer.properties
new file mode 100644
index 0000000..e18bfea
--- /dev/null
+++ b/syncope620/installer/src/main/resources/installer.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+jBossDeploymentStructureXmlFile=core/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
+glassfishCoreWebXmlFile=core/src/main/webapp/WEB-INF/glassfish-web.xml
+tokenValueMapFile=oryx.debug.js-tokenValueMap.properties
+consoleResDirectory=console/src/main/resources
+pomFile=pom.xml
+persistenceContextEMFactoryFile=core/src/main/resources/persistenceContextEMFactory.xml
+coreMetaInfDirectory=core/src/main/resources/META-INF
+persistencePropertiesFile=core/src/main/resources/persistence.properties
+consolePropertiesFile=console.properties
+modelerPomFile=modelerPom.xml
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/ProcessPanel.Spec.xml
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/ProcessPanel.Spec.xml b/syncope620/installer/src/main/resources/izpack/ProcessPanel.Spec.xml
new file mode 100644
index 0000000..859ec18
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/ProcessPanel.Spec.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<processing>
+ <logfiledir>$INSTALL_PATH</logfiledir>
+ <job name="Archetype creation...">
+ <executeclass name="org.apache.syncope.installer.processes.ArchetypeProcess">
+ <arg>$INSTALL_PATH</arg><!-- 0 -->
+ <arg>$mvn.directory</arg><!-- 1 -->
+ <arg>$mvn.groupid</arg><!-- 2 -->
+ <arg>$mvn.artifactid</arg><!-- 3 -->
+ <arg>$mvn.secretkey</arg><!-- 4 -->
+ <arg>$mvn.anonymous.key</arg><!-- 5 -->
+ <arg>$mvn.conf.directory</arg><!-- 6 -->
+ <arg>$mvn.log.directory</arg><!-- 7 -->
+ <arg>$mvn.bundle.directory</arg><!-- 8 -->
+ <arg>$mvn.modeler.directory</arg><!-- 9 -->
+ <arg>$mvn.syncope.version</arg><!-- 10 -->
+ <arg>$mvn.syncope.admin.password</arg><!-- 11 -->
+ <arg>$mvn.proxy</arg><!-- 12 -->
+ <arg>$mvn.proxy.host</arg><!-- 13 -->
+ <arg>$mvn.proxy.port</arg><!-- 14 -->
+ <arg>$mvn.proxy.user</arg><!-- 15 -->
+ <arg>$mvn.proxy.pwd</arg><!-- 16 -->
+ <arg>$mvn.proxy.autoconf</arg><!-- 17 -->
+ </executeclass>
+ </job>
+ <job name="Persistence configuration...">
+ <executeclass name="org.apache.syncope.installer.processes.PersistenceProcess">
+ <arg>$INSTALL_PATH</arg><!-- 0 -->
+ <arg>$mvn.artifactid</arg><!-- 1 -->
+ <arg>$install.type.selection</arg><!-- 2 -->
+ <arg>$persistence.url</arg><!-- 3 -->
+ <arg>$persistence.dbuser</arg><!-- 4 -->
+ <arg>$persistence.dbpassword</arg><!-- 5 -->
+ <arg>$is.innodb</arg><!-- 6 -->
+ <arg>$persistence.tablespace</arg><!-- 7 -->
+ </executeclass>
+ </job>
+ <job name="Deploy...">
+ <executeclass name="org.apache.syncope.installer.processes.ContainerProcess">
+ <arg>$INSTALL_PATH</arg><!-- 0 -->
+ <arg>$mvn.directory</arg><!-- 1 -->
+ <arg>$mvn.artifactid</arg><!-- 2 -->
+ <arg>$install.container.selection</arg><!-- 3 -->
+ <arg>$tomcat.container.ssl</arg><!-- 4 -->
+ <arg>$tomcat.container.host</arg><!-- 5 -->
+ <arg>$tomcat.container.port</arg><!-- 6 -->
+ <arg>$tomcat.container.user</arg><!-- 7 -->
+ <arg>$tomcat.container.pwd</arg><!-- 8 -->
+ <arg>$glassfish.container.ssl</arg><!-- 9 -->
+ <arg>$glassfish.container.host</arg><!-- 10 -->
+ <arg>$glassfish.container.port</arg><!--11 -->
+ <arg>$glassfish.container.dir</arg><!-- 12 -->
+ <arg>$mvn.conf.directory</arg><!-- 13 -->
+ <arg>$mvn.log.directory</arg><!-- 14 -->
+ <arg>$mvn.bundle.directory</arg><!-- 15 -->
+ <arg>$with.datasuorce</arg><!-- 16 -->
+ <arg>$jboss.container.ssl</arg><!-- 17 -->
+ <arg>$jboss.container.host</arg><!-- 18 -->
+ <arg>$jboss.container.port</arg><!-- 19 -->
+ <arg>$jboss.container.jdbc.module</arg><!-- 20 -->
+ <arg>$jboss.container.user</arg><!-- 21 -->
+ <arg>$jboss.container.pwd</arg><!-- 22 -->
+ <arg>$jboss.container.management.port</arg><!-- 23 -->
+ <arg>$mvn.proxy</arg><!-- 24 -->
+ <arg>$mvn.proxy.host</arg><!-- 25 -->
+ <arg>$mvn.proxy.port</arg><!-- 26 -->
+ <arg>$mvn.proxy.user</arg><!-- 27 -->
+ <arg>$mvn.proxy.pwd</arg><!-- 28 -->
+ <arg>$mvn.proxy.autoconf</arg><!-- 29 -->
+ <arg>$mvn.proxy.autoconf</arg><!-- 30 -->
+ <arg>$mvn.proxy.autoconf</arg><!-- 31 -->
+ </executeclass>
+ </job>
+ <onFail previous="true" next="false" />
+ <onSuccess previous="false" next="true" />
+</processing>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/html/prerequisites.html
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/html/prerequisites.html b/syncope620/installer/src/main/resources/izpack/html/prerequisites.html
new file mode 100644
index 0000000..6b3e42c
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/html/prerequisites.html
@@ -0,0 +1,66 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Apache Syncope Installation</title>
+ <!-- <link rel="stylesheet" href="../css/style.css" />-->
+ </head>
+ <body>
+ <div id="page-wrap">
+ <h1 style="text-align: center">Prerequisites</h1>
+ <div>
+ <div>
+ <h3>Introduction</h3>
+ <p>
+ The preferred way to create a Syncope project is to generate a Maven project starting from a published archetype.
+ <br/>
+ </p>
+ </div>
+ <div>
+ Hence you need:
+ <ol>
+ <li class="prerequisite">Java SE Development Kit 6 (version 1.6.0-23 or higher) installed;</li>
+ <li class="prerequisite"><a href="http://maven.apache.org/">Apache Maven (version 3.0.3 or higher) installed;</a></li>
+ <li class="prerequisite">Some basic knowledge about Maven;</li>
+ <li class="prerequisite">Some basic knowledge about <a href="http://maven.apache.org/plugins/maven-war-plugin/overlays.html">Maven WAR overlays;</a></li>
+ <li class="prerequisite">Some basic knowledge about <a href="http://maven.apache.org/guides/introduction/introduction-to-archetypes.html">Maven archetypes.</a></li>
+ </ol>
+ </div>
+ </div>
+ <div>
+ <div>
+ <h3>Reminder</h3>
+ <p>
+ Please carefully read the following points before installing Apache Syncope:
+ <br/>
+ </p>
+ </div>
+ <div>
+ <ul>
+ <li class="prerequisite"><a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-UseDataSource">
+ Configure</a> the data source in your application server;</li>
+ <li>Make sure you have the DB up and running;</li>
+ <li>Make sure you have the container up and running.</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/html/welcome.html
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/html/welcome.html b/syncope620/installer/src/main/resources/izpack/html/welcome.html
new file mode 100644
index 0000000..578868f
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/html/welcome.html
@@ -0,0 +1,50 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Apache Syncope Installer</title>
+ <style>
+ div {
+ font-size: 45px;
+ font-family: sans-serif;
+ color: #558b53;
+ width: 100%;
+ height: 100%;
+ line-height: 100px;
+ text-align: center;
+ }
+
+ span {
+ position: relative;
+ top: 33%;
+ }
+ </style>
+ </head>
+ <body style="background-image: welcome_background;
+ background-repeat: no-repeat;
+ opacity: 0.4;">
+ <div>
+ <br/>
+ <br/>
+ <br/>
+ <span><strong>$WELCOME_TEXT</strong></span>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/img/apache-syncope-vert.png
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/img/apache-syncope-vert.png b/syncope620/installer/src/main/resources/izpack/img/apache-syncope-vert.png
new file mode 100644
index 0000000..c8b0d23
Binary files /dev/null and b/syncope620/installer/src/main/resources/izpack/img/apache-syncope-vert.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/img/welcome_background.jpg
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/img/welcome_background.jpg b/syncope620/installer/src/main/resources/izpack/img/welcome_background.jpg
new file mode 100644
index 0000000..8620bd7
Binary files /dev/null and b/syncope620/installer/src/main/resources/izpack/img/welcome_background.jpg differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/install.xml
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/install.xml b/syncope620/installer/src/main/resources/izpack/install.xml
new file mode 100644
index 0000000..e2f46a6
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/install.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<izpack:installation version="5.0"
+ xmlns:izpack="http://izpack.org/schema/installation"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://izpack.org/schema/installation
+ http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">
+
+ <info>
+ <appname>Apache Syncope</appname>
+ <appversion>@{syncope.version}</appversion>
+ <url>http://syncope.apache.org</url>
+ <authors>
+ <author name="Apache Syncope" email="dev@syncope.apache.org"/>
+ </authors>
+ <javaversion>${targetJdk}</javaversion>
+ </info>
+
+ <guiprefs resizable="no" width="800" height="600">
+ <modifier key="useButtonIcons" value="yes"/>
+ <modifier key="useLabelIcons" value="no"/>
+ <modifier key="labelGap" value="2"/>
+ <modifier key="layoutAnchor" value="NORTHWEST"/>
+ <modifier key="useHeadingPanel" value="no"/>
+ <modifier key="headingImageOnLeft" value="yes"/>
+ <modifier key="headingLineCount" value="1"/>
+ <modifier key="headingFontSize" value="1.5"/>
+ <modifier key="headingBackgroundColor" value="0x00ffffff"/>
+ <modifier key="headingPanelCounter" value="progressbar"/>
+ <modifier key="headingPanelCounterPos" value="inNavigationPanel"/>
+ </guiprefs>
+
+ <locale>
+ <langpack iso3="eng"/>
+ </locale>
+
+ <variables>
+ <variable name="InstallerFrame.logfilePath" value="Default"/>
+ <variable name="WELCOME_TEXT" value="Apache Syncope Installer"/>
+ <variable name="WELCOME_VERSION" value="${appversion}"/>
+ <variable name="TargetPanel.dir.unix" value="/var/tmp/syncope"/>
+ <variable name="TargetPanel.dir.windows" value="C:\Program Files"/>
+ </variables>
+
+ <dynamicvariables>
+ <variable name="TARGET" value="${project.build.directory}"/>
+ </dynamicvariables>
+
+ <conditions>
+
+ <condition type="variable" id="mvn.choice.proxy">
+ <name>mvn.proxy</name>
+ <value>true</value>
+ </condition>
+
+ <condition type="variable" id="postgres.choice">
+ <name>install.type.selection</name>
+ <value>postgres</value>
+ </condition>
+
+ <condition type="variable" id="sqlserver.choice">
+ <name>install.type.selection</name>
+ <value>sqlserver</value>
+ </condition>
+
+ <condition type="variable" id="mysql.choice">
+ <name>install.type.selection</name>
+ <value>mysql</value>
+ </condition>
+
+ <condition type="variable" id="oracle.choice">
+ <name>install.type.selection</name>
+ <value>oracle</value>
+ </condition>
+
+ <condition type="or" id="database_advanced">
+ <condition type="ref" refid="oracle.choice"/>
+ <condition type="ref" refid="mysql.choice"/>
+ </condition>
+
+ <condition type="variable" id="tomcat.choice">
+ <name>install.container.selection</name>
+ <value>tomcat</value>
+ </condition>
+ <condition type="variable" id="glassfish.choice">
+ <name>install.container.selection</name>
+ <value>glassfish</value>
+ </condition>
+ <condition type="variable" id="jboss.choice">
+ <name>install.container.selection</name>
+ <value>jboss</value>
+ </condition>
+ </conditions>
+
+ <resources>
+ <res id="installer.jar" src="../syncope-installer-@{syncope.version}.jar"/>
+
+ <res id="Installer.image" src="img/apache-syncope-vert.png" />
+
+ <res id="welcome_background" src="img/welcome_background.jpg" />
+ <res id="HTMLHelloPanel.welcome" src="html/welcome.html"/>
+ <res id="LicencePanel.licence" src="LICENSE"/>
+ <res id="HTMLInfoPanel.info" src="html/prerequisites.html"/>
+ <res id="userInputSpec.xml" src="userInputSpec.xml" />
+ <res id="userInputLang.xml_eng" src="userInputLang.xml_eng" />
+ <res id="userInputLang.xml_ita" src="userInputLang.xml_ita" />
+ <res id="ProcessPanel.Spec.xml" src="ProcessPanel.Spec.xml"/>
+ </resources>
+
+ <jar src="../syncope-installer-@{syncope.version}.jar" stage="install"/>
+ <jar src="lib/commons-logging-@{commons.logging.version}.jar"/>
+ <jar src="lib/commons-codec-@{commons-codec.version}.jar"/>
+ <jar src="lib/commons-io-2.4.jar"/>
+ <jar src="lib/httpclient-@{httpclient.version}.jar"/>
+ <jar src="lib/httpmime-@{httpclient.version}.jar"/>
+ <jar src="lib/httpcore-4.3.3.jar"/>
+ <jar src="lib/jackson-databind-@{jackson.version}.jar"/>
+ <jar src="lib/jackson-core-@{jackson.version}.jar"/>
+ <jar src="lib/jackson-annotations-@{jackson.version}.jar"/>
+
+ <jar src="lib/maven-invoker-@{maven-invoker.version}.jar"/>
+ <jar src="lib/plexus-utils-3.0.8.jar"/>
+
+ <panels>
+ <panel classname="HTMLHelloPanel" id="welcome"/>
+
+ <panel classname="LicencePanel" id="license"/>
+ <panel classname="HTMLInfoPanel" id="info"/>
+
+ <panel classname="TargetPanel" id="install_dir"/>
+
+ <panel classname="UserInputPanel" id="archetype">
+ <validator classname="org.apache.syncope.installer.validators.ArchetypeValidator"/>
+ </panel>
+ <panel classname="UserInputPanel" id="persistence"/>
+ <panel classname="UserInputPanel" id="persistence_advanced">
+ <validator classname="org.apache.syncope.installer.validators.PersistenceValidator"/>
+ </panel>
+
+ <panel classname="UserInputPanel" id="container"/>
+
+ <panel classname="UserInputPanel" id="container_advanced">
+ <validator classname="org.apache.syncope.installer.validators.ContainerValidator"/>
+ </panel>
+
+ <panel classname="ProcessPanel" id="archetype_proc"/>
+
+ <panel classname="SimpleFinishPanel" id="finish"/>
+ </panels>
+
+ <packs>
+ <pack name="Apache Syncope" required="yes">
+ <description>Apache Syncope Installer</description>
+ </pack>
+ </packs>
+
+</izpack:installation>
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/userInputLang.xml_eng
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/userInputLang.xml_eng b/syncope620/installer/src/main/resources/izpack/userInputLang.xml_eng
new file mode 100644
index 0000000..00f183f
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/userInputLang.xml_eng
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<langpack>
+ <str id="mvn.directory.id" txt="Maven home directory:"/>
+ <str id="archetype.mvn.groupid" txt="GroupId:"/>
+ <str id="archetype.mvn.artifactid" txt="ArtifactId:"/>
+ <str id="archetype.mvn.secretkey" txt="SecretKey:"/>
+ <str id="mvn.anonymous.key.id" txt="Anonymous Key:"/>
+ <str id="archetype.mvn.conf.directory" txt="Conf directory name:"/>
+ <str id="archetype.mvn.log.directory" txt="Log directory name:"/>
+ <str id="archetype.mvn.bundle.directory" txt="Bundle directory name:"/>
+ <str id="archetype.mvn.modeler.directory" txt="Activity modeler directory name:"/>
+ <str id="mvn.syncope.version.id" txt="Syncope Version:"/>
+ <str id="mvn.syncope.admin.password.id" txt="Admin Password:"/>
+ <str id="mvn.proxy.id" txt="Use Proxy Server:"/>
+ <str id="mvn.proxy.autoconf.id" txt="Automatically configure Maven proxy"/>
+ <str id="mvn.proxy.autoconf.desc.id" txt="Check this field if Maven is not yet configured to use proxy:"/>
+ <str id="mvn.proxy.host.id" txt="Proxy Host:"/>
+ <str id="mvn.proxy.port.id" txt="Proxy Port:"/>
+ <str id="mvn.proxy.user.id" txt="Proxy User (if required):"/>
+ <str id="mvn.proxy.pwd.id" txt="Proxy Password (if required):"/>
+
+ <str id="persistence.jdbc.url" txt="Database JDBC url:"/>
+ <str id="persistence.db.user" txt="Username:"/>
+ <str id="persistence.db.password" txt="Password:"/>
+ <str id="persistence.mysql.is.innodb" txt="INNODB"/>
+ <str id="persistence.oracle.tablespace" txt="Oracle tablespace:"/>
+
+ <str id="with.datasuorce.id" txt="DataSource with JNDI name 'java:/syncopeDataSource':"/>
+
+ <str id="tomcat.container.ssl.id" txt="Https"/>
+ <str id="tomcat.container.host.id" txt="Tomcat host:"/>
+ <str id="tomcat.container.port.id" txt="Tomcat port:"/>
+ <str id="tomcat.container.user.id" txt="Tomcat username:"/>
+ <str id="tomcat.container.pwd.id" txt="Tomcat password:"/>
+
+ <str id="glassfish.container.dir.id" txt="Glassfish home directory:"/>
+ <str id="glassfish.container.ssl.id" txt="Https"/>
+ <str id="glassfish.container.host.id" txt="Glassfish host:"/>
+ <str id="glassfish.container.port.id" txt="Glassfish port:"/>
+
+ <str id="jboss.container.ssl.id" txt="Https"/>
+ <str id="jboss.container.host.id" txt="Jboss host:"/>
+ <str id="jboss.container.port.id" txt="Jboss port:"/>
+ <str id="jboss.container.jdbc.module.id" txt="Jboss JDBC module name:"/>
+ <str id="jboss.container.user.id" txt="Jboss admin username:"/>
+ <str id="jboss.container.pwd.id" txt="Jboss admin password:"/>
+ <str id='jboss.container.management.port.id' txt="Jboss management port"/>
+</langpack>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/userInputLang.xml_ita
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/userInputLang.xml_ita b/syncope620/installer/src/main/resources/izpack/userInputLang.xml_ita
new file mode 100644
index 0000000..65dc51f
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/userInputLang.xml_ita
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<langpack>
+ <str id="mvn.directory.id" txt="Maven home directory:"/>
+ <str id="archetype.mvn.groupid" txt="GroupId:"/>
+ <str id="archetype.mvn.artifactid" txt="ArtifactId:"/>
+ <str id="archetype.mvn.secretkey" txt="SecretKey:"/>
+ <str id="mvn.anonymous.key.id" txt="Anonymous Key:"/>
+ <str id="archetype.mvn.conf.directory" txt="Conf directory name:"/>
+ <str id="archetype.mvn.log.directory" txt="Log directory name:"/>
+ <str id="archetype.mvn.bundle.directory" txt="Bundle directory name:"/>
+ <str id="archetype.mvn.modeler.directory" txt="Activity modeler directory name:"/>
+ <str id="mvn.syncope.version.id" txt="Syncope Version:"/>
+ <str id="mvn.syncope.admin.password.id" txt="Admin Password:"/>
+ <str id="mvn.proxy.id" txt="Usa un Server Proxy:"/>
+ <str id="mvn.proxy.autoconf.id" txt="Configura automaticamente il proxy per Maven"/>
+ <str id="mvn.proxy.autoconf.desc.id" txt="Seleziona questo campo se Maven non è configurato per usare un proxy:"/>
+ <str id="mvn.proxy.host.id" txt="Proxy Host:"/>
+ <str id="mvn.proxy.port.id" txt="Proxy Port:"/>
+ <str id="mvn.proxy.user.id" txt="Proxy User (se richiesto):"/>
+ <str id="mvn.proxy.pwd.id" txt="Proxy Password (se richiesta):"/>
+
+ <str id="persistence.jdbc.url" txt="Database JDBC url:"/>
+ <str id="persistence.db.user" txt="Username:"/>
+ <str id="persistence.db.password" txt="Password:"/>
+ <str id="persistence.mysql.is.innodb" txt="INNODB"/>
+ <str id="persistence.oracle.tablespace" txt="Oracle tablespace:"/>
+
+ <str id="with.datasuorce.id" txt="DataSource with JNDI name 'java:/syncopeDataSource':"/>
+
+ <str id="tomcat.container.ssl.id" txt="Https"/>
+ <str id="tomcat.container.host.id" txt="Tomcat host:"/>
+ <str id="tomcat.container.port.id" txt="Tomcat port:"/>
+ <str id="tomcat.container.user.id" txt="Tomcat username:"/>
+ <str id="tomcat.container.pwd.id" txt="Tomcat password:"/>
+
+ <str id="glassfish.container.dir.id" txt="Glassfish home directory:"/>
+ <str id="glassfish.container.ssl.id" txt="Https"/>
+ <str id="glassfish.container.host.id" txt="Glassfish host:"/>
+ <str id="glassfish.container.port.id" txt="Glassfish port:"/>
+
+ <str id="jboss.container.ssl.id" txt="Https"/>
+ <str id="jboss.container.host.id" txt="Jboss host:"/>
+ <str id="jboss.container.port.id" txt="Jboss port:"/>
+ <str id="jboss.container.jdbc.module.id" txt="Jboss JDBC module name:"/>
+ <str id="jboss.container.user.id" txt="Jboss admin username:"/>
+ <str id="jboss.container.pwd.id" txt="Jboss admin password:"/>
+ <str id='jboss.container.management.port.id' txt="Jbos management port"/>
+</langpack>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5017841/syncope620/installer/src/main/resources/izpack/userInputSpec.xml
----------------------------------------------------------------------
diff --git a/syncope620/installer/src/main/resources/izpack/userInputSpec.xml b/syncope620/installer/src/main/resources/izpack/userInputSpec.xml
new file mode 100644
index 0000000..0253a33
--- /dev/null
+++ b/syncope620/installer/src/main/resources/izpack/userInputSpec.xml
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<userInput>
+ <panel id="archetype" order="1" border="false">
+ <field type="title" txt="Maven" bold="true" size="2" />
+
+ <field type="divider"/>
+ <field type="space"/>
+
+ <field type="dir" variable="mvn.directory">
+ <spec id="mvn.directory.id" size="20" set="${ENV[M2_HOME]}"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.groupid">
+ <spec id="archetype.mvn.groupid" size="20" set="net.tirasa"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.artifactid">
+ <spec id="archetype.mvn.artifactid" size="20" set="syncope"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.secretkey">
+ <spec id="archetype.mvn.secretkey" size="20" set="123456789asdfghj"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.anonymous.key">
+ <spec id="mvn.anonymous.key.id" size="20" set="123456789asdfghj"/>
+ </field>
+ <field type="space"/>
+ <field type="dir" variable="mvn.conf.directory">
+ <spec id="archetype.mvn.conf.directory" size="20" set="/var/tmp/syncope/conf" mustExist="false" create="true"/>
+ </field>
+ <field type="space"/>
+ <field type="dir" variable="mvn.log.directory">
+ <spec id="archetype.mvn.log.directory" size="20" set="/var/tmp/syncope/log" mustExist="false" create="true"/>
+ </field>
+ <field type="space"/>
+ <field type="dir" variable="mvn.modeler.directory">
+ <spec id="archetype.mvn.modeler.directory" size="20" set="/var/tmp/syncope/modeler" mustExist="false" create="true"/>
+ </field>
+ <field type="space"/>
+ <field type="dir" variable="mvn.bundle.directory">
+ <spec id="archetype.mvn.bundle.directory" size="20" set="/var/tmp/syncope/bundles" mustExist="false" create="true"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.syncope.version">
+ <spec id="mvn.syncope.version.id" size="20" set="${syncope.version}"/>
+ </field>
+ <!-- <field type="space"/>
+ <field type="password" variable="mvn.syncope.admin.password">
+ <spec>
+ <pwd id="mvn.syncope.admin.password.id" size="20" set="password"/>
+ </spec>
+ </field>-->
+ <field type="space"/>
+ <field type="divider" align="top"/>
+ <field type="check" variable="mvn.proxy">
+ <spec id="mvn.proxy.id" true="true" false="false" set="false"/>
+ </field>
+ <field type="space"/>
+ <field type="check" variable="mvn.proxy.autoconf" conditionid="mvn.choice.proxy">
+ <description id="mvn.proxy.autoconf.desc.id"/>
+ <spec id="mvn.proxy.autoconf.id" true="true" false="false" set="false"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.proxy.host" conditionid="mvn.choice.proxy">
+ <spec id="mvn.proxy.host.id" size="20" set="localhost"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.proxy.port" conditionid="mvn.choice.proxy">
+ <spec id="mvn.proxy.port.id" size="5" set="3128"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="mvn.proxy.user" conditionid="mvn.choice.proxy">
+ <spec id="mvn.proxy.user.id" size="20"/>
+ </field>
+ <field type="space"/>
+ <field type="password" variable="mvn.proxy.pwd" conditionid="mvn.choice.proxy">
+ <spec>
+ <pwd id="mvn.proxy.pwd.id" size="20"/>
+ </spec>
+ </field>
+ </panel>
+
+ <panel id="persistence" order="2" border="false">
+ <field type="title" txt="Database options" bold="true" size="2" />
+
+ <field type="divider"/>
+ <field type="space"/>
+
+ <field type="staticText" align="left" txt="Database technologies:" />
+ <field type="radio" variable="install.type.selection">
+ <spec>
+ <choice txt="Postgres" value="postgres" set="true" />
+ <choice txt="MySQL" value="mysql"/>
+ <choice txt="Oracle" value="oracle"/>
+ <choice txt="SQLServer" value="sqlserver"/>
+ </spec>
+ </field>
+ </panel>
+
+ <panel id="persistence_advanced" order="2" border="false">
+ <field type="title" txt="Database advanced options" bold="true" size="2" />
+
+ <field type="divider"/>
+ <field type="space"/>
+ <field type="text" variable="persistence.url" conditionid="postgres.choice">
+ <spec id="persistence.jdbc.url" size="20" set="jdbc:postgresql://localhost:5432/syncope"/>
+ </field>
+ <field type="text" variable="persistence.url" conditionid="mysql.choice">
+ <spec id="persistence.jdbc.url" size="20" set="jdbc:mysql://localhost:3306/syncope?characterEncoding=UTF-8"/>
+ </field>
+ <field type="text" variable="persistence.url" conditionid="oracle.choice">
+ <spec id="persistence.jdbc.url" size="20" set="jdbc:oracle:thin:@localhost:1521:orcl"/>
+ </field>
+ <field type="text" variable="persistence.url" conditionid="sqlserver.choice">
+ <spec id="persistence.jdbc.url" size="20" set="jdbc:sqlserver://localhost:1433;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=false"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="persistence.dbuser">
+ <spec id="persistence.db.user" size="20" set="syncope"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="persistence.dbpassword">
+ <spec id="persistence.db.password" size="20" set="syncope"/>
+ </field>
+ <field type="space"/>
+
+ <field type="check" variable="is.innodb" conditionid="mysql.choice">
+ <spec id="persistence.mysql.is.innodb" true="true" false="false" set="true"/>
+ </field>
+
+ <field type="text" variable="persistence.tablespace" conditionid="oracle.choice">
+ <spec id="persistence.oracle.tablespace" size="20" set="SYNCOPE"/>
+ </field>
+ </panel>
+
+ <panel id="container" order="3" border="false">
+ <field type="title" txt="Application Server" bold="true" size="2" />
+
+ <field type="divider"/>
+ <field type="space"/>
+
+ <field type="staticText" align="left" txt="Application server:" />
+ <field type="radio" variable="install.container.selection">
+ <spec>
+ <choice txt="Tomcat" value="tomcat" set="true" />
+ <choice txt="Glassfish" value="glassfish"/>
+ <choice txt="Jboss" value="jboss"/>
+ </spec>
+ </field>
+
+ <field type="space"/>
+
+ <field type="check" variable="with.datasuorce">
+ <spec id="with.datasuorce.id" true="true" false="false" set="true"/>
+ </field>
+ </panel>
+
+ <panel id="container_advanced" order="3" border="false">
+ <field type="title" txt="Application Server" bold="true" size="2" />
+
+ <field type="divider"/>
+ <field type="space"/>
+
+ <field type="check" variable="tomcat.container.ssl" conditionid="tomcat.choice">
+ <spec id="tomcat.container.ssl.id" true="true" false="false" set="false"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="tomcat.container.host" conditionid="tomcat.choice">
+ <spec id="tomcat.container.host.id" size="20" set="localhost"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="tomcat.container.port" conditionid="tomcat.choice">
+ <spec id="tomcat.container.port.id" size="20" set="8080"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="tomcat.container.user" conditionid="tomcat.choice">
+ <spec id="tomcat.container.user.id" size="20" set="manager"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="tomcat.container.pwd" conditionid="tomcat.choice">
+ <spec id="tomcat.container.pwd.id" size="20" set="s3cret"/>
+ </field>
+
+ <field type="check" variable="glassfish.container.ssl" conditionid="glassfish.choice">
+ <spec id="glassfish.container.ssl.id" true="true" false="false" set="false"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="glassfish.container.host" conditionid="glassfish.choice">
+ <spec id="glassfish.container.host.id" size="20" set="localhost"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="glassfish.container.port" conditionid="glassfish.choice">
+ <spec id="glassfish.container.port.id" size="20" set="8080"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="glassfish.container.dir" conditionid="glassfish.choice">
+ <spec id="glassfish.container.dir.id" size="20" set="/opt/glassfish4/"/>
+ </field>
+
+ <field type="check" variable="jboss.container.ssl" conditionid="jboss.choice">
+ <spec id="jboss.container.ssl.id" true="true" false="false" set="false"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.host" conditionid="jboss.choice">
+ <spec id="jboss.container.host.id" size="20" set="localhost"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.port" conditionid="jboss.choice">
+ <spec id="jboss.container.port.id" size="20" set="8080"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.jdbc.module" conditionid="jboss.choice">
+ <spec id="jboss.container.jdbc.module.id" size="20" set="org.postgres"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.user" conditionid="jboss.choice">
+ <spec id="jboss.container.user.id" size="20" set="admin"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.pwd" conditionid="jboss.choice">
+ <spec id="jboss.container.pwd.id" size="20" set="password"/>
+ </field>
+ <field type="space"/>
+ <field type="text" variable="jboss.container.management.port" conditionid="jboss.choice">
+ <spec id="jboss.container.management.port.id" size="20" set="9990"/>
+ </field>
+ </panel>
+</userInput>
[5/5] syncope git commit: Merge branch '2_0_X' of
https://git-wip-us.apache.org/repos/asf/syncope into 2_0_X
Posted by il...@apache.org.
Merge branch '2_0_X' of https://git-wip-us.apache.org/repos/asf/syncope into 2_0_X
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/50a9236e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/50a9236e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/50a9236e
Branch: refs/heads/2_0_X
Commit: 50a9236ed4f2c83845610fa65f1766d1c719c39a
Parents: f501784 6907427
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Feb 13 12:26:35 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 13 12:26:35 2015 +0100
----------------------------------------------------------------------
.../org/apache/syncope/installer/utilities/DriverLoader.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------