Skip to content

Instantly share code, notes, and snippets.

@iocanel
Created March 9, 2012 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iocanel/2005723 to your computer and use it in GitHub Desktop.
Save iocanel/2005723 to your computer and use it in GitHub Desktop.
Adding system and config properties to Karaf via pax-exam-karaf
import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.editConfigurationFileExtend;
@Configuration
public Option[] config() {
return new Option[]{
karafDistributionConfiguration(), keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.ERROR),
editConfigurationFilePut("etc/system.properties", "mykey", "myvalue"),
editConfigurationFileExtend("etc/config.properties", "org.osgi.framework.executionenvironment", "JavaSE-1.7")
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment