/* * Copyright 2013 The Solmix Project * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.gnu.org/licenses/ * or see the FSF site: http://www.fsf.org. */ package org.solmix.runtime.test; import static org.ops4j.pax.exam.CoreOptions.maven; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; import java.io.File; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.ops4j.pax.exam.karaf.options.KarafDistributionOption; import org.ops4j.pax.exam.options.MavenArtifactUrlReference; import org.ops4j.pax.exam.options.MavenUrlReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @RunWith(PaxExam.class) public class SolmixRuntimeKarafTest { private static Logger LOG = LoggerFactory.getLogger(SolmixRuntimeKarafTest.class); // @Inject // protected Calculator calculator; @Configuration public Option[] config() { MavenArtifactUrlReference karafUrl = maven() .groupId("org.apache.karaf") .artifactId("apache-karaf") .version("3.0.1") .type("tar.gz"); MavenUrlReference solmixFeatures = maven() .groupId("org.solmix.assemblies.features") .artifactId("framework") .classifier("features") .type("xml") .version(BundleVersion.SOLMIX_VERSION); return new Option[] { KarafDistributionOption.debugConfiguration("8000", true), karafDistributionConfiguration() .frameworkUrl(karafUrl) .unpackDirectory(new File("target/exam")) .useDeployFolder(false), keepRuntimeFolder(), KarafDistributionOption.features(solmixFeatures , "solmix-runtime"), /*mavenBundle() .groupId("org.solmix.common") .artifactId("solmix-common-runtime") .versionAsInProject().start(),*/ }; } @Test public void testAdd() { } }