[jboss-cvs] JBossAS SVN: r101760 - in projects/jboss-osgi/projects/vfs/trunk: .settings and 27 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 3 03:14:56 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-03-03 03:14:54 -0500 (Wed, 03 Mar 2010)
New Revision: 101760

Added:
   projects/jboss-osgi/projects/vfs/trunk/.project
   projects/jboss-osgi/projects/vfs/trunk/.settings/
   projects/jboss-osgi/projects/vfs/trunk/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/projects/vfs/trunk/api/.classpath
   projects/jboss-osgi/projects/vfs/trunk/api/.project
   projects/jboss-osgi/projects/vfs/trunk/api/.settings/
   projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/projects/vfs/trunk/api/src/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/AbstractVFS.java
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSAdaptor.java
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSUtils.java
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VirtualFile.java
   projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/package.html
   projects/jboss-osgi/projects/vfs/trunk/vfs21/.classpath
   projects/jboss-osgi/projects/vfs/trunk/vfs21/.project
   projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/projects/vfs/trunk/vfs21/pom.xml
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VFSAdaptor21.java
   projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VirtualFileAdaptor21.java
   projects/jboss-osgi/projects/vfs/trunk/vfs30/.classpath
   projects/jboss-osgi/projects/vfs/trunk/vfs30/.project
   projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/projects/vfs/trunk/vfs30/pom.xml
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VFSAdaptor30.java
   projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VirtualFileAdaptor30.java
Modified:
   projects/jboss-osgi/projects/vfs/trunk/api/
   projects/jboss-osgi/projects/vfs/trunk/vfs21/
   projects/jboss-osgi/projects/vfs/trunk/vfs30/
Log:
Add jboss-osgi-vfs initial cut

Added: projects/jboss-osgi/projects/vfs/trunk/.project
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/.project	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/.project	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-vfs-parent</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/projects/vfs/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/.settings/org.maven.ide.eclipse.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,9 @@
+#Tue Mar 02 21:20:38 CET 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1


Property changes on: projects/jboss-osgi/projects/vfs/trunk/api
___________________________________________________________________
Name: svn:ignore
   + target


Added: projects/jboss-osgi/projects/vfs/trunk/api/.classpath
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/.classpath	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/.classpath	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/jboss-osgi/projects/vfs/trunk/api/.project
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/.project	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/.project	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-vfs</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.eclipse.jdt.core.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,6 @@
+#Tue Mar 02 21:26:56 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/.settings/org.maven.ide.eclipse.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,9 @@
+#Tue Mar 02 21:26:56 CET 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/AbstractVFS.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/AbstractVFS.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/AbstractVFS.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,96 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs;
+
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * The AbstractVFS is the entry point for VFS abstraction used by the OSGi layer.
+ * 
+ * This abstraction should be removed once we settle on a single jboss-vfs version.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public abstract class AbstractVFS
+{
+   private static VFSAdaptor adaptor;
+   
+   public static VirtualFile getChild(URL url) throws IOException
+   {
+      return getVFSAdaptor().getChild(url);
+   }
+
+   public static VirtualFile adapt(Object virtualFile)
+   {
+      return getVFSAdaptor().adapt(virtualFile);
+   }
+   
+   @SuppressWarnings("unchecked")
+   private static VFSAdaptor getVFSAdaptor() 
+   {
+      if (adaptor == null)
+      {
+         Class<VFSAdaptor> adaptorClass = null;
+         
+         // Try to load the jboss-vfs-2.1.x adaptor
+         try
+         {
+            String adaptorName = "org.jboss.osgi.vfs21.VFSAdaptor21";
+            adaptorClass = (Class<VFSAdaptor>)AbstractVFS.class.getClassLoader().loadClass(adaptorName);
+         }
+         catch (ClassNotFoundException e)
+         {
+            // ignore
+         }
+         
+         // Try to load the jboss-vfs-3.0.x adaptor
+         if (adaptorClass == null)
+         {
+            try
+            {
+               String adaptorName = "org.jboss.osgi.vfs30.VFSAdaptor30";
+               adaptorClass = (Class<VFSAdaptor>)AbstractVFS.class.getClassLoader().loadClass(adaptorName);
+            }
+            catch (ClassNotFoundException e)
+            {
+               // ignore
+            }
+         }
+         
+         if (adaptorClass == null)
+            throw new IllegalStateException("Cannot load VFS adaptor");
+         
+         try
+         {
+            adaptor = adaptorClass.newInstance();
+         }
+         catch (Exception ex)
+         {
+            throw new IllegalStateException("Cannot instanciate VFS adaptor");
+         }
+      }
+      return adaptor;
+   }
+}
+

