Repository: syncope Updated Branches: refs/heads/master 03b341e11 -> a61f60363
Fixed SYNCOPE-723, tested on Windows environment, added zip plugin, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a61f6036 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a61f6036 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a61f6036 Branch: refs/heads/master Commit: a61f603634eb10a131b03b18696487f05ee199f3 Parents: 474e732 Author: massi <[email protected]> Authored: Fri Nov 6 17:57:11 2015 +0100 Committer: massi <[email protected]> Committed: Fri Nov 6 17:57:22 2015 +0100 ---------------------------------------------------------------------- client/cli/pom.xml | 70 +++++++++++++++++++- client/cli/src/assemble/cli-zip.xml | 36 ++++++++++ .../apache/syncope/client/cli/ArgsManager.java | 2 +- .../org/apache/syncope/client/cli/Input.java | 14 ++++ .../apache/syncope/client/cli/SyncopeAdm.java | 2 + .../syncope/client/cli/SyncopeServices.java | 2 +- .../client/cli/commands/info/InfoCommand.java | 3 +- .../install/InstallConfigFileTemplate.java | 34 ++++++++-- .../commands/install/InstallResultManager.java | 2 + .../cli/commands/install/InstallSetup.java | 24 +++---- .../client/cli/util/FileSystemUtils.java | 39 +++++++++++ .../syncope/client/cli/view/Messages.java | 2 +- .../src/main/resources/configuration.properties | 7 +- .../cli/src/main/resources/messages.properties | 16 +++++ client/cli/src/main/resources/syncopeadm.bat | 19 ++++++ client/cli/src/main/resources/syncopeadm.sh | 19 ++++++ 16 files changed, 259 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/pom.xml ---------------------------------------------------------------------- diff --git a/client/cli/pom.xml b/client/cli/pom.xml index 7872ca6..d63f679 100644 --- a/client/cli/pom.xml +++ b/client/cli/pom.xml @@ -37,6 +37,8 @@ under the License. <properties> <rootpom.basedir>${basedir}/../..</rootpom.basedir> + + <work.dir>${project.build.directory}/cli</work.dir> </properties> <dependencies> @@ -150,6 +152,51 @@ under the License. <resourceIncludes>src/main/resources/**/*.properties</resourceIncludes> </configuration> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>prepare-cli</id> + <goals> + <goal>run</goal> + </goals> + <phase>verify</phase> + <configuration> + <target> + <mkdir dir="${work.dir}" /> + + <copy file="LICENSE" todir="${work.dir}" /> + <copy file="NOTICE" todir="${work.dir}" /> + + <copy file="target/syncope-client-cli-${project.version}.jar" todir="${work.dir}" /> + <copy file="target/classes/syncopeadm.bat" todir="${work.dir}" /> + <copy file="target/classes/syncopeadm.sh" todir="${work.dir}" /> + </target> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assemble/cli-zip.xml</descriptor> + </descriptors> + </configuration> + <executions> + <execution> + <id>make-cli-zip</id> + <phase>verify</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> <resources> @@ -173,16 +220,33 @@ under the License. <profiles> <profile> <id>apache-release</id> - + <build> - <plugins> + <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <configuration> <skip>true</skip> </configuration> - </plugin> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>doc</id> + + <build> + <plugins> + <plugin> + <groupId>org.asciidoctor</groupId> + <artifactId>asciidoctor-maven-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <skip>true</skip> + </configuration> + </plugin> </plugins> </build> </profile> http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/assemble/cli-zip.xml ---------------------------------------------------------------------- diff --git a/client/cli/src/assemble/cli-zip.xml b/client/cli/src/assemble/cli-zip.xml new file mode 100644 index 0000000..be2a254 --- /dev/null +++ b/client/cli/src/assemble/cli-zip.xml @@ -0,0 +1,36 @@ +<?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. +--> +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 + http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + + <id>cli</id> + <formats> + <format>zip</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <directory>${work.dir}</directory> + <outputDirectory>${project.build.finalName}</outputDirectory> + </fileSet> + </fileSets> +</assembly> http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java index 926b4dd..3ec222a 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java @@ -27,7 +27,7 @@ public final class ArgsManager { if (args.length == 0) { throw new IllegalArgumentException("Syntax error: no options"); } else if (!"install".equalsIgnoreCase(args[0])) { - final File configFile = new File(InstallConfigFileTemplate.FILE_PATH); + final File configFile = new File(InstallConfigFileTemplate.configurationFilePath()); if (!configFile.exists()) { throw new IllegalArgumentException( "It seems you need to setup the CLI client before. Run install --setup."); http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java index 7b417ea..a5f4fe5 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java @@ -18,6 +18,7 @@ */ package org.apache.syncope.client.cli; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.syncope.client.cli.commands.AbstractCommand; @@ -31,19 +32,24 @@ public class Input { private final String[] parameters; + private final List<String> commandFields = new ArrayList<>(); + public Input(final String[] args) throws InstantiationException, IllegalAccessException, IllegalArgumentException { command = CommandUtils.fromArgs(args[0]); + commandFields.add(args[0]); if (args.length > 1) { option = args[1]; + commandFields.add(args[1]); } if (args.length > 2) { parameters = new String[args.length - 2]; for (int i = 0; i < parameters.length; i++) { parameters[i] = args[i + 2]; + commandFields.add(args[i + 2]); } } else { parameters = new String[0]; @@ -98,6 +104,14 @@ public class Input { return new PairParameter(pairParameterArray[0], pairParameterArray[1]); } + public String printCommandFields() { + final StringBuilder commandBuilder = new StringBuilder(); + for (String commandField : commandFields) { + commandBuilder.append(commandField).append(" "); + } + return commandBuilder.toString(); + } + public class PairParameter { private final String key; http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index 7f09c68..5c7ef20 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -45,6 +45,8 @@ public final class SyncopeAdm { LOG.debug(" > " + parameter); } + System.out.println(""); + System.out.println("You are runnig: " + input.printCommandFields()); command.execute(input); } catch (final IllegalAccessException | InstantiationException e) { System.out.println(helpMessage()); http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java index 0fc5b33..5cfcefa 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java @@ -37,7 +37,7 @@ public final class SyncopeServices { public static <T> T get(final Class<T> claz) { final Properties properties = new Properties(); try { - properties.load(new FileInputStream(InstallConfigFileTemplate.FILE_PATH)); + properties.load(new FileInputStream(InstallConfigFileTemplate.configurationFilePath())); } catch (final IOException e) { LOG.error("Error opening properties file", e); } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java index a5c7cd8..b2882d3 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java @@ -29,10 +29,9 @@ import org.apache.syncope.client.cli.util.CommandUtils; @Command(name = "info") public class InfoCommand extends AbstractCommand { - private final Info info = new Info(); - @Override public void execute(final Input input) { + final Info info = new Info(); if (StringUtils.isBlank(input.getOption())) { input.setOption(Options.HELP.getOptionName()); } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallConfigFileTemplate.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallConfigFileTemplate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallConfigFileTemplate.java index 6ef5cc0..6da4e8e 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallConfigFileTemplate.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallConfigFileTemplate.java @@ -19,26 +19,22 @@ package org.apache.syncope.client.cli.commands.install; import java.util.ResourceBundle; +import org.apache.syncope.client.cli.util.FileSystemUtils; public final class InstallConfigFileTemplate { private static final ResourceBundle CONF = ResourceBundle.getBundle("configuration"); - public static final String DIR_PATH - = CONF.getString("cli.installation.directory"); - - public static final String FILE_NAME + public static final String CONFIGURATION_FILE_NAME = CONF.getString("cli.installation.filename"); - public static final String FILE_PATH = DIR_PATH + FILE_NAME; - private static final String SYNCOPE_REST_SERVICES = "syncope.rest.services=%s://%s:%s%s"; private static final String SYNCOPE_ADMIN_USER = "syncope.admin.user=%s"; private static final String SYNCOPE_ADMIN_PASSWORD = "syncope.admin.password=%s"; - public static String createFile( + public static String cliPropertiesFile( final String schema, final String hostname, final String port, @@ -52,6 +48,30 @@ public final class InstallConfigFileTemplate { return syncopeRestServices + "\n" + syncopeAdminUser + "\n" + syncopeAdminPassword; } + public static String dirPath() { + if (FileSystemUtils.isWindows()) { + return CONF.getString("cli.installation.directory.windows"); + } else { + return CONF.getString("cli.installation.directory.linux"); + } + } + + public static String configurationFilePath() { + return dirPath() + CONFIGURATION_FILE_NAME; + } + + private static String scriptFileName() { + if (FileSystemUtils.isWindows()) { + return CONF.getString("script.file.name.windows"); + } else { + return CONF.getString("script.file.name.linux"); + } + } + + public static String scriptFilePath() { + return dirPath() + scriptFileName(); + } + private InstallConfigFileTemplate() { } } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java index 39837bf..32b6cf2 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java @@ -95,6 +95,8 @@ public class InstallResultManager extends CommonsResultManager { System.out.println("# #"); System.out.println("###############################################"); System.out.println(""); + System.out.println(e.getMessage()); + System.out.println(""); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java index d14a3fd..716f60f 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java @@ -20,7 +20,6 @@ package org.apache.syncope.client.cli.commands.install; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.Scanner; import javax.ws.rs.ProcessingException; import org.apache.commons.lang3.StringUtils; @@ -53,14 +52,14 @@ public class InstallSetup { installResultManager.printWelcome(); System.out.println("Path to config files of Syncope CLI client will be: " - + InstallConfigFileTemplate.DIR_PATH); + + InstallConfigFileTemplate.dirPath()); - if (!FileSystemUtils.exists(InstallConfigFileTemplate.DIR_PATH)) { - throw new FileNotFoundException("Directory: " + InstallConfigFileTemplate.DIR_PATH + " does not exists!"); + if (!FileSystemUtils.exists(InstallConfigFileTemplate.dirPath())) { + throw new FileNotFoundException("Directory: " + InstallConfigFileTemplate.dirPath() + " does not exists!"); } - if (!FileSystemUtils.canWrite(InstallConfigFileTemplate.DIR_PATH)) { - throw new IllegalAccessException("Permission denied on " + InstallConfigFileTemplate.DIR_PATH); + if (!FileSystemUtils.canWrite(InstallConfigFileTemplate.dirPath())) { + throw new IllegalAccessException("Permission denied on " + InstallConfigFileTemplate.dirPath()); } System.out.println("- File system permission checked"); System.out.println(""); @@ -154,31 +153,26 @@ public class InstallSetup { final JasyptUtils jasyptUtils = JasyptUtils.getJasyptUtils(); try { - FileSystemUtils.createNewDirectory(InstallConfigFileTemplate.DIR_PATH); - final String contentCliPropertiesFile = InstallConfigFileTemplate.createFile( + + final String contentCliPropertiesFile = InstallConfigFileTemplate.cliPropertiesFile( syncopeServerSchema, syncopeServerHostname, syncopeServerPort, syncopeServerRestContext, syncopeAdminUser, jasyptUtils.encrypt(syncopeAdminPassword)); - FileSystemUtils.createFileWith(InstallConfigFileTemplate.FILE_PATH, contentCliPropertiesFile); - - } catch (final FileNotFoundException | UnsupportedEncodingException ex) { + FileSystemUtils.createFileWith(InstallConfigFileTemplate.configurationFilePath(), contentCliPropertiesFile); + } catch (final IOException ex) { System.out.println(ex.getMessage()); } try { final SyncopeService syncopeService = SyncopeServices.get(SyncopeService.class); final String syncopeVersion = syncopeService.info().getVersion(); - FileSystemUtils.createScriptFile(); installResultManager.installationSuccessful(syncopeVersion); } catch (final ProcessingException ex) { LOG.error("Error installing CLI", ex); installResultManager.manageProcessingException(ex); - } catch (final FileNotFoundException | UnsupportedEncodingException e) { - LOG.error("Error writing script file", e); - installResultManager.manageException(e); } catch (final Exception e) { LOG.error("Error installing CLI", e); installResultManager.manageException(e); http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java index aed3bd5..8fc779c 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java @@ -18,13 +18,25 @@ */ package org.apache.syncope.client.cli.util; +import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.attribute.PosixFilePermission; +import java.util.HashSet; +import java.util.ResourceBundle; +import java.util.Set; +import org.apache.syncope.client.cli.commands.install.InstallConfigFileTemplate; public final class FileSystemUtils { + private static final ResourceBundle CONF = ResourceBundle.getBundle("configuration"); + public static void createNewDirectory(final String directoryToCreate) { final File directory = new File(directoryToCreate); directory.mkdirs(); @@ -47,6 +59,33 @@ public final class FileSystemUtils { return installationDirectory.exists(); } + public static void createScriptFile() throws FileNotFoundException, UnsupportedEncodingException, IOException { + final File file = new File(InstallConfigFileTemplate.scriptFilePath()); + file.setExecutable(true); + file.setReadable(true); + file.setWritable(true); + file.createNewFile(); + final FileWriter fw = new FileWriter(file.getAbsoluteFile()); + final BufferedWriter bw = new BufferedWriter(fw); + if (isWindows()) { + bw.write(CONF.getString("script.file.windows")); + } else { + bw.write(CONF.getString("script.file.linux")); + final Set<PosixFilePermission> perms = new HashSet<>(); + perms.add(PosixFilePermission.OWNER_READ); + perms.add(PosixFilePermission.OWNER_WRITE); + perms.add(PosixFilePermission.OWNER_EXECUTE); + perms.add(PosixFilePermission.GROUP_READ); + perms.add(PosixFilePermission.OTHERS_READ); + Files.setPosixFilePermissions(Paths.get(file.getAbsolutePath()), perms); + } + bw.close(); + } + + public static boolean isWindows() { + return (System.getProperty("os.name").toLowerCase().contains("win")); + } + private FileSystemUtils() { } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/view/Messages.java ---------------------------------------------------------------------- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Messages.java b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Messages.java index c634f84..e6592e2 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Messages.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Messages.java @@ -97,7 +97,7 @@ public final class Messages { printMessage("Unnecessary parameter: " + parameters, "Usage: " + helpMessage); } - public static String commandHelpMessage(String name) { + public static String commandHelpMessage(final String name) { return MESSAGES.getString(name + ".help.message"); } http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/resources/configuration.properties ---------------------------------------------------------------------- diff --git a/client/cli/src/main/resources/configuration.properties b/client/cli/src/main/resources/configuration.properties index 245a781..bfee69c 100644 --- a/client/cli/src/main/resources/configuration.properties +++ b/client/cli/src/main/resources/configuration.properties @@ -14,5 +14,8 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -cli.installation.directory=/var/tmp/syncope/conf/ -cli.installation.filename=cli.properties +#cli.installation.directory.linux=/var/tmp/syncope/conf/ +#cli.installation.directory.windows=c:\\Windows\\syncope\\conf\\ +cli.installation.directory.linux=./ +cli.installation.directory.windows=.\\ +cli.installation.filename=cli.properties \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/resources/messages.properties ---------------------------------------------------------------------- diff --git a/client/cli/src/main/resources/messages.properties b/client/cli/src/main/resources/messages.properties index 9c3a38f..82bca55 100644 --- a/client/cli/src/main/resources/messages.properties +++ b/client/cli/src/main/resources/messages.properties @@ -1,3 +1,19 @@ +# 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. any.help.message=\nUsage: any [options]\n Options:\n --help \n --details \n --list \n --read \n Syntax: --read {ANY-ID} {ANY-ID} [...]\n --read-attr-by-schema-type {ANY-ID} {SCHEMA-TYPE}\n Schema type: PLAIN / DERIVED / VIRTUAL\n --read-attr-by-schema {ANY-ID} {SCHEMA-TYPE} {SCHEMA-NAME}\n Schema type: PLAIN / DERIVED / VIRTUAL\n --delete \n Syntax: --delete {ANY-ID} {ANY-ID} [...]\n configuration.help.message=\nUsage: configuration [options]\n Options:\n --help \n --get \n --read \n Syntax: --read {CONF-NAME} {CONF-NAME} [...] \n --update \n Syntax: --update {CONF-NAME}={CONF-VALUE} {CONF-NAME}={CONF-VALUE} [...]\n --delete \n Syntax: --delete {CONF-NAME} {CONF-NAME} [...]\n --export \n Syntax: --export {WHERE-DIR}\n connector.help.message=\nUsage: connector [options]\n Options:\n --help \n --details \n --list \n --list-bundles \n --list-configuration-properties\n Syntax: --list-configuration-properties {CONNECTOR-ID} {CONNECTOR-ID} [...]\n --read \n Syntax: --read {CONNECTOR-ID} {CONNECTOR-ID} [...]\n --delete \n Syntax: --delete {CONNECTOR-ID} {CONNECTOR-ID} [...]\n http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/resources/syncopeadm.bat ---------------------------------------------------------------------- diff --git a/client/cli/src/main/resources/syncopeadm.bat b/client/cli/src/main/resources/syncopeadm.bat new file mode 100644 index 0000000..98dfbaa --- /dev/null +++ b/client/cli/src/main/resources/syncopeadm.bat @@ -0,0 +1,19 @@ +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. + +@ECHO OFF +java -jar -Xms256m -Xmx512m syncope-client-cli-${project.version}.jar %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/resources/syncopeadm.sh ---------------------------------------------------------------------- diff --git a/client/cli/src/main/resources/syncopeadm.sh b/client/cli/src/main/resources/syncopeadm.sh new file mode 100755 index 0000000..4889a25 --- /dev/null +++ b/client/cli/src/main/resources/syncopeadm.sh @@ -0,0 +1,19 @@ +# 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. +#!/bin/bash +args=`echo $@` +java -jar -Xms256m -Xmx512m syncope-client-cli-${project.version}.jar $args \ No newline at end of file
