This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-slingstart-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 9ef5933  SLING-7689 Conversion feature model to provisioning model 
files should only consider .json files
9ef5933 is described below

commit 9ef5933fb466c9f4af641bee2f6fdf001d595136
Author: David Bosschaert <[email protected]>
AuthorDate: Tue May 29 14:53:06 2018 +0100

    SLING-7689 Conversion feature model to provisioning model files should only 
consider .json files
---
 pom.xml                                                                | 1 +
 .../java/org/apache/sling/maven/slingstart/FeatureModelConverter.java  | 3 +++
 src/{main => test}/resources/features1/simple.json                     | 0
 src/{main => test}/resources/features2/src/main/features/boot_gav.json | 0
 src/test/resources/features2/src/main/features/unrelated_file.txt      | 1 +
 5 files changed, 5 insertions(+)

diff --git a/pom.xml b/pom.xml
index a93dafd..3427b07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,6 +124,7 @@
                 <configuration>
                     <excludes>
                         <exclude>src/site/markdown/**</exclude>
+                        <exclude>src/test/resources/**</exclude>
                     </excludes>
                 </configuration>
             </plugin>
diff --git 
a/src/main/java/org/apache/sling/maven/slingstart/FeatureModelConverter.java 
b/src/main/java/org/apache/sling/maven/slingstart/FeatureModelConverter.java
index 0e84fec..84b65f7 100644
--- a/src/main/java/org/apache/sling/maven/slingstart/FeatureModelConverter.java
+++ b/src/main/java/org/apache/sling/maven/slingstart/FeatureModelConverter.java
@@ -64,6 +64,9 @@ public class FeatureModelConverter {
         try {
             ArtifactManager am = getArtifactManager(project, session);
             for (File f : files) {
+                if (!f.getName().endsWith(".json")) {
+                    continue;
+                }
                 File genFile = new File(targetDir, f.getName() + ".txt");
                 FeatureToProvisioning.convert(f, genFile, am);
             }
diff --git a/src/main/resources/features1/simple.json 
b/src/test/resources/features1/simple.json
similarity index 100%
rename from src/main/resources/features1/simple.json
rename to src/test/resources/features1/simple.json
diff --git a/src/main/resources/features2/src/main/features/boot_gav.json 
b/src/test/resources/features2/src/main/features/boot_gav.json
similarity index 100%
rename from src/main/resources/features2/src/main/features/boot_gav.json
rename to src/test/resources/features2/src/main/features/boot_gav.json
diff --git a/src/test/resources/features2/src/main/features/unrelated_file.txt 
b/src/test/resources/features2/src/main/features/unrelated_file.txt
new file mode 100644
index 0000000..848ca62
--- /dev/null
+++ b/src/test/resources/features2/src/main/features/unrelated_file.txt
@@ -0,0 +1 @@
+// Some other file
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to