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/04/24 13:51:58 UTC
[sling-org-apache-sling-feature-cpconverter] 06/15: create the
featureModelsOutputDirectory if does not exists already
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit 606ed63e9a9e0d10faf873f7730170dc3a8c3297
Author: stripodi <st...@192.168.1.111>
AuthorDate: Thu Apr 11 18:01:59 2019 +0200
create the featureModelsOutputDirectory if does not exists already
---
.../sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java b/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
index e0e1c32..e67b04f 100644
--- a/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
+++ b/src/main/java/org/apache/sling/feature/cpconverter/ContentPackage2FeatureModelConverter.java
@@ -179,6 +179,8 @@ public class ContentPackage2FeatureModelConverter {
if (featureModelsOutputDirectory == null) {
throw new IllegalStateException("Null models output directory not supported, it must be set before invoking the convert(File) method.");
+ } else if (!featureModelsOutputDirectory.exists()) {
+ featureModelsOutputDirectory.mkdirs();
}
Iterator<BundlesDeployer> artifactDeployerLoader = ServiceLoader.load(BundlesDeployer.class).iterator();