You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by ae...@apache.org on 2006/08/31 05:43:00 UTC

svn commit: r438759 - in /webservices/muse/trunk/modules/muse-tools/resources/osgi: ./ Activator MANIFEST.MF build.xml config.ini

Author: aeberbac
Date: Wed Aug 30 20:43:00 2006
New Revision: 438759

URL: http://svn.apache.org/viewvc?rev=438759&view=rev
Log:
first pass at OSGi resources, these will change because the OSGi implementation still needs a few fixes.

Added:
    webservices/muse/trunk/modules/muse-tools/resources/osgi/
    webservices/muse/trunk/modules/muse-tools/resources/osgi/Activator
    webservices/muse/trunk/modules/muse-tools/resources/osgi/MANIFEST.MF
    webservices/muse/trunk/modules/muse-tools/resources/osgi/build.xml
    webservices/muse/trunk/modules/muse-tools/resources/osgi/config.ini

Added: webservices/muse/trunk/modules/muse-tools/resources/osgi/Activator
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-tools/resources/osgi/Activator?rev=438759&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-tools/resources/osgi/Activator (added)
+++ webservices/muse/trunk/modules/muse-tools/resources/osgi/Activator Wed Aug 30 20:43:00 2006
@@ -0,0 +1,31 @@
+package XXX;
+
+import java.io.File;
+
+import org.apache.muse.core.platform.osgi.util.BundleRootHelper;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+	
+	public void start(BundleContext context) throws Exception {
+		String prop = System.getProperty("data.location");		
+		File root = null;
+		if(prop == null){
+			String location = context.getBundle().getLocation();
+			if(location.startsWith("initial@reference:file:")){
+				location = location.substring("initial@reference:file:".length());
+				root = new File(location);
+				location = root.getCanonicalPath();							
+			}
+		} else if("USE_BUNDLE_DATA".equals(prop)){
+			root = context.getDataFile(".");
+		} else {
+			root = new File(prop);
+		}
+		BundleRootHelper.registerRoot(context.getBundle(), root);
+	}
+	
+	public void stop(BundleContext context) throws Exception {
+	}
+}
\ No newline at end of file

Added: webservices/muse/trunk/modules/muse-tools/resources/osgi/MANIFEST.MF
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-tools/resources/osgi/MANIFEST.MF?rev=438759&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-tools/resources/osgi/MANIFEST.MF (added)
+++ webservices/muse/trunk/modules/muse-tools/resources/osgi/MANIFEST.MF Wed Aug 30 20:43:00 2006
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OSGi Capability
+Bundle-SymbolicName: XXX
+Bundle-Version: 1.0.0
+Bundle-Activator: XXX
+Bundle-Localization: plugin
+Import-Package: javax.xml.namespace,
+ org.osgi.framework;version="1.3.0"
+Require-Bundle: muse.osgi.core,
+ muse.osgi.soa.axis2,
+ muse.osgi.soa.core,
+ org.apache.muse.api,
+ org.apache.muse.core,
+ org.apache.muse.impl,
+ org.apache.muse.tools,
+ org.apache.muse.utils,
+ org.eclipse.corona.soa.provider.Axis2,
+ org.eclipse.equinox.http,
+ org.eclipse.equinox.servlet.api,
+ org.eclipse.osgi.services,
+ org.eclipse.osgi.util,
+ org.eclipse.osgi
+MUSE-CONFIG: OSGI-INF/muse.xml
+MUSE-CONTEXT: XXX
+Bundle-ClassPath: .,runtime.jar

Added: webservices/muse/trunk/modules/muse-tools/resources/osgi/build.xml
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-tools/resources/osgi/build.xml?rev=438759&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-tools/resources/osgi/build.xml (added)
+++ webservices/muse/trunk/modules/muse-tools/resources/osgi/build.xml Wed Aug 30 20:43:00 2006
@@ -0,0 +1,61 @@
+<project name="Build OSGI Capability" default="bundle">
+    
+    <target name="init">
+		<basename property="NAME" file="${basedir}"/>
+		
+		<property name="JAVA_SRC_DIR" value="src"/>
+		<property name="JAVA_DEST_DIR" value="bin"/>
+		<property name="PLUGINS_DIR" value="plugins"/>
+		
+		<property name="JAR_FILE" value="${PLUGINS_DIR}/${NAME}.jar"/>
+    	<property name="RUNTIME_JAR_FILE" value="runtime.jar"/>
+
+        <mkdir dir="lib"/>
+        
+        <unjar dest="lib">
+            <fileset dir="plugins">
+                <include name="org.apache.muse*.jar"/>
+            </fileset>
+        </unjar>
+        
+        <path id="class.path">
+            <fileset dir="${PLUGINS_DIR}">
+                <include name="*.jar"/>
+            </fileset>
+            <fileset dir="lib">
+                <include name="**/*.jar"/>
+            </fileset>
+        </path>
+		
+		<available property="JAVA_EXISTS" file="${JAVA_SRC_DIR}"/>
+    </target>
+    
+    <target name="clean"/>
+
+	<target name="java" if="JAVA_EXISTS" depends="init">
+		<mkdir dir="${JAVA_DEST_DIR}"/>
+		<javac srcdir="${JAVA_SRC_DIR}" destdir="${JAVA_DEST_DIR}" classpathref="class.path"/>
+		<jar destfile="${RUNTIME_JAR_FILE}">
+			<fileset dir="${JAVA_DEST_DIR}">
+				<include name="**/*.class"/>
+            </fileset>
+		</jar>
+		<jar destfile="${JAR_FILE}">			
+            <fileset dir=".">
+            	<include name="${RUNTIME_JAR_FILE}"/>
+                <include name="OSGI-INF/*"/>
+                <include name="META-INF/*"/>
+                <include name="wsdl/*"/>
+            	<include name="router-entries/**"/>
+            </fileset>
+		</jar>
+	</target>
+
+	<target name="clean-lib">
+		<delete dir="lib"/>
+	</target>
+	
+    <target name="bundle" depends="clean, java, clean-lib">
+        
+    </target>
+</project>

Added: webservices/muse/trunk/modules/muse-tools/resources/osgi/config.ini
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-tools/resources/osgi/config.ini?rev=438759&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-tools/resources/osgi/config.ini (added)
+++ webservices/muse/trunk/modules/muse-tools/resources/osgi/config.ini Wed Aug 30 20:43:00 2006
@@ -0,0 +1,2 @@
+osgi.bundles=XXX@start
+eclipse.ignoreApp=true



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org