Added: projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSAdaptor.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSAdaptor.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSAdaptor.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs;
+
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * The basic adaptor for the VFS that needs to be implemented for a specific jboss-vfs version.
+ * 
+ * This abstraction should be removed once we settle on a single jboss-vfs version.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public interface VFSAdaptor
+{
+   /**
+    * Get the root virtual file
+    *
+    * @param rootURL the root url
+    * @return the virtual file
+    * @throws IOException if there is a problem accessing the VFS
+    * @throws IllegalArgumentException if the rootURL
+    */
+   VirtualFile getChild(URL url) throws IOException;
+
+   /**
+    * Adapt a concrete instance of a jboss-vfs VirtualFile.
+    * @param virtualFile The VirtualFile instance
+    * @return The VirtualFile abstraction
+    * @throws IllegalArgumentException If the given virtualFile is not a VirtualFile supported by the VFSAdaptor implementation
+    */
+   VirtualFile adapt(Object virtualFile);
+}
+

Added: projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSUtils.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSUtils.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VFSUtils.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,88 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+/**
+ * A subset of VFS util functionality that is used by the OSGi layer. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public class VFSUtils
+{
+   public static Manifest getManifest(VirtualFile archive) throws IOException
+   {
+      if (archive == null)
+         throw new IllegalArgumentException("Null archive");
+
+      VirtualFile manifest = archive.getChild(JarFile.MANIFEST_NAME);
+      if (manifest == null)
+      {
+         return null;
+      }
+
+      InputStream stream = manifest.openStream();
+      try
+      {
+         return new Manifest(stream);
+      }
+      finally
+      {
+         try
+         {
+            stream.close();
+         }
+         catch (IOException ignored)
+         {
+         }
+      }
+   }
+
+   public static void copyStream(InputStream is, FileOutputStream os) throws IOException
+   {
+      if (is == null)
+         throw new IllegalArgumentException("input stream is null");
+      if (os == null)
+         throw new IllegalArgumentException("output stream is null");
+
+      try
+      {
+         byte[] buff = new byte[65536];
+         int rc = is.read(buff);
+         while (rc != -1)
+         {
+            os.write(buff, 0, rc);
+            rc = is.read(buff);
+         }
+      }
+      finally
+      {
+         os.flush();
+      }
+   }
+}

Added: projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VirtualFile.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VirtualFile.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/VirtualFile.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+/**
+ * A basic abstraction of a VirtualFile used by the OSGi layer. 
+ * 
+ * This abstraction should be removed once we settle on a single jboss-vfs version.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public interface VirtualFile
+{
+   /**
+    * Get the VF URL (file://root/org/jboss/X.java)
+    *
+    * @return the full URL to the VF in the VFS.
+    * @throws MalformedURLException if a url cannot be parsed
+    * @throws URISyntaxException if a uri cannot be parsed
+    * @throws IllegalStateException if the file is closed
+    */
+   URL toURL() throws MalformedURLException, URISyntaxException;
+
+   /**
+    * Get a child
+    *
+    * @param path the path
+    * @return the child or <code>null</code> if not found
+    * @throws IOException for any problem accessing the VFS
+    * @throws IllegalArgumentException if the path is null
+    * @throws IllegalStateException if the file is closed or it is a leaf node
+    */
+   VirtualFile getChild(String string) throws IOException;
+
+   /**
+    * Access the file contents.
+    *
+    * @return an InputStream for the file contents.
+    * @throws IOException for any error accessing the file system
+    * @throws IllegalStateException if the file is closed
+    */
+   InputStream openStream() throws IOException;
+}

