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/11/10 15:41:27 UTC
[1/2] syncope git commit: [SYNCOPE-158] Simplifying CLI pom and
fixing checkstyle and compiler errors / warnings
Repository: syncope
Updated Branches:
refs/heads/master 6bf6ca6b4 -> e5c98b4c9
[SYNCOPE-158] Simplifying CLI pom and fixing checkstyle and compiler errors / warnings
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/68def956
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/68def956
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/68def956
Branch: refs/heads/master
Commit: 68def9562234028835a3bea7384c9c94de29ad62
Parents: 6bf6ca6
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Nov 10 15:40:03 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Nov 10 15:40:03 2015 +0100
----------------------------------------------------------------------
client/cli/pom.xml | 80 +---------
client/cli/src/assemble/cli-zip.xml | 29 +++-
.../syncope/client/cli/CommandClassScanner.java | 3 +-
.../client/cli/ComponentClassScanner.java | 8 +-
.../cli/commands/CommonsResultManager.java | 9 +-
.../ConfigurationResultManager.java | 7 +-
.../cli/commands/install/InstallSetup.java | 147 +++++++++----------
.../commands/logger/LoggerResultManager.java | 9 +-
.../commands/schema/SchemaResultManager.java | 18 +--
.../apache/syncope/client/cli/view/Table.java | 2 +-
.../src/main/resources/configuration.properties | 4 +-
client/cli/src/main/resources/log4j2.xml | 18 +--
.../cli/src/main/resources/messages.properties | 2 +-
client/cli/src/main/resources/syncopeadm.bat | 12 +-
client/cli/src/main/resources/syncopeadm.sh | 10 +-
pom.xml | 13 +-
standalone/pom.xml | 2 +-
17 files changed, 169 insertions(+), 204 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/pom.xml
----------------------------------------------------------------------
diff --git a/client/cli/pom.xml b/client/cli/pom.xml
index d63f679..447d7f7 100644
--- a/client/cli/pom.xml
+++ b/client/cli/pom.xml
@@ -37,8 +37,6 @@ under the License.
<properties>
<rootpom.basedir>${basedir}/../..</rootpom.basedir>
-
- <work.dir>${project.build.directory}/cli</work.dir>
</properties>
<dependencies>
@@ -111,78 +109,9 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- <transformers>
- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <manifestEntries>
- <Main-Class>org.apache.syncope.client.cli.SyncopeAdm</Main-Class>
- </manifestEntries>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/spring.handlers</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/spring.schemas</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
- <resource>META-INF/cxf/bus-extensions.txt</resource>
- </transformer>
- <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
- <resource>META-INF/wsdl.plugin.xml</resource>
- </transformer>
- </transformers>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <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>
+ <appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assemble/cli-zip.xml</descriptor>
</descriptors>
@@ -197,6 +126,11 @@ under the License.
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
</plugins>
<resources>
@@ -206,7 +140,7 @@ under the License.
</resource>
<resource>
- <directory>../..</directory>
+ <directory>${basedir}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE</include>
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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
index be2a254..f88a447 100644
--- a/client/cli/src/assemble/cli-zip.xml
+++ b/client/cli/src/assemble/cli-zip.xml
@@ -23,14 +23,39 @@ under the License.
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>
+ <directory>${basedir}</directory>
+ <includes>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ </includes>
+ <outputDirectory>${project.build.finalName}</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/classes</directory>
+ <includes>
+ <include>syncopeadm.sh</include>
+ <include>syncopeadm.bat</include>
+ </includes>
<outputDirectory>${project.build.finalName}</outputDirectory>
</fileSet>
</fileSets>
-</assembly>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>${project.build.finalName}/lib</outputDirectory>
+ <useProjectArtifact>true</useProjectArtifact>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/CommandClassScanner.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/CommandClassScanner.java b/client/cli/src/main/java/org/apache/syncope/client/cli/CommandClassScanner.java
index e19f024..5b866af 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/CommandClassScanner.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/CommandClassScanner.java
@@ -18,9 +18,10 @@
*/
package org.apache.syncope.client.cli;
+import org.apache.syncope.client.cli.commands.AbstractCommand;
import org.springframework.core.type.filter.AnnotationTypeFilter;
-public class CommandClassScanner extends ComponentClassScanner {
+public class CommandClassScanner extends ComponentClassScanner<AbstractCommand> {
public CommandClassScanner() {
super();
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/ComponentClassScanner.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/ComponentClassScanner.java b/client/cli/src/main/java/org/apache/syncope/client/cli/ComponentClassScanner.java
index c344596..3081304 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/ComponentClassScanner.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/ComponentClassScanner.java
@@ -30,14 +30,14 @@ public abstract class ComponentClassScanner<T> extends ClassPathScanningCandidat
super(false);
}
- @SuppressWarnings("unchecked")
public final List<Class<? extends T>> getComponentClasses() throws IllegalArgumentException {
final String basePackage = "org.apache.syncope.client.cli.commands";
List<Class<? extends T>> classes = new ArrayList<>();
for (final BeanDefinition candidate : findCandidateComponents(basePackage)) {
- final Class cls = ClassUtils.
- resolveClassName(candidate.getBeanClassName(), ClassUtils.getDefaultClassLoader());
- classes.add((Class) cls);
+ @SuppressWarnings("unchecked")
+ final Class<? extends T> cls = (Class<? extends T>) ClassUtils.resolveClassName(
+ candidate.getBeanClassName(), ClassUtils.getDefaultClassLoader());
+ classes.add(cls);
}
return classes;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
index c3f553a..711b284 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java
@@ -70,8 +70,8 @@ public abstract class CommonsResultManager {
Messages.printMessage("Error: " + error);
}
- public String commandHelpMessage(final Class name) {
- return Messages.commandHelpMessage(((Command) name.getAnnotation(Command.class)).name());
+ public String commandHelpMessage(final Class<?> name) {
+ return Messages.commandHelpMessage(name.getAnnotation(Command.class).name());
}
protected void printConfiguration(final Set<ConnConfProperty> configurationPropertys) {
@@ -91,10 +91,9 @@ public abstract class CommonsResultManager {
}
protected void printDetails(final String title, final Map<String, String> details) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder(title).header("detail").header("value");
+ final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("detail").header("value");
for (final Map.Entry<String, String> entrySet : details.entrySet()) {
- tableBuilder.rowValues(new LinkedList(Arrays.asList(entrySet.getKey(), entrySet.getValue())));
+ tableBuilder.rowValues(new LinkedList<>(Arrays.asList(entrySet.getKey(), entrySet.getValue())));
}
tableBuilder.build().print();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
index e4073c0..b5a504f 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java
@@ -33,20 +33,19 @@ public class ConfigurationResultManager extends CommonsResultManager {
public void fromRead(final LinkedList<AttrTO> attrTOs) {
fromCommandToView("selected configuration attributes", attrTOs);
}
-
+
public void fromUpdate(final LinkedList<AttrTO> attrTOs) {
fromCommandToView("updated configuration attributes", attrTOs);
}
private void fromCommandToView(final String title, final LinkedList<AttrTO> attrTOs) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder(title).header("attribute").header("value");
+ final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("attribute").header("value");
for (final AttrTO attrTO : attrTOs) {
String attrValue = attrTO.getValues().toString();
attrValue = attrValue.substring(0, attrValue.length() - 1);
attrValue = attrValue.substring(1, attrValue.length());
tableBuilder.rowValues(
- new LinkedList(Arrays.asList(attrTO.getSchema(), attrValue)));
+ new LinkedList<>(Arrays.asList(attrTO.getSchema(), attrValue)));
}
tableBuilder.build().print();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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 716f60f..feef937 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
@@ -64,93 +64,92 @@ public class InstallSetup {
System.out.println("- File system permission checked");
System.out.println("");
- final Scanner scanIn = new Scanner(System.in);
- System.out.println("Syncope server schema [http/https]:");
- String syncopeServerSchemaFromSystemIn = scanIn.nextLine();
- boolean schemaFounded = false;
- while (!schemaFounded) {
- if (("http".equalsIgnoreCase(syncopeServerSchemaFromSystemIn))
- || ("https".equalsIgnoreCase(syncopeServerSchemaFromSystemIn))) {
- syncopeServerSchema = syncopeServerSchemaFromSystemIn;
- schemaFounded = true;
- } else {
- System.out.println("Please use one of below values:");
- System.out.println(" - http");
- System.out.println(" - https");
- syncopeServerSchemaFromSystemIn = scanIn.nextLine();
+ try (Scanner scanIn = new Scanner(System.in)) {
+ System.out.print("Syncope server schema [http/https]: ");
+ String syncopeServerSchemaFromSystemIn = scanIn.nextLine();
+ boolean schemaFound = false;
+ while (!schemaFound) {
+ if (("http".equalsIgnoreCase(syncopeServerSchemaFromSystemIn))
+ || ("https".equalsIgnoreCase(syncopeServerSchemaFromSystemIn))) {
+ syncopeServerSchema = syncopeServerSchemaFromSystemIn;
+ schemaFound = true;
+ } else {
+ System.out.println("Please use one of below values: ");
+ System.out.println(" - http");
+ System.out.println(" - https");
+ syncopeServerSchemaFromSystemIn = scanIn.nextLine();
+ }
}
- }
- System.out.println("Syncope server hostname [e.g. " + syncopeServerHostname + "]:");
- String syncopeServerHostnameFromSystemIn = scanIn.nextLine();
- boolean syncopeServerHostnameFounded = false;
- while (!syncopeServerHostnameFounded) {
- if (StringUtils.isNotBlank(syncopeServerHostnameFromSystemIn)) {
- syncopeServerHostname = syncopeServerHostnameFromSystemIn;
- syncopeServerHostnameFounded = true;
- } else {
- System.out.println("Syncope server hostname [e.g. " + syncopeServerHostname + "]:");
- syncopeServerHostnameFromSystemIn = scanIn.nextLine();
+ System.out.print("Syncope server hostname [e.g. " + syncopeServerHostname + "]: ");
+ String syncopeServerHostnameFromSystemIn = scanIn.nextLine();
+ boolean syncopeServerHostnameFound = false;
+ while (!syncopeServerHostnameFound) {
+ if (StringUtils.isNotBlank(syncopeServerHostnameFromSystemIn)) {
+ syncopeServerHostname = syncopeServerHostnameFromSystemIn;
+ syncopeServerHostnameFound = true;
+ } else {
+ System.out.print("Syncope server hostname [e.g. " + syncopeServerHostname + "]: ");
+ syncopeServerHostnameFromSystemIn = scanIn.nextLine();
+ }
}
- }
- System.out.println("Syncope server port [e.g. " + syncopeServerPort + "]:");
- String syncopeServerPortFromSystemIn = scanIn.nextLine();
- boolean syncopeServerPortFounded = false;
- while (!syncopeServerPortFounded) {
- if (StringUtils.isNotBlank(syncopeServerPortFromSystemIn)) {
- syncopeServerPort = syncopeServerPortFromSystemIn;
- syncopeServerPortFounded = true;
- } else if (!StringUtils.isNumeric(syncopeServerPortFromSystemIn)) {
- System.out.println(syncopeServerPortFromSystemIn + " is not a numeric string, try again");
- syncopeServerPortFromSystemIn = scanIn.nextLine();
- } else {
- System.out.println("Syncope server port [e.g. " + syncopeServerPort + "]:");
- syncopeServerPortFromSystemIn = scanIn.nextLine();
+ System.out.print("Syncope server port [e.g. " + syncopeServerPort + "]: ");
+ String syncopeServerPortFromSystemIn = scanIn.nextLine();
+ boolean syncopeServerPortFound = false;
+ while (!syncopeServerPortFound) {
+ if (StringUtils.isNotBlank(syncopeServerPortFromSystemIn)) {
+ syncopeServerPort = syncopeServerPortFromSystemIn;
+ syncopeServerPortFound = true;
+ } else if (!StringUtils.isNumeric(syncopeServerPortFromSystemIn)) {
+ System.err.println(syncopeServerPortFromSystemIn + " is not a numeric string, try again");
+ syncopeServerPortFromSystemIn = scanIn.nextLine();
+ } else {
+ System.out.print("Syncope server port [e.g. " + syncopeServerPort + "]: ");
+ syncopeServerPortFromSystemIn = scanIn.nextLine();
+ }
}
- }
- System.out.println("Syncope server rest context [e.g. " + syncopeServerRestContext + "]:");
- String syncopeServerRestContextFromSystemIn = scanIn.nextLine();
- boolean syncopeServerRestContextFounded = false;
- while (!syncopeServerRestContextFounded) {
- if (StringUtils.isNotBlank(syncopeServerRestContextFromSystemIn)) {
- syncopeServerRestContext = syncopeServerRestContextFromSystemIn;
- syncopeServerRestContextFounded = true;
- } else {
- System.out.println("Syncope server port [e.g. " + syncopeServerRestContext + "]:");
- syncopeServerRestContextFromSystemIn = scanIn.nextLine();
+ System.out.print("Syncope server rest context [e.g. " + syncopeServerRestContext + "]: ");
+ String syncopeServerRestContextFromSystemIn = scanIn.nextLine();
+ boolean syncopeServerRestContextFound = false;
+ while (!syncopeServerRestContextFound) {
+ if (StringUtils.isNotBlank(syncopeServerRestContextFromSystemIn)) {
+ syncopeServerRestContext = syncopeServerRestContextFromSystemIn;
+ syncopeServerRestContextFound = true;
+ } else {
+ System.out.print("Syncope server port [e.g. " + syncopeServerRestContext + "]: ");
+ syncopeServerRestContextFromSystemIn = scanIn.nextLine();
+ }
}
- }
- System.out.println("Syncope admin user:");
- String syncopeAdminUserFromSystemIn = scanIn.nextLine();
- boolean syncopeAdminUserFounded = false;
- while (!syncopeAdminUserFounded) {
- if (StringUtils.isNotBlank(syncopeAdminUserFromSystemIn)) {
- syncopeAdminUser = syncopeAdminUserFromSystemIn;
- syncopeAdminUserFounded = true;
- } else {
- System.out.println("Syncope admin user:");
- syncopeAdminUserFromSystemIn = scanIn.nextLine();
+ System.out.print("Syncope admin user: ");
+ String syncopeAdminUserFromSystemIn = scanIn.nextLine();
+ boolean syncopeAdminUserFound = false;
+ while (!syncopeAdminUserFound) {
+ if (StringUtils.isNotBlank(syncopeAdminUserFromSystemIn)) {
+ syncopeAdminUser = syncopeAdminUserFromSystemIn;
+ syncopeAdminUserFound = true;
+ } else {
+ System.out.print("Syncope admin user: ");
+ syncopeAdminUserFromSystemIn = scanIn.nextLine();
+ }
}
- }
- System.out.println("Syncope admin password:");
- String syncopeAdminPasswordFromSystemIn = scanIn.nextLine();
- boolean syncopeAdminPasswordFounded = false;
- while (!syncopeAdminPasswordFounded) {
- if (StringUtils.isNotBlank(syncopeAdminPasswordFromSystemIn)) {
- syncopeAdminPassword = syncopeAdminPasswordFromSystemIn;
- syncopeAdminPasswordFounded = true;
- } else {
- System.out.println("Syncope admin user:");
- syncopeAdminPasswordFromSystemIn = scanIn.nextLine();
+ System.out.print("Syncope admin password: ");
+ String syncopeAdminPasswordFromSystemIn = scanIn.nextLine();
+ boolean syncopeAdminPasswordFound = false;
+ while (!syncopeAdminPasswordFound) {
+ if (StringUtils.isNotBlank(syncopeAdminPasswordFromSystemIn)) {
+ syncopeAdminPassword = syncopeAdminPasswordFromSystemIn;
+ syncopeAdminPasswordFound = true;
+ } else {
+ System.out.print("Syncope admin user: ");
+ syncopeAdminPasswordFromSystemIn = scanIn.nextLine();
+ }
}
}
- scanIn.close();
-
final JasyptUtils jasyptUtils = JasyptUtils.getJasyptUtils();
try {
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
index d78f5db..baca859 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java
@@ -47,14 +47,15 @@ public class LoggerResultManager extends CommonsResultManager {
fromCommandToView("deleted loggers", "new level", loggerTOs);
}
- private void fromCommandToView(final String title,
+ private void fromCommandToView(
+ final String title,
final String secondHeader,
final LinkedList<LoggerTO> loggerTOs) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder(title).header("logger").header(secondHeader);
+
+ final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("logger").header(secondHeader);
for (final LoggerTO loggerTO : loggerTOs) {
tableBuilder.rowValues(
- new LinkedList(Arrays.asList(loggerTO.getKey(), loggerTO.getLevel().getLevel().name())));
+ new LinkedList<>(Arrays.asList(loggerTO.getKey(), loggerTO.getLevel().getLevel().name())));
}
tableBuilder.build().print();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
index 7dbdfd8..5273cc9 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaResultManager.java
@@ -68,10 +68,10 @@ public class SchemaResultManager extends CommonsResultManager {
}
public void printPlainSchemas(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder("plain schemas").header("schema key").header("type").header("mandatory");
+ final Table.TableBuilder tableBuilder =
+ new Table.TableBuilder("plain schemas").header("schema key").header("type").header("mandatory");
for (final AbstractSchemaTO schemaTO : schemaTOs) {
- tableBuilder.rowValues(new LinkedList(Arrays.asList(
+ tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
((PlainSchemaTO) schemaTO).getKey(),
((PlainSchemaTO) schemaTO).getType().toString(),
((PlainSchemaTO) schemaTO).getMandatoryCondition())));
@@ -80,10 +80,10 @@ public class SchemaResultManager extends CommonsResultManager {
}
public void fromListDerived(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder("derived schemas").header("schema key").header("expression");
+ final Table.TableBuilder tableBuilder =
+ new Table.TableBuilder("derived schemas").header("schema key").header("expression");
for (final AbstractSchemaTO schemaTO : schemaTOs) {
- tableBuilder.rowValues(new LinkedList(Arrays.asList(
+ tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
((DerSchemaTO) schemaTO).getKey(),
((DerSchemaTO) schemaTO).getExpression())));
}
@@ -91,10 +91,10 @@ public class SchemaResultManager extends CommonsResultManager {
}
public void fromListVirtual(final LinkedList<? extends AbstractSchemaTO> schemaTOs) {
- final Table.TableBuilder tableBuilder
- = new Table.TableBuilder("virtual schemas").header("schema key").header("readonly");
+ final Table.TableBuilder tableBuilder =
+ new Table.TableBuilder("virtual schemas").header("schema key").header("readonly");
for (final AbstractSchemaTO schemaTO : schemaTOs) {
- tableBuilder.rowValues(new LinkedList(Arrays.asList(
+ tableBuilder.rowValues(new LinkedList<>(Arrays.asList(
((VirSchemaTO) schemaTO).getKey(),
String.valueOf(((VirSchemaTO) schemaTO).isReadonly()))));
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
index 3c872fc..d563f98 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/view/Table.java
@@ -35,7 +35,7 @@ public final class Table {
private int columnsNumber;
- private String[] tmpValuesArray;
+ private Object[] tmpValuesArray;
private String tableContentFormat;
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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 bfee69c..76b93fa 100644
--- a/client/cli/src/main/resources/configuration.properties
+++ b/client/cli/src/main/resources/configuration.properties
@@ -14,8 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#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
+cli.installation.filename=cli.properties
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/client/cli/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/client/cli/src/main/resources/log4j2.xml b/client/cli/src/main/resources/log4j2.xml
index 8be006f..1a94ac3 100644
--- a/client/cli/src/main/resources/log4j2.xml
+++ b/client/cli/src/main/resources/log4j2.xml
@@ -48,27 +48,27 @@ under the License.
</appenders>
<loggers>
-
+
<asyncLogger name="org.apache.cxf" additivity="false" level="DEBUG">
<appender-ref ref="lib"/>
</asyncLogger>
-
+
<asyncLogger name="org.apache.http" additivity="false" level="ERROR">
<appender-ref ref="lib"/>
</asyncLogger>
-
+
<asyncLogger name="org.springframework" additivity="false" level="ERROR">
<appender-ref ref="lib"/>
</asyncLogger>
-
+
<asyncLogger name="org.apache.syncope.client.cli" additivity="false" level="DEBUG">
<appender-ref ref="cli"/>
</asyncLogger>
-
+
<asyncLogger name="org.apache.syncope.client" additivity="false" level="ERROR">
<appender-ref ref="lib"/>
</asyncLogger>
-
+
<asyncLogger name="org.apache.syncope.common" additivity="false" level="ERROR">
<appender-ref ref="lib"/>
</asyncLogger>
@@ -76,7 +76,7 @@ under the License.
<root level="DEBUG">
<appender-ref ref="cli"/>
</root>
-
+
</loggers>
-
-</configuration>
\ No newline at end of file
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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 82bca55..2497301 100644
--- a/client/cli/src/main/resources/messages.properties
+++ b/client/cli/src/main/resources/messages.properties
@@ -31,4 +31,4 @@ role.help.message=\nUsage: role [options]\n Options:\n --help \n --detail
schema.help.message=\nUsage: schema [options]\n Options:\n --help \n --details \n --list-all\n --list-plain\n --list-derived\n --list-virtual\n --read {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n --delete {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n
task.help.message=\nUsage: task [options]\n Options:\n --help \n --details\n --list\n Syntax: --list {TASK-TYPE} \n Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION\n --list-running-jobs \n --list-scheduled-jobs \n --read \n Syntax: --read {TASK-ID} {TASK-ID} [...]\n --read-execution \n Syntax: --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n --delete \n Syntax: --delete {TASK-ID} {TASK-ID} [...]\n --delete-execution \n Syntax: --delete-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n --execute \n Syntax: --execute {TASK-ID} {DRY-RUN}\n Dry run: true / false\n
user.help.message=\nUsage: user [options]\n Options:\n --help \n --list \n --details \n --get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n --get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n --read \n Syntax: --read {USER-ID} {USER-ID} [...]\n --search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n --search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n --search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n --delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n
-workflow.help.message=\nUsage: workflow [options]\n Options:\n --help \n --export-diagram {ANY-TYPE-KIND}\n Any type kind: ANY_OBJECT / USER / GROUP\n --export-definition {ANY-TYPE-KIND}\n Any type kind: ANY_OBJECT / USER / GROUP\n
\ No newline at end of file
+workflow.help.message=\nUsage: workflow [options]\n Options:\n --help \n --export-diagram {ANY-TYPE-KIND}\n Any type kind: ANY_OBJECT / USER / GROUP\n --export-definition {ANY-TYPE-KIND}\n Any type kind: ANY_OBJECT / USER / GROUP\n
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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
index 98dfbaa..5236147 100644
--- a/client/cli/src/main/resources/syncopeadm.bat
+++ b/client/cli/src/main/resources/syncopeadm.bat
@@ -1,3 +1,5 @@
+@ECHO OFF
+
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
@@ -15,5 +17,11 @@ 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
+setLocal EnableDelayedExpansion
+set CLASSPATH="
+for /R ./lib %%a in (*.jar) do (
+ set CLASSPATH=!CLASSPATH!;%%a
+)
+set CLASSPATH=!CLASSPATH!"
+
+java -Xms256m -Xmx512m -classpath !CLASSPATH! org.apache.syncope.client.cli.SyncopeAdm %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/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
index 4889a25..d83e963 100755
--- a/client/cli/src/main/resources/syncopeadm.sh
+++ b/client/cli/src/main/resources/syncopeadm.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
# 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
@@ -14,6 +16,8 @@
# 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
+
+LIB=`ls lib`
+CLASSPATH=lib/`echo $LIB | sed "s/jar /jar:lib\//g"`
+
+java -Xms256m -Xmx512m -classpath "$CLASSPATH" org.apache.syncope.client.cli.SyncopeAdm "$@"
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 5be90c7..0891b23 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1187,7 +1187,7 @@ under the License.
<useIncrementalCompilation>false</useIncrementalCompilation>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
- <!--<compilerArgument>-Xlint:unchecked</compilerArgument>-->
+ <compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
@@ -1358,13 +1358,7 @@ under the License.
<artifactId>jdeb</artifactId>
<version>1.4</version>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>2.4.2</version>
- </plugin>
-
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -1404,6 +1398,9 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <resourceExcludes>**/LICENSE,**/NOTICE</resourceExcludes>
+ </configuration>
<executions>
<execution>
<id>checkstyle-check</id>
http://git-wip-us.apache.org/repos/asf/syncope/blob/68def956/standalone/pom.xml
----------------------------------------------------------------------
diff --git a/standalone/pom.xml b/standalone/pom.xml
index def2d20..2c9fad0 100644
--- a/standalone/pom.xml
+++ b/standalone/pom.xml
@@ -208,7 +208,7 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <resourceIncludes>src/main/resources/**/*.properties</resourceIncludes>
+ <resourceIncludes>src/main/resources/**/*.*</resourceIncludes>
</configuration>
</plugin>
</plugins>
[2/2] syncope git commit: Upgrading izpack
Posted by il...@apache.org.
Upgrading izpack
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e5c98b4c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e5c98b4c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e5c98b4c
Branch: refs/heads/master
Commit: e5c98b4c928178f5420c1c2f978504d3412b2a17
Parents: 68def95
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Nov 10 15:40:24 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Nov 10 15:40:24 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/e5c98b4c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0891b23..b23c1c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -403,7 +403,7 @@ under the License.
<select2.version>3.4.8</select2.version>
<FileSaver.version>0.0.2</FileSaver.version>
- <izpack.version>5.0.5</izpack.version>
+ <izpack.version>5.0.6</izpack.version>
<httpclient.version>4.3.6</httpclient.version>
<maven-invoker.version>2.1.1</maven-invoker.version>