John
John

Reputation: 203

Point Karaf paxexam to a custom location

Hi is there a way to point the paxexam karaf to a custom location i.e a karaf installation in your file system

return new Option[] {
                karafDistributionConfiguration().frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf")
                        .type("zip").versionAsInProject())
                .unpackDirectory(new File("target/paxexam/unpack/"))
                .useDeployFolder(false),
                systemProperty("Orcale.DbHandler").value(dbHandler.getURL()),
                KarafDistributionOption.debugConfiguration("8898", true),
                bootClasspathLibrary(oracleLib),
                configureConsole().ignoreLocalConsole(),
                logLevel(LogLevel.INFO),
                keepRuntimeFolder(),

        };

The above code points to a zip in maven repo instead of that can i point it to a local karaf folder in file system?

Upvotes: 0

Views: 124

Answers (1)

Jérémie B
Jérémie B

Reputation: 11022

It's not possible, the karaf container support only tar.gz or zip

see: https://github.com/ops4j/org.ops4j.pax.exam2/blob/master/containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/ArchiveExtractor.java

You have to create your own test container if you want to clone an existing folder

Edit: Open issue in Pax-Exam : https://ops4j1.jira.com/browse/PAXEXAM-614

Upvotes: 2

Related Questions