Added: projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/package.html
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/package.html	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/api/src/main/java/org/jboss/osgi/vfs/package.html	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,10 @@
+<html>
+<body>
+An abstraction of the JBoss VFS functionality.
+
+The idea is that the OSGi components can run in environments that provide a 
+jboss-vfs implementation that is supported by this abstraction.
+
+This VFS abstraction should be removed once we settle on a single jboss-vfs implementation.
+</body>
+</html>


Property changes on: projects/jboss-osgi/projects/vfs/trunk/vfs21
___________________________________________________________________
Name: svn:ignore
   + target


Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/.classpath
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/.classpath	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/.classpath	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/.project
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/.project	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/.project	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-vfs21</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.eclipse.jdt.core.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,13 @@
+#Tue Mar 02 22:33:56 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/.settings/org.maven.ide.eclipse.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,9 @@
+#Tue Mar 02 21:27:19 CET 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/pom.xml
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/pom.xml	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/pom.xml	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id: pom.xml -1 $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <name>JBossOSGi - VFS21</name>
+  <description>The JBossOSGi VFS Abstration</description>
+
+  <groupId>org.jboss.osgi.vfs</groupId>
+  <artifactId>jboss-osgi-vfs21</artifactId>
+  <packaging>jar</packaging>
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.osgi.vfs</groupId>
+    <artifactId>jboss-osgi-vfs-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <!-- Properties -->
+  <properties>
+    <version.jboss.vfs>2.1.3.SP1</version.jboss.vfs>
+  </properties>
+  
+  <!-- Dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.osgi.vfs</groupId>
+      <artifactId>jboss-osgi-vfs</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>${version.jboss.vfs}</version>
+    </dependency>
+  </dependencies>
+</project>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VFSAdaptor21.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VFSAdaptor21.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VFSAdaptor21.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs21;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.osgi.vfs.VFSAdaptor;
+import org.jboss.osgi.vfs.VirtualFile;
+
+/**
+ * An adaptor to the jboss-vfs-2.1.x VFS. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public class VFSAdaptor21 implements VFSAdaptor
+{
+   public VirtualFile getChild(URL url) throws IOException
+   {
+      org.jboss.virtual.VirtualFile root = org.jboss.virtual.VFS.getRoot(url);
+      return new VirtualFileAdaptor21(root);
+   }
+
+   public VirtualFile adapt(Object virtualFile)
+   {
+      return new VirtualFileAdaptor21((org.jboss.virtual.VirtualFile)virtualFile);
+   }
+}
+

Added: projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VirtualFileAdaptor21.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VirtualFileAdaptor21.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs21/src/main/java/org/jboss/osgi/vfs21/VirtualFileAdaptor21.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs21;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.osgi.vfs.VirtualFile;
+
+/**
+ * An adaptor to the jboss-vfs-2.1.x VirtualFile. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+class VirtualFileAdaptor21 implements VirtualFile
+{
+   private org.jboss.virtual.VirtualFile delegate;
+   
+   public VirtualFileAdaptor21(org.jboss.virtual.VirtualFile delegate)
+   {
+      this.delegate = delegate;
+   }
+
+   public URL toURL() throws MalformedURLException, URISyntaxException
+   {
+      return delegate.toURL();
+   }
+
+   public VirtualFile getChild(String path) throws IOException
+   {
+      org.jboss.virtual.VirtualFile child = delegate.getChild(path);
+      if (child == null)
+         return null;
+      
+      return new VirtualFileAdaptor21(child);
+   }
+
+   public InputStream openStream() throws IOException
+   {
+      return delegate.openStream();
+   }
+}
+


Property changes on: projects/jboss-osgi/projects/vfs/trunk/vfs30
___________________________________________________________________
Name: svn:ignore
   + target


Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/.classpath
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/.classpath	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/.classpath	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/.project
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/.project	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/.project	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-vfs30</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.eclipse.jdt.core.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,6 @@
+#Tue Mar 02 21:26:56 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/.settings/org.maven.ide.eclipse.prefs	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,9 @@
+#Tue Mar 02 21:26:56 CET 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/pom.xml
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/pom.xml	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/pom.xml	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+  <!-- ====================================================================== -->
+  <!--                                                                        -->
+  <!--  JBoss, the OpenSource J2EE webOS                                      -->
+  <!--                                                                        -->
+  <!--  Distributable under LGPL license.                                     -->
+  <!--  See terms of license at http://www.gnu.org.                           -->
+  <!--                                                                        -->
+  <!-- ====================================================================== -->
+
+  <!-- $Id: pom.xml -1   $ -->
+  
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  
+  <name>JBossOSGi - VFS30</name>
+  <description>The JBossOSGi VFS Abstration</description>
+  
+  <groupId>org.jboss.osgi.vfs</groupId>
+  <artifactId>jboss-osgi-vfs30</artifactId>
+  <packaging>jar</packaging>
+  
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.osgi.vfs</groupId>
+    <artifactId>jboss-osgi-vfs-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <!-- Properties -->
+  <properties>
+    <version.jboss.vfs>3.0.0.CR2</version.jboss.vfs>
+  </properties>
+  
+  <!-- Dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.osgi.vfs</groupId>
+      <artifactId>jboss-osgi-vfs</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>${version.jboss.vfs}</version>
+    </dependency>
+  </dependencies>
+</project>

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VFSAdaptor30.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VFSAdaptor30.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VFSAdaptor30.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs30;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.osgi.vfs.VFSAdaptor;
+import org.jboss.osgi.vfs.VirtualFile;
+
+/**
+ * An adaptor to the jboss-vfs-3.0.x VFS. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+public class VFSAdaptor30 implements VFSAdaptor
+{
+   public VirtualFile getChild(URL url) throws IOException
+   {
+      org.jboss.vfs.VirtualFile root;
+      try
+      {
+         root = org.jboss.vfs.VFS.getChild(url);
+      }
+      catch (URISyntaxException ex)
+      {
+         throw new IOException(ex);
+      }
+      return new VirtualFileAdaptor30(root);
+   }
+
+   public VirtualFile adapt(Object virtualFile)
+   {
+      return new VirtualFileAdaptor30((org.jboss.vfs.VirtualFile)virtualFile);
+   }
+}
+

Added: projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VirtualFileAdaptor30.java
===================================================================
--- projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VirtualFileAdaptor30.java	                        (rev 0)
+++ projects/jboss-osgi/projects/vfs/trunk/vfs30/src/main/java/org/jboss/osgi/vfs30/VirtualFileAdaptor30.java	2010-03-03 08:14:54 UTC (rev 101760)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.osgi.vfs30;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.jboss.osgi.vfs.VirtualFile;
+
+/**
+ * An adaptor to the jboss-vfs-3.0.x VirtualFile. 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Mar-2010
+ */
+class VirtualFileAdaptor30 implements VirtualFile
+{
+   private org.jboss.vfs.VirtualFile delegate;
+   
+   public VirtualFileAdaptor30(org.jboss.vfs.VirtualFile delegate)
+   {
+      this.delegate = delegate;
+   }
+
+   public URL toURL() throws MalformedURLException, URISyntaxException
+   {
+      return delegate.toURL();
+   }
+
+   public VirtualFile getChild(String path) throws IOException
+   {
+      org.jboss.vfs.VirtualFile child = delegate.getChild(path);
+      if (child == null)
+         return null;
+      
+      return new VirtualFileAdaptor30(child);
+   }
+
+   public InputStream openStream() throws IOException
+   {
+      return delegate.openStream();
+   }
+}
+




More information about the jboss-cvs-commits mailing list