Adapt the maven-felix-plugin and the daemon to the framework api changes
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@553638 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java b/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
index a7c037a..130e3b3 100644
--- a/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
+++ b/org.apache.felix.daemon/src/main/java/org/apache/felix/daemon/Service.java
@@ -74,9 +74,9 @@
{
this.layout = ( FelixLayout ) suppliedLayout;
}
-
- instance = new Felix();
+
configationProperties = readConfigProperties();
+ instance = new Felix(new MutablePropertyResolverImpl( new StringMap( configationProperties, false ) ), null );
}
@@ -96,13 +96,20 @@
}
// start up the instance using the loaded and possibly altered configuration
- instance.start( new MutablePropertyResolverImpl( new StringMap( configationProperties, false ) ), null );
+ try
+ {
+ instance.start();
+ }
+ catch (Exception ex)
+ {
+ // TODO: find out what to do
+ }
}
public void stop( String[] arg0 ) throws Exception
{
- instance.shutdown();
+ instance.stop();
}
diff --git a/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java b/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
index a2f4a70..b35de9d 100644
--- a/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
+++ b/tools/maven2/maven-felix-plugin/src/main/java/org/apache/felix/tools/maven/felix/plugin/FelixRunMojo.java
@@ -588,7 +588,7 @@
/**
* The felix container used to run the integration tests.
*/
- private Felix felixContainer = new Felix();
+ private Felix felixContainer;
public void execute() throws MojoExecutionException, MojoFailureException
@@ -662,11 +662,26 @@
// -------------------------------------------------------------------
MutablePropertyResolver resolver = new MutablePropertyResolverImpl(props);
- felixContainer.start( resolver, new ArrayList() );
+ felixContainer = new Felix(resolver, null);
+ try
+ {
+ felixContainer.start();
+ }
+ catch (Exception ex)
+ {
+ // TODO: find out what to do.
+ }
getLog().info( "-=============================-" );
getLog().info( "| Felix: successfully started |" );
getLog().info( "-=============================-" );
- felixContainer.shutdown();
+ try
+ {
+ felixContainer.stop();
+ }
+ catch (Exception ex)
+ {
+ // TODO: find out what to do.
+ }
getLog().info( "-==============================-" );
getLog().info( "| Felix: successfully shutdown |" );
getLog().info( "-==============================-" );