From 57e38509e529def1f870d811f26145d21f7ac57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Baptiste=20Onofr=C3=A9?= Date: Thu, 22 Nov 2018 09:27:09 +0100 Subject: [PATCH] [AMQ-7076] Does not define spring-legacy repository by default in ActiveMQ Karaf features repo, and let the user add it --- .../activemq/karaf/itest/AbstractFeatureTest.java | 10 ++++------ activemq-karaf/src/main/resources/features-core.xml | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java index ee8f03b81e..ae45204d0d 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java @@ -20,12 +20,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.ops4j.pax.exam.CoreOptions.composite; import static org.ops4j.pax.exam.CoreOptions.maven; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile; +import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*; import java.io.File; import java.io.FileInputStream; @@ -146,6 +141,7 @@ public abstract class AbstractFeatureTest { } public static Option configure(String... features) { + String karafVersion = MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf"); MavenUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf") .type("tar.gz").versionAsInProject(); UrlReference camelUrl = maven().groupId("org.apache.camel.karaf") @@ -158,6 +154,8 @@ public abstract class AbstractFeatureTest { keepRuntimeFolder(), // logLevel(LogLevelOption.LogLevel.INFO), // editConfigurationFilePut("etc/config.properties", "karaf.startlevel.bundle", "50"), + editConfigurationFileExtend("etc/org.apache.karaf.features.cfg", "featuresRepositories", + "mvn:org.apache.karaf.features/spring-legacy/" + karafVersion + "/xml/features"), // debugConfiguration("5005", true), features(activeMQUrl, features), // features(camelUrl) diff --git a/activemq-karaf/src/main/resources/features-core.xml b/activemq-karaf/src/main/resources/features-core.xml index fdb90dbc18..789a991424 100644 --- a/activemq-karaf/src/main/resources/features-core.xml +++ b/activemq-karaf/src/main/resources/features-core.xml @@ -20,7 +20,8 @@ - mvn:org.apache.karaf.features/spring-legacy/[4,5)/xml/features + +