ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1305813 - in /ace/trunk: ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/ ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/ ac...
Date Tue, 27 Mar 2012 11:29:54 GMT
Author: marrs
Date: Tue Mar 27 11:29:54 2012
New Revision: 1305813

URL: http://svn.apache.org/viewvc?rev=1305813&view=rev
Log:
Fixes to the exports of the management agent and launcher. Also fixed a parsing bug in the
new SAX parser, which could not properly handle whitespace. This is now fixed and tested.

Modified:
    ace/trunk/ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandler.java
    ace/trunk/ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java
    ace/trunk/ace-launcher/src/main/java/org/apache/ace/launcher/Main.java
    ace/trunk/ace-managementagent/pom.xml

Modified: ace/trunk/ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandler.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandler.java?rev=1305813&r1=1305812&r2=1305813&view=diff
==============================================================================
--- ace/trunk/ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandler.java
(original)
+++ ace/trunk/ace-deployment-provider-repositorybased/src/main/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandler.java
Tue Mar 27 11:29:54 2012
@@ -110,7 +110,10 @@ class BaseRepositoryHandler extends Defa
             if (m_currentArtifact == null) {
                 throw new SAXException("Unexpected directive tag!");
             }
-            m_currentArtifact.m_directives.put(m_currentDirectiveKey, new String(ch, start,
length));
+            String value = new String(ch, start, length).trim();
+            if (m_currentDirectiveKey != null && !value.equals("")) {
+                m_currentArtifact.m_directives.put(m_currentDirectiveKey, value);
+            }
         }
     }
 
@@ -157,6 +160,9 @@ class BaseRepositoryHandler extends Defa
 
             m_currentArtifact = null;
         }
+        else if (XmlTag.directives.equals(tag)) {
+            m_currentDirectiveKey = null;
+        }
     }
 
     /**

Modified: ace/trunk/ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java?rev=1305813&r1=1305812&r2=1305813&view=diff
==============================================================================
--- ace/trunk/ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java
(original)
+++ ace/trunk/ace-deployment-provider-repositorybased/src/test/java/org/apache/ace/deployment/provider/repositorybased/BaseRepositoryHandlerTest.java
Tue Mar 27 11:29:54 2012
@@ -288,7 +288,7 @@ public class BaseRepositoryHandlerTest {
         try {
             transformer = tFactory.newTransformer();
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-            transformer.setOutputProperty(OutputKeys.INDENT, "no");
+            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
             DOMSource source = new DOMSource(doc);
             sw = new StringWriter();
             StreamResult result = new StreamResult(sw);

Modified: ace/trunk/ace-launcher/src/main/java/org/apache/ace/launcher/Main.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-launcher/src/main/java/org/apache/ace/launcher/Main.java?rev=1305813&r1=1305812&r2=1305813&view=diff
==============================================================================
--- ace/trunk/ace-launcher/src/main/java/org/apache/ace/launcher/Main.java (original)
+++ ace/trunk/ace-launcher/src/main/java/org/apache/ace/launcher/Main.java Tue Mar 27 11:29:54
2012
@@ -109,14 +109,19 @@ public class Main {
         activators.add(new Activator());
         Map frameworkProperties = new HashMap();
         frameworkProperties.put("felix.systembundle.activators", activators);
-        frameworkProperties.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, "org.osgi.service.deploymentadmin;version=\"1.0\","
-                + "org.osgi.service.deploymentadmin.spi;version=\"1.0\","
-                + "org.osgi.service.cm;version=\"1.3\","
-                + "org.osgi.service.event;version=\"1.2\","
-                + "org.osgi.service.log;version=\"1.3\","
-                + "org.osgi.service.metatype;version=\"1.1\","
-                + "org.apache.ace.log;version=\"0.8.0\"");
-
+        frameworkProperties.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, 
+    		"org.osgi.service.deploymentadmin;managementagent=true;mandatory:=managementagent;version=\"1.0\","
+            + "org.osgi.service.deploymentadmin.spi;managementagent=true;mandatory:=managementagent;version=\"1.0\","
+            + "org.osgi.service.cm;managementagent=true;mandatory:=managementagent;version=\"1.3\","
+            + "org.osgi.service.event;managementagent=true;mandatory:=managementagent;version=\"1.2\","
+            + "org.osgi.service.log;managementagent=true;mandatory:=managementagent;version=\"1.3\","
+            + "org.osgi.service.metatype;managementagent=true;mandatory:=managementagent;version=\"1.1\","
+            + "org.apache.felix.dm;managementagent=true;mandatory:=managementagent;version=\"3.0\","
+            + "org.apache.felix.dm.tracker;managementagent=true;mandatory:=managementagent;version=\"3.0\","
+            + "org.apache.ace.log;managementagent=true;mandatory:=managementagent;version=\"0.8.1.SNAPSHOT\","
+            + "org.apache.ace.deployment.service;managementagent=true;mandatory:=managementagent;version=\"0.8.1.SNAPSHOT\""
+        );
+        
         frameworkProperties.putAll(m_fwOptionHandler.getProperties());
 
         factory.newFramework(frameworkProperties).start();

Modified: ace/trunk/ace-managementagent/pom.xml
URL: http://svn.apache.org/viewvc/ace/trunk/ace-managementagent/pom.xml?rev=1305813&r1=1305812&r2=1305813&view=diff
==============================================================================
--- ace/trunk/ace-managementagent/pom.xml (original)
+++ ace/trunk/ace-managementagent/pom.xml Tue Mar 27 11:29:54 2012
@@ -59,6 +59,8 @@
             !javax.swing.border,
             !javax.microedition.io,
             !org.osgi.service.condpermadmin,
+            org.osgi.service.deploymentadmin;version="[1,2)",
+            org.osgi.service.deploymentadmin.spi;version="[1,2)",
             *
         </import.package>
         <private.package>



Mime
View raw message