[AMQ-7076] Does not define spring-legacy repository by default in ActiveMQ Karaf features repo, and let the user add it

This commit is contained in:
Jean-Baptiste Onofré 2018-11-22 09:27:09 +01:00
parent 112c4e602f
commit 57e38509e5
2 changed files with 6 additions and 7 deletions

View File

@ -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)

View File

@ -20,7 +20,8 @@
<features name="activemq-core-${project.version}">
<repository>mvn:org.apache.karaf.features/spring-legacy/[4,5)/xml/features</repository>
<!-- In order to work with any Karaf version, the user has to add spring-legacy features repo by hand corresponding to his Karaf version -->
<!-- <repository>mvn:org.apache.karaf.features/spring-legacy/[4,5)/xml/features</repository> -->
<!-- Bundles needed if only client will be deployed in the container -->
<feature name="activemq-client" description="ActiveMQ client libraries" version="${project.version}" resolver="(obr)" start-level="50">