You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2020/11/23 13:35:24 UTC

[sling-feature-converter-maven-plugin] 14/37: Another attempt to fix the IT test failures by restricting the ITs to only run the root poms

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-feature-converter-maven-plugin.git

commit d7a7bac5b0b057d657fe189a035cb8e2459914e0
Author: Andreas Schaefer <sc...@iMac.local>
AuthorDate: Thu Jan 9 14:43:49 2020 -0800

    Another attempt to fix the IT test failures by restricting the ITs to only run the root poms
---
 pom.xml                                                          | 4 +---
 .../package-with-single-bundle-target-mode/fm.launcher/pom.xml   | 4 ++--
 src/it/package-with-single-bundle-target-mode/verify.bsh         | 8 +++++---
 .../package-with-single-bundle-with-parameters/ui.apps/pom.xml   | 4 ++--
 src/it/package-with-single-bundle-with-parameters/verify.bsh     | 9 +++++----
 5 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3163058..9a6e6eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,10 +124,8 @@
                     <debug>true</debug>
                     <projectsDirectory>src/it</projectsDirectory>
                     <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
-<!-- TODO: it would great to install the test artifacts locally but this will only work if CP Converter is released -> Activate when it is released-->
-<!--                    <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>-->
                     <pomIncludes>
-                        <pomInclude>**/pom.xml</pomInclude>
+                        <pomInclude>*/pom.xml</pomInclude>
                     </pomIncludes>
                     <postBuildHookScript>verify</postBuildHookScript>
                     <scriptVariables>
diff --git a/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml b/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml
index 2867649..d7b7efe 100644
--- a/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml
+++ b/src/it/package-with-single-bundle-target-mode/fm.launcher/pom.xml
@@ -65,8 +65,8 @@
                             <goal>convert-cp</goal>
                         </goals>
                         <configuration>
-                            <!-- NOTE: ${} is replaced no matter what so this trick seems to work by adding a zero-width-whitespace character (&#8203;)-->
-                            <artifactIdOverride>$&#8203;{project.groupId}:$&#8203;{project.artifactId}:slingosgifeature:@project.artifactId@:$&#8203;{project.version}</artifactIdOverride>
+                            <!-- On some systems the trick with the zero-width (&#8203;) space does not work so we do test it w/o place holders -->
+                            <artifactIdOverride>${project.groupId}:${project.artifactId}:slingosgifeature:@project.artifactId@:${project.version}</artifactIdOverride>
                             <installConvertedPackage>true</installConvertedPackage>
                             <contentPackages>
                                 <contentPackage>
diff --git a/src/it/package-with-single-bundle-target-mode/verify.bsh b/src/it/package-with-single-bundle-target-mode/verify.bsh
index 91cbfc5..9a9d11e 100644
--- a/src/it/package-with-single-bundle-target-mode/verify.bsh
+++ b/src/it/package-with-single-bundle-target-mode/verify.bsh
@@ -19,8 +19,10 @@ import java.util.*;
 import org.codehaus.plexus.util.*;
 
     boolean check() {
-        String projectName = "sling-feature-converter-maven-plugin-test-target-mode.ui.apps";
-        String projectCoreName = "sling-feature-converter-maven-plugin-test-target-mode.core";
+        String projectArtifact = "sling-feature-converter-maven-plugin-test-target-mode";
+        String projectName = projectArtifact + ".ui.apps";
+        String projectCoreName = projectArtifact + ".core";
+        String projectFMLauncherName = projectArtifact + ".fm.launcher";
         // These are <scriptVariables/> provided by the plugin POM
         String projectVersion = plugin.version;
         String projectGroup = plugin.group;
@@ -47,7 +49,7 @@ import org.codehaus.plexus.util.*;
         String log = FileUtils.fileRead(featureModelFile);
         System.out.println("Feature Model File Content: " + log);
         String[] values = {
-            "\"id\":\"$​{project.groupId}:$​{project.artifactId}:slingosgifeature:sling-feature-converter-maven-plugin:$​{project.version}\"",
+            "\"id\":\"" + projectGroup + ":" + projectFMLauncherName + ":slingosgifeature:sling-feature-converter-maven-plugin:" + projectVersion + "\"",
             "\"bundles\":[",
             "\"id\":\"" + projectGroup + ":" + projectCoreName + ":" + projectVersion + "\"",
             "\"content-packages:ARTIFACTS|true\":[",
diff --git a/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml b/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml
index a70eff0..5f4806c 100644
--- a/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml
+++ b/src/it/package-with-single-bundle-with-parameters/ui.apps/pom.xml
@@ -80,8 +80,8 @@
                             <goal>convert-cp</goal>
                         </goals>
                         <configuration>
-                            <!-- NOTE: ${} is replaced no matter what so this trick seems to work by adding a zero-width-whitespace character (&#8203;)-->
-                            <artifactIdOverride>$&#8203;{project.groupId}:$&#8203;{project.artifactId}:slingosgifeature:@project.artifactId@:$&#8203;{project.version}</artifactIdOverride>
+                            <!-- On some systems the trick with the zero-width (&#8203;) space does not work so we do test it w/o place holders -->
+                            <artifactIdOverride>${project.groupId}:${project.artifactId}:slingosgifeature:@project.artifactId@:${project.version}</artifactIdOverride>
                             <installConvertedPackage>true</installConvertedPackage>
                         </configuration>
                     </execution>
diff --git a/src/it/package-with-single-bundle-with-parameters/verify.bsh b/src/it/package-with-single-bundle-with-parameters/verify.bsh
index 8531f76..b0aa115 100644
--- a/src/it/package-with-single-bundle-with-parameters/verify.bsh
+++ b/src/it/package-with-single-bundle-with-parameters/verify.bsh
@@ -19,11 +19,12 @@ import java.util.*;
 import org.codehaus.plexus.util.*;
 
     boolean check() {
-        String projectName = "sling-feature-converter-maven-plugin-test-with-param.ui.apps";
-        String projectCoreName = "sling-feature-converter-maven-plugin-test-with-param.core";
+        String projectArtifact = "sling-feature-converter-maven-plugin-test-with-param";
+        String projectName = projectArtifact + ".ui.apps";
+        String projectCoreName = projectArtifact + ".core";
         // These are <scriptVariables/> provided by the plugin POM
-        String projectVersion = plugin.version;
         String projectGroup = plugin.group;
+        String projectVersion = plugin.version;
         String projectGroupPath = projectGroup.replaceAll("\\.", "/");
 
         File targetFolder = new File(basedir, "ui.apps/target");
@@ -46,7 +47,7 @@ import org.codehaus.plexus.util.*;
         String log = FileUtils.fileRead(featureModelFile);
         System.out.println("Feature Model File Content: " + log);
         String[] values = {
-            "\"id\":\"$​{project.groupId}:$​{project.artifactId}:slingosgifeature:sling-feature-converter-maven-plugin:$​{project.version}\"",
+            "\"id\":\"" + projectGroup + ":" + projectName + ":slingosgifeature:sling-feature-converter-maven-plugin:" + projectVersion + "\"",
             "\"bundles\":[",
             "\"id\":\"" + projectGroup + ":" + projectCoreName + ":" + projectVersion + "\"",
             "\"content-packages:ARTIFACTS|true\":[",