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
The following commit(s) were added to refs/heads/master by this push:
new 606ed63 create the featureModelsOutputDirectory if does not exists
already
606ed63 is described below
commit 606ed63e9a9e0d10faf873f7730170dc3a8c3297
Author: stripodi <[email protected]>
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();