You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by ma...@apache.org on 2014/09/30 16:37:01 UTC

svn commit: r1628459 - in /syncope/trunk: ./ installer/src/main/java/org/apache/syncope/installer/files/ installer/src/main/java/org/apache/syncope/installer/processes/ installer/src/main/java/org/apache/syncope/installer/utilities/ installer/src/main/...

Author: massi
Date: Tue Sep 30 14:37:01 2014
New Revision: 1628459

URL: http://svn.apache.org/r1628459
Log:
merge from branch 1_2_X

Added:
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java
      - copied unchanged from r1628458, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/ModelerPom.java
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java
      - copied unchanged from r1628458, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/ModelerTokenValueMap.java
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java
      - copied unchanged from r1628458, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java
Removed:
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/files/Pom.java
Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
    syncope/trunk/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
    syncope/trunk/installer/src/main/resources/izpack/ProcessPanel.Spec.xml
    syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_eng
    syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_ita
    syncope/trunk/installer/src/main/resources/izpack/userInputSpec.xml

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1628381-1628458

Modified: syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java (original)
+++ syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java Tue Sep 30 14:37:01 2014
@@ -24,7 +24,9 @@ import java.io.File;
 import java.io.IOException;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
-import org.apache.syncope.installer.files.Pom;
+import org.apache.syncope.installer.files.ModelerPom;
+import org.apache.syncope.installer.files.ModelerTokenValueMap;
+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;
@@ -41,14 +43,15 @@ public class ArchetypeProcess {
         final String confDirectory = args[6];
         final String logsDirectory = args[7];
         final String bundlesDirectory = args[8];
-        final String syncopeVersion = args[9];
-        final String syncopeAdminPassword = args[10];
-        final boolean isProxyEnabled = Boolean.valueOf(args[11]);
-        final String proxyHost = args[12];
-        final String proxyPort = args[13];
-        final String proxyUser = args[14];
-        final String proxyPwd = args[15];
-        final boolean mavenProxyAutoconf = Boolean.valueOf(args[16]);
+        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]);
 
         final FileSystemUtils fileSystemUtils = new FileSystemUtils(handler);
         fileSystemUtils.createDirectory(installPath);
@@ -92,12 +95,17 @@ public class ArchetypeProcess {
         mavenUtils.archetypeGenerate(
                 syncopeVersion, groupId, artifactId, secretKey, anonymousKey, installPath, customMavenProxySettings);
 
-        fileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + Pom.PATH),
-                String.format(Pom.FILE, syncopeVersion, syncopeVersion, groupId, artifactId));
+        fileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + ParentPom.PATH),
+                String.format(ParentPom.FILE, syncopeVersion, syncopeVersion, groupId, artifactId));
         fileSystemUtils.createDirectory(confDirectory);
         fileSystemUtils.createDirectory(logsDirectory);
         fileSystemUtils.createDirectory(bundlesDirectory);
-        mavenUtils.createPackage(installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory,
-                customMavenProxySettings);
+        fileSystemUtils.createDirectory(modelerDirectory);
+        fileSystemUtils.writeToFile(new File(modelerDirectory + ModelerPom.PATH),
+                String.format(ModelerPom.FILE, modelerDirectory, modelerDirectory));
+        fileSystemUtils.writeToFile(new File(modelerDirectory + ModelerTokenValueMap.PATH), ModelerTokenValueMap.FILE);
+        mavenUtils.mvnCleanPackage(modelerDirectory, customMavenProxySettings);
+        mavenUtils.mvnCleanPackageWithProperties(
+                installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory, customMavenProxySettings);
     }
 }

Modified: syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java (original)
+++ syncope/trunk/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java Tue Sep 30 14:37:01 2014
@@ -178,7 +178,7 @@ public class ContainerProcess {
             InstallLog.getInstance().error(messageError.append(ex.getMessage() == null ? "" : ex.getMessage()).
                     toString());
         }
-        mavenUtils.createPackage(installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory,
+        mavenUtils.mvnCleanPackageWithProperties(installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory,
                 customMavenProxySettings);
         if (isProxyEnabled && mavenProxyAutoconf) {
             FileSystemUtils.delete(customMavenProxySettings);

Modified: syncope/trunk/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java (original)
+++ syncope/trunk/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java Tue Sep 30 14:37:01 2014
@@ -86,7 +86,21 @@ public class MavenUtils {
         return properties;
     }
 
-    public void createPackage(final String path, final String confDirectory,
+    public void mvnCleanPackage(final String path, final File customSettingsFile) {
+        final InvocationRequest request = new DefaultInvocationRequest();
+        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(), new Properties());
+        logToFile(request.getGoals(), new Properties());
+        invoke(request, path);
+    }
+    
+    public void mvnCleanPackageWithProperties(final String path, final String confDirectory,
             final String logDirectory, final String bundlesDirectory, final File customSettingsFile) {
         final InvocationRequest request = new DefaultInvocationRequest();
         final Properties properties = packageProperties(confDirectory, logDirectory, bundlesDirectory);

Modified: syncope/trunk/installer/src/main/resources/izpack/ProcessPanel.Spec.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/resources/izpack/ProcessPanel.Spec.xml?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/resources/izpack/ProcessPanel.Spec.xml (original)
+++ syncope/trunk/installer/src/main/resources/izpack/ProcessPanel.Spec.xml Tue Sep 30 14:37:01 2014
@@ -21,23 +21,24 @@ under the License.
   <logfiledir>$INSTALL_PATH</logfiledir>
   <job name="Archetype creation...">
     <executeclass name="org.apache.syncope.installer.processes.ArchetypeProcess">
-      <arg>$INSTALL_PATH</arg>
-      <arg>$mvn.directory</arg>
-      <arg>$mvn.groupid</arg>
-      <arg>$mvn.artifactid</arg>
-      <arg>$mvn.secretkey</arg>
-      <arg>$mvn.anonymous.key</arg>
-      <arg>$mvn.conf.directory</arg>
-      <arg>$mvn.log.directory</arg>
-      <arg>$mvn.bundle.directory</arg>
-      <arg>$mvn.syncope.version</arg>
-      <arg>$mvn.syncope.admin.password</arg>
-      <arg>$mvn.proxy</arg><!-- 11 -->
-      <arg>$mvn.proxy.host</arg><!-- 12 -->
-      <arg>$mvn.proxy.port</arg><!-- 13 -->
-      <arg>$mvn.proxy.user</arg><!-- 14 -->
-      <arg>$mvn.proxy.pwd</arg><!-- 15 -->
-      <arg>$mvn.proxy.autoconf</arg><!-- 16 -->
+      <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...">

Modified: syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_eng
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_eng?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_eng (original)
+++ syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_eng Tue Sep 30 14:37:01 2014
@@ -26,6 +26,7 @@ under the License.
   <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:"/>

Modified: syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_ita
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_ita?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_ita (original)
+++ syncope/trunk/installer/src/main/resources/izpack/userInputLang.xml_ita Tue Sep 30 14:37:01 2014
@@ -26,6 +26,7 @@ under the License.
   <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:"/>

Modified: syncope/trunk/installer/src/main/resources/izpack/userInputSpec.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/installer/src/main/resources/izpack/userInputSpec.xml?rev=1628459&r1=1628458&r2=1628459&view=diff
==============================================================================
--- syncope/trunk/installer/src/main/resources/izpack/userInputSpec.xml (original)
+++ syncope/trunk/installer/src/main/resources/izpack/userInputSpec.xml Tue Sep 30 14:37:01 2014
@@ -52,6 +52,10 @@ under the License.
       <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>