You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/05/03 12:31:56 UTC
[sling-org-apache-sling-feature-cpconverter] 01/01: SLING-8390 -
Converter not handling serviceusers and acls spread across multiple
packages
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch multiple-packages-conversion
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit 6086ca06f5b160a94134e6bca3bca9ea66578db0
Author: stripodi <st...@simos-mbp>
AuthorDate: Fri May 3 14:31:42 2019 +0200
SLING-8390 - Converter not handling serviceusers and acls spread across
multiple packages
initiacl checkin
---
...ntentPackage2FeatureModelConverterLauncher.java | 23 ++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/sling/feature/cpconverter/cli/ContentPackage2FeatureModelConverterLauncher.java b/src/main/java/org/apache/sling/feature/cpconverter/cli/ContentPackage2FeatureModelConverterLauncher.java
index 46edf6f..29090c8 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/cli/ContentPackage2FeatureModelConverterLauncher.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/cli/ContentPackage2FeatureModelConverterLauncher.java
@@ -17,6 +17,7 @@
package org.apache.sling.feature.cpconverter.cli;
import java.io.File;
+import java.util.List;
import java.util.TimeZone;
import org.apache.sling.feature.cpconverter.ContentPackage2FeatureModelConverter;
@@ -26,6 +27,7 @@ import org.slf4j.LoggerFactory;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
+import picocli.CommandLine.Parameters;
@Command(
name = "cp2fm",
@@ -46,9 +48,6 @@ public final class ContentPackage2FeatureModelConverterLauncher implements Runna
@Option(names = { "-v", "--version" }, description = "Display version information.")
private boolean printVersion;
- @Option(names = { "-c", "--content-package" }, description = "The content-package input file.", required = true)
- private File contentPackage;
-
@Option(names = { "-s", "--strict-validation" }, description = "Flag to mark the content-package input file being strict validated.", required = false, defaultValue = "false")
private boolean strictValidation = false;
@@ -70,6 +69,9 @@ public final class ContentPackage2FeatureModelConverterLauncher implements Runna
@Option(names = { "-i", "--artifact-id" }, description = "The optional Artifact Id the Feature File will have, once generated; it will be derived, if not specified.", required = false)
private String artifactId;
+ @Parameters(arity = "1..*", paramLabel = "content-packages", description = "The content-package input file(s).")
+ private List<File> contentPackages;
+
@Override
public void run() {
if (quiet) {
@@ -112,7 +114,11 @@ public final class ContentPackage2FeatureModelConverterLauncher implements Runna
}
}
- converter.convert(contentPackage);
+ List<File> orderedContentPackages = order(contentPackages);
+
+ for (File contentPackage : orderedContentPackages) {
+ converter.convert(contentPackage);
+ }
logger.info( "+-----------------------------------------------------+" );
logger.info("{} SUCCESS", appName);
@@ -122,9 +128,9 @@ public final class ContentPackage2FeatureModelConverterLauncher implements Runna
logger.info( "+-----------------------------------------------------+" );
if (debug) {
- logger.error("Unable to convert content-package {}:", contentPackage, t);
+ logger.error("Unable to convert content-package {}:", contentPackages, t);
} else {
- logger.error("Unable to convert content-package {}: {}", contentPackage, t.getMessage());
+ logger.error("Unable to convert content-package {}: {}", contentPackages, t.getMessage());
}
logger.info( "" );
@@ -135,6 +141,11 @@ public final class ContentPackage2FeatureModelConverterLauncher implements Runna
logger.info( "+-----------------------------------------------------+" );
}
+ private List<File> order(List<File> contentPackages) {
+ // TODO
+ return null;
+ }
+
private static void printVersion(final Logger logger) {
logger.info("{} v{} (built on {})",
System.getProperty("project.artifactId"),