sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [sling-scriptingbundle-maven-plugin] 04/17: Make the extends requirement filter out selectors.
Date Mon, 10 Dec 2018 12:01:09 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 03bf39a936ad2c2d2d3e03ea624c2684b5080af3
Author: Karl Pauls <pauls@apache.org>
AuthorDate: Mon Apr 16 15:56:15 2018 +0200

    Make the extends requirement filter out selectors.
---
 .../apache/sling/scripting/maven/plugin/ScriptingMavenPlugin.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/maven/plugin/ScriptingMavenPlugin.java
b/src/main/java/org/apache/sling/scripting/maven/plugin/ScriptingMavenPlugin.java
index 1a49bcb..283b660 100644
--- a/src/main/java/org/apache/sling/scripting/maven/plugin/ScriptingMavenPlugin.java
+++ b/src/main/java/org/apache/sling/scripting/maven/plugin/ScriptingMavenPlugin.java
@@ -91,7 +91,7 @@ public class ScriptingMavenPlugin extends AbstractMojo
                             String extend = input.readLine();
 
                             capability += ";extends=\"" + extend.split(";")[0].replace("\"",
"\\\"") + "\"";
-                            requires.add(extend);
+                            requires.add(extend + ";extends=true" );
                         }
                         catch (Exception ex)
                         {
@@ -141,6 +141,10 @@ public class ScriptingMavenPlugin extends AbstractMojo
                 VersionRange range = new VersionRange(parts[1].substring(parts[1].indexOf("=")
+ 1).replace("\"", "").trim());
                 filter = "(&" + filter + range.toFilterString("version") + ")";
             }
+            if (parts.length > 2)
+            {
+                filter = "(&" + filter + "(!(sling.resourceType.selectors=*)))";
+            }
             requirements.add("sling.resourceType;filter:=\"" + filter + "\"");
         }
 


Mime
View raw message