Author: massi Date: Tue Aug 5 11:01:10 2014 New Revision: 1615906 URL: http://svn.apache.org/r1615906 Log: Fixed SYNCOPE-541 + bugfix
Added: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/CoreWebXml.java - copied, changed from r1615107, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/WebXml.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java - copied, changed from r1615905, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishWebXml.java Removed: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishWebXml.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/WebXml.java Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/Pom.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java syncope/branches/1_2_X/installer/src/main/resources/izpack/ProcessPanel.Spec.xml syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_eng syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_ita syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputSpec.xml Copied: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/CoreWebXml.java (from r1615107, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/WebXml.java) URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/CoreWebXml.java?p2=syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/CoreWebXml.java&p1=syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/WebXml.java&r1=1615107&r2=1615906&rev=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/WebXml.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/CoreWebXml.java Tue Aug 5 11:01:10 2014 @@ -18,7 +18,7 @@ */ package org.apache.syncope.installer.files; -public class WebXml { +public class CoreWebXml { public static final String PATH = "/core/src/main/webapp/WEB-INF/web.xml"; Copied: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java (from r1615905, syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishWebXml.java) URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java?p2=syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java&p1=syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishWebXml.java&r1=1615905&r2=1615906&rev=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishWebXml.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/GlassfishCoreWebXml.java Tue Aug 5 11:01:10 2014 @@ -18,7 +18,7 @@ */ package org.apache.syncope.installer.files; -public class GlassfishWebXml { +public class GlassfishCoreWebXml { public static final String PATH = "/core/src/main/webapp/WEB-INF/glassfish-web.xml"; Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/PersistenceProperties.java Tue Aug 5 11:01:10 2014 @@ -46,7 +46,7 @@ public class PersistenceProperties { + "quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate\n" + "quartz.sql=tables_postgres.sql\n" + "audit.sql=audit.sql\n" - + "logback.sql=postgresql.sql"; + + "database.schema="; public static final String MYSQL = "" + "jpa.driverClassName=com.mysql.jdbc.Driver\n" @@ -57,7 +57,7 @@ public class PersistenceProperties { + "jpa.pool.validationQuery=SELECT 1\n" + "quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n" + "audit.sql=audit.sql\n" - + "logback.sql=mysql.sql\n"; + + "database.schema="; public static final String ORACLE = "" + "jpa.driverClassName=oracle.jdbc.OracleDriver\n" @@ -69,7 +69,6 @@ public class PersistenceProperties { + "quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate\n" + "quartz.sql=tables_oracle.sql\n" + "audit.sql=audit.sql\n" - + "logback.sql=oracle.sql\n" + "database.schema=%s\n"; public static final String SQLSERVER = "" @@ -80,8 +79,8 @@ public class PersistenceProperties { + "jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary\n" + "quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate\n" + "quartz.sql=tables_sqlServer.sql\n" - + "logback.sql=sqlserver.sql\n" - + "audit.sql=audit.sql\n"; + + "audit.sql=audit.sql\n" + + "database.schema="; public static final String QUARTZ_INNO_DB = "quartz.sql=tables_mysql_innodb.sql"; Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/Pom.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/Pom.java?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/Pom.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/files/Pom.java Tue Aug 5 11:01:10 2014 @@ -22,80 +22,174 @@ public class Pom { public static final String PATH = "/pom.xml"; - public static final String FILE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!--\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" - + "--><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/maven-v4_0_0.xsd\">\n" - + "\n" + " <modelVersion>4.0.0</modelVersion>\n" + "\n" + " <parent>\n" - + " <groupId>org.apache.syncope</groupId>\n" + " <artifactId>syncope</artifactId>\n" - + " <version xmlns=\"\">%s</version>\n" + " </parent>\n" + "\n" + " <properties>\n" - + " <syncope.version xmlns=\"\">%s</syncope.version>\n" - + " <secretKey>123456789asdfghj</secretKey>\n" + " <anonymousKey>aoshdaiuhdaiuhd</anonymousKey>\n" - + " </properties>\n" + "\n" + " <name>Apache Syncope sample project</name>\n" - + " <groupId>net.tirasa</groupId>\n" + " <artifactId>syncope</artifactId>\n" - + " <version>1.0-SNAPSHOT</version>\n" + " <packaging>pom</packaging>\n" + "\n" - + " <dependencyManagement>\n" + " <dependencies>\n" + " <dependency>\n" - + " <groupId>org.apache.syncope</groupId>\n" + " <artifactId>syncope-common</artifactId>\n" - + " <version>${syncope.version}</version>\n" + " </dependency> \n" + " \n" - + " <dependency>\n" + " <groupId>org.apache.syncope</groupId>\n" - + " <artifactId>syncope-common</artifactId>\n" + " <version>${syncope.version}</version>\n" - + " <classifier>javadoc</classifier>\n" + " </dependency>\n" + "\n" + " <dependency>\n" - + " <groupId>org.apache.syncope</groupId>\n" + " <artifactId>syncope-client</artifactId>\n" - + " <version>${syncope.version}</version>\n" + " </dependency> \n" + "\n" - + " <dependency>\n" + " <groupId>org.apache.syncope</groupId>\n" - + " <artifactId>syncope-build-tools</artifactId>\n" - + " <version>${syncope.version}</version>\n" + " <type>war</type>\n" - + " <scope>test</scope>\n" + " </dependency> \n" + " \n" + " <dependency>\n" - + " <groupId>org.apache.syncope</groupId>\n" + " <artifactId>syncope-core</artifactId>\n" - + " <version>${syncope.version}</version>\n" + " <type>war</type>\n" - + " </dependency> \n" + " <dependency>\n" + " <groupId>org.apache.syncope</groupId>\n" - + " <artifactId>syncope-core</artifactId>\n" + " <version>${syncope.version}</version>\n" - + " <classifier>classes</classifier>\n" + " <scope>provided</scope>\n" - + " </dependency> \n" + "\n" + " <dependency>\n" - + " <groupId>org.apache.syncope</groupId>\n" + " <artifactId>syncope-console</artifactId>\n" - + " <version>${syncope.version}</version>\n" + " <type>war</type>\n" - + " </dependency> \n" + " <dependency>\n" + " <groupId>org.apache.syncope</groupId>\n" - + " <artifactId>syncope-console</artifactId>\n" + " <version>${syncope.version}</version>\n" - + " <classifier>classes</classifier>\n" + " <scope>provided</scope>\n" - + " </dependency> \n" + " </dependencies>\n" + " </dependencyManagement>\n" + " \n" - + " <build>\n" + " \n" + " <pluginManagement>\n" + " <plugins>\n" - + " <!-- Disable LICENSE / NOTICE inclusion: see SYNCOPE-84 -->\n" + " <plugin>\n" - + " <groupId>org.apache.maven.plugins</groupId>\n" - + " <artifactId>maven-war-plugin</artifactId>\n" + " <inherited>false</inherited>\n" - + " <configuration>\n" + " <webResources>\n" + " <resource>\n" - + " <directory>src/main/webapp</directory>\n" + " <includes>\n" - + " <include>**/*.jsp</include>\n" + " </includes>\n" - + " <filtering>true</filtering>\n" + " </resource>\n" - + " </webResources>\n" + " </configuration>\n" + " </plugin>\n" - + " </plugins>\n" + " </pluginManagement>\n" + " \n" - + " <!-- Disable legal check for generated projects: see SYNCOPE-84 -->\n" + " <plugins>\n" - + " <plugin>\n" + " <groupId>org.codehaus.mojo</groupId>\n" - + " <artifactId>ianal-maven-plugin</artifactId>\n" + " <inherited>true</inherited>\n" - + " <executions>\n" + " <execution> \n" + " <goals>\n" - + " <goal>verify-legal-files</goal>\n" + " </goals>\n" - + " <phase>none</phase>\n" + " </execution>\n" + " </executions>\n" - + " </plugin>\n" + " <plugin>\n" + " <groupId>org.apache.rat</groupId>\n" - + " <artifactId>apache-rat-plugin</artifactId>\n" + " <inherited>true</inherited>\n" - + " <executions>\n" + " <execution>\n" + " <goals>\n" - + " <goal>check</goal>\n" + " </goals>\n" + " <phase>none</phase>\n" - + " </execution>\n" + " </executions>\n" + " </plugin>\n" + " </plugins>\n" - + " </build>\n" + " \n" + " <modules>\n" + " <module>core</module>\n" - + " <module>console</module>\n" + " </modules>\n" - + "<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" + "\n" + "</project>"; + public static final String FILE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!--\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" + +"--><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/maven-v4_0_0.xsd\">\n" + +"\n" + +" <modelVersion>4.0.0</modelVersion>\n" + +"\n" + +" <parent>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope</artifactId>\n" + +" <version xmlns=\"\">%s</version>\n" + +" </parent>\n" + +"\n" + +" <properties>\n" + +" <syncope.version xmlns=\"\">%s</syncope.version>\n" + +" <secretKey>ahsdgausygdausygduasygd</secretKey>\n" + +" <anonymousKey>asdasdasdasd</anonymousKey>\n" + +" </properties>\n" + +"\n" + +" <name>Apache Syncope sample project</name>\n" + +" <groupId>%s</groupId>\n" + +" <artifactId>%s</artifactId>\n" + +" <version>1.0-SNAPSHOT</version>\n" + +" <packaging>pom</packaging>\n" + +"\n" + +" <dependencyManagement>\n" + +" <dependencies>\n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-common</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" </dependency> \n" + +" \n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-common</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <classifier>javadoc</classifier>\n" + +" </dependency>\n" + +"\n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-client</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" </dependency> \n" + +"\n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-build-tools</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <type>war</type>\n" + +" <scope>test</scope>\n" + +" </dependency> \n" + +" \n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-core</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <type>war</type>\n" + +" </dependency> \n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-core</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <classifier>classes</classifier>\n" + +" <scope>provided</scope>\n" + +" </dependency> \n" + +"\n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-console</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <type>war</type>\n" + +" </dependency> \n" + +" <dependency>\n" + +" <groupId>org.apache.syncope</groupId>\n" + +" <artifactId>syncope-console</artifactId>\n" + +" <version>${syncope.version}</version>\n" + +" <classifier>classes</classifier>\n" + +" <scope>provided</scope>\n" + +" </dependency> \n" + +" </dependencies>\n" + +" </dependencyManagement>\n" + +" \n" + +" <build>\n" + +" \n" + +" <pluginManagement>\n" + +" <plugins>\n" + +" <!-- Disable LICENSE / NOTICE inclusion: see SYNCOPE-84 -->\n" + +" <plugin>\n" + +" <groupId>org.apache.maven.plugins</groupId>\n" + +" <artifactId>maven-war-plugin</artifactId>\n" + +" <inherited>false</inherited>\n" + +" <configuration>\n" + +" <webResources>\n" + +" <resource>\n" + +" <directory>src/main/webapp</directory>\n" + +" <includes>\n" + +" <include>**/*.jsp</include>\n" + +" </includes>\n" + +" <filtering>true</filtering>\n" + +" </resource>\n" + +" </webResources>\n" + +" </configuration>\n" + +" </plugin>\n" + +" </plugins>\n" + +" </pluginManagement>\n" + +" \n" + +" <!-- Disable legal check for generated projects: see SYNCOPE-84 -->\n" + +" <plugins>\n" + +" <plugin>\n" + +" <groupId>org.codehaus.mojo</groupId>\n" + +" <artifactId>ianal-maven-plugin</artifactId>\n" + +" <inherited>true</inherited>\n" + +" <executions>\n" + +" <execution> \n" + +" <goals>\n" + +" <goal>verify-legal-files</goal>\n" + +" </goals>\n" + +" <phase>none</phase>\n" + +" </execution>\n" + +" </executions>\n" + +" </plugin>\n" + +" <plugin>\n" + +" <groupId>org.apache.rat</groupId>\n" + +" <artifactId>apache-rat-plugin</artifactId>\n" + +" <inherited>true</inherited>\n" + +" <executions>\n" + +" <execution>\n" + +" <goals>\n" + +" <goal>check</goal>\n" + +" </goals>\n" + +" <phase>none</phase>\n" + +" </execution>\n" + +" </executions>\n" + +" </plugin>\n" + +" </plugins>\n" + +" </build>\n" + +"<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" + +" \n" + +" <modules>\n" + +" <module>core</module>\n" + +" <module>console</module>\n" + +" </modules>\n" + +"\n" + +"</project>"; } Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java Tue Aug 5 11:01:10 2014 @@ -34,10 +34,11 @@ public class ArchetypeProcess { final String artifactId = args[3]; final String secretKey = args[4]; final String anonymousKey = args[5]; - final String logsDirectory = args[6]; - final String bundlesDirectory = args[7]; - final String syncopeVersion = args[8]; - final String syncopeAdminPassword = args[9]; + 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]; if (!new File(installPath).exists()) { FileSystemUtils.createDirectory(installPath, handler, null); @@ -49,13 +50,13 @@ public class ArchetypeProcess { syncopeVersion, groupId, artifactId, secretKey, anonymousKey, installPath); FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + Pom.PATH), - String.format(Pom.FILE, syncopeVersion, syncopeVersion)); + String.format(Pom.FILE, syncopeVersion, syncopeVersion, groupId, artifactId)); FileSystemUtils.createDirectory(logsDirectory, handler, null); FileSystemUtils.createDirectory(bundlesDirectory, handler, null); - mavenUtils.createPackage(installPath + "/" + artifactId, logsDirectory, bundlesDirectory); + mavenUtils.createPackage(installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory); } } Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/processes/ContainerProcess.java Tue Aug 5 11:01:10 2014 @@ -25,10 +25,10 @@ import org.apache.syncope.installer.cont 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.GlassfishWebXml; +import org.apache.syncope.installer.files.GlassfishCoreWebXml; import org.apache.syncope.installer.files.JBossDeploymentStructureXml; import org.apache.syncope.installer.files.PersistenceContextEMFactoryXml; -import org.apache.syncope.installer.files.WebXml; +import org.apache.syncope.installer.files.CoreWebXml; import org.apache.syncope.installer.utilities.MavenUtils; public class ContainerProcess { @@ -51,6 +51,8 @@ public class ContainerProcess { private String glassfishDir; + private String confDirectory; + private String logsDirectory; private String bundlesDirectory; @@ -81,22 +83,23 @@ public class ContainerProcess { tomcatUser = args[7]; tomcatPassword = args[8]; glassfishDir = args[9]; - logsDirectory = args[10]; - bundlesDirectory = args[11]; - withDataSource = Boolean.valueOf(args[12]); - jbossSsl = Boolean.valueOf(args[13]); - jbossHost = args[14]; - jbossPort = args[15]; - jbossJdbcModuleName = args[16]; - jbossAdminUsername = args[17]; - jbossAdminPassword = args[18]; + confDirectory = args[10]; + logsDirectory = args[11]; + bundlesDirectory = args[12]; + withDataSource = Boolean.valueOf(args[13]); + jbossSsl = Boolean.valueOf(args[14]); + jbossHost = args[15]; + jbossPort = args[16]; + jbossJdbcModuleName = args[17]; + jbossAdminUsername = args[18]; + jbossAdminPassword = args[19]; if (withDataSource) { - FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + WebXml.PATH), WebXml.withDataSource()); + FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + CoreWebXml.PATH), CoreWebXml.withDataSource()); switch (selectedContainer) { case JBOSS: - FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + WebXml.PATH), - WebXml.withDataSourceForJBoss()); + FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + CoreWebXml.PATH), + CoreWebXml.withDataSourceForJBoss()); FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + PersistenceContextEMFactoryXml.PATH), PersistenceContextEMFactoryXml.FILE); FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId @@ -104,14 +107,14 @@ public class ContainerProcess { String.format(JBossDeploymentStructureXml.FILE, jbossJdbcModuleName)); break; case GLASSFISH: - FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + GlassfishWebXml.PATH), - GlassfishWebXml.withDataSource()); + FileSystemUtils.writeToFile(new File(installPath + "/" + artifactId + GlassfishCoreWebXml.PATH), + GlassfishCoreWebXml.withDataSource()); break; } } final MavenUtils mavenUtils = new MavenUtils(mavenDir); - mavenUtils.createPackage(installPath + "/" + artifactId, logsDirectory, bundlesDirectory); + mavenUtils.createPackage(installPath + "/" + artifactId, confDirectory, logsDirectory, bundlesDirectory); switch (selectedContainer) { case TOMCAT: @@ -155,8 +158,10 @@ public class ContainerProcess { final Glassfish glassfish = new Glassfish(installPath, artifactId); - FileSystemUtils.exec("sh " + glassfishDir + Glassfish.DEPLOY_COMMAND + glassfish.deployCore(), handler, null); - FileSystemUtils.exec("sh " + glassfishDir + Glassfish.DEPLOY_COMMAND + glassfish.deployConsole(), handler, null); + FileSystemUtils.exec("sh " + glassfishDir + Glassfish.DEPLOY_COMMAND + glassfish.deployCore(), handler, + null); + FileSystemUtils.exec("sh " + glassfishDir + Glassfish.DEPLOY_COMMAND + glassfish.deployConsole(), + handler, null); break; } } Modified: syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java (original) +++ syncope/branches/1_2_X/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java Tue Aug 5 11:01:10 2014 @@ -41,13 +41,13 @@ public class MavenUtils { } public void archetypeGenerate(final String archetypeVersion, final String groupId, - final String artifactId, final String secretKey, final String anonymousKey, final String path) { + final String artifactId, final String secretKey, final String anonymousKey, final String installPath) { final InvocationRequest request = new DefaultInvocationRequest(); request.setGoals(Collections.singletonList("archetype:generate")); request.setInteractive(false); request.setProperties(archetypeProperties(archetypeVersion, groupId, artifactId, secretKey, anonymousKey)); - invoke(request, "/tmp/syncope"); + invoke(request, installPath); } private Properties archetypeProperties(final String archetypeVersion, final String groupId, @@ -64,10 +64,11 @@ public class MavenUtils { return properties; } - public void createPackage(final String path, final String logDirectory, final String bundlesDirectory) { + public void createPackage(final String path, final String confDirectory, + final String logDirectory, final String bundlesDirectory) { final InvocationRequest request = new DefaultInvocationRequest(); - request.setProperties(packageProperties(logDirectory, bundlesDirectory)); + request.setProperties(packageProperties(confDirectory, logDirectory, bundlesDirectory)); final List<String> mavenGoals = new ArrayList<String>(); mavenGoals.add("clean"); mavenGoals.add("package"); @@ -75,8 +76,10 @@ public class MavenUtils { invoke(request, path); } - private Properties packageProperties(final String logDirectory, final String bundlesDirectory) { + private Properties packageProperties(final String confDirectory, final String logDirectory, + final String bundlesDirectory) { Properties properties = new Properties(); + properties.setProperty("conf.directory", confDirectory); properties.setProperty("log.directory", logDirectory); properties.setProperty("bundles.directory", bundlesDirectory); return properties; Modified: syncope/branches/1_2_X/installer/src/main/resources/izpack/ProcessPanel.Spec.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/resources/izpack/ProcessPanel.Spec.xml?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/resources/izpack/ProcessPanel.Spec.xml (original) +++ syncope/branches/1_2_X/installer/src/main/resources/izpack/ProcessPanel.Spec.xml Tue Aug 5 11:01:10 2014 @@ -27,6 +27,7 @@ under the License. <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> @@ -57,15 +58,16 @@ under the License. <arg>$tomcat.container.user</arg><!-- 7 --> <arg>$tomcat.container.pwd</arg><!-- 8 --> <arg>$glassfish.container.dir</arg><!-- 9 --> - <arg>$mvn.log.directory</arg><!-- 10 --> - <arg>$mvn.bundle.directory</arg><!-- 11 --> - <arg>$with.datasuorce</arg><!-- 12 --> - <arg>$jboss.container.ssl</arg><!-- 13 --> - <arg>$jboss.container.host</arg><!-- 14 --> - <arg>$jboss.container.port</arg><!-- 15 --> - <arg>$jboss.container.jdbc.module</arg><!-- 16 --> - <arg>$jboss.container.user</arg><!-- 17 --> - <arg>$jboss.container.pwd</arg><!-- 18 --> + <arg>$mvn.conf.directory</arg><!-- 10 --> + <arg>$mvn.log.directory</arg><!-- 11 --> + <arg>$mvn.bundle.directory</arg><!-- 12 --> + <arg>$with.datasuorce</arg><!-- 13 --> + <arg>$jboss.container.ssl</arg><!-- 14 --> + <arg>$jboss.container.host</arg><!-- 15 --> + <arg>$jboss.container.port</arg><!-- 16 --> + <arg>$jboss.container.jdbc.module</arg><!-- 17 --> + <arg>$jboss.container.user</arg><!-- 18 --> + <arg>$jboss.container.pwd</arg><!-- 19 --> </executeclass> </job> <onFail previous="true" next="false" /> Modified: syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_eng URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_eng?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_eng (original) +++ syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_eng Tue Aug 5 11:01:10 2014 @@ -23,6 +23,7 @@ under the License. <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="mvn.syncope.version.id" txt="Syncope Version:"/> Modified: syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_ita URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_ita?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_ita (original) +++ syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputLang.xml_ita Tue Aug 5 11:01:10 2014 @@ -23,6 +23,7 @@ under the License. <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="mvn.syncope.version.id" txt="Syncope Version:"/> Modified: syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputSpec.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputSpec.xml?rev=1615906&r1=1615905&r2=1615906&view=diff ============================================================================== --- syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputSpec.xml (original) +++ syncope/branches/1_2_X/installer/src/main/resources/izpack/userInputSpec.xml Tue Aug 5 11:01:10 2014 @@ -44,6 +44,10 @@ under the License. <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=""/> + </field> + <field type="space"/> <field type="dir" variable="mvn.log.directory"> <spec id="archetype.mvn.log.directory" size="20" set=""/> </field>