geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r937957 - in /geronimo/xbean/trunk: ./ xbean-bundleutils/ xbean-bundleutils/src/ xbean-bundleutils/src/main/ xbean-bundleutils/src/main/java/ xbean-bundleutils/src/main/java/org/ xbean-bundleutils/src/main/java/org/apache/ xbean-bundleutils...
Date Mon, 26 Apr 2010 08:00:09 GMT
Author: djencks
Date: Mon Apr 26 08:00:08 2010
New Revision: 937957

URL: http://svn.apache.org/viewvc?rev=937957&view=rev
Log:
XBEAN-148 create an xbean-bundleutils module from geronimo osgi utility classes

Added:
    geronimo/xbean/trunk/xbean-bundleutils/
    geronimo/xbean/trunk/xbean-bundleutils/pom.xml   (with props)
    geronimo/xbean/trunk/xbean-bundleutils/src/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/
  (props changed)
      - copied from r937946, geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
  (contents, props changed)
      - copied, changed from r937948, geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/BundleDescriptionTest.java
    geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
  (contents, props changed)
      - copied, changed from r937948, geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/HeaderParserTest.java
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
  (with props)
Removed:
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleAnnotationFinder.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/ConfigurationActivator.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/KernelActivator.java
Modified:
    geronimo/xbean/trunk/pom.xml
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassFinder.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleDescription.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleResourceFinder.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleUtils.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DictionaryMap.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryFilter.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryRange.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/HeaderParser.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/VersionRange.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarEntry.java
    geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarFile.java
    geronimo/xbean/trunk/xbean-finder/pom.xml

Modified: geronimo/xbean/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/pom.xml?rev=937957&r1=937956&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/pom.xml (original)
+++ geronimo/xbean/trunk/pom.xml Mon Apr 26 08:00:08 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <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">
 
     <!--
@@ -267,7 +268,7 @@
                         <instructions>
                             <Bundle-DocURL>${project.url}</Bundle-DocURL>
                             <Export-Package>org.apache.xbean.*;version=${pom.version}</Export-Package>
-                            <Private-Package />
+                            <Private-Package/>
                         </instructions>
                     </configuration>
                 </plugin>
@@ -285,9 +286,11 @@
     <modules>
         <module>xbean-classloader</module>
         <module>xbean-classpath</module>
+        <module>xbean-bundleutils</module>
         <module>xbean-finder</module>
         <module>xbean-naming</module>
         <module>xbean-reflect</module>
+        <module>xbean-blueprint</module>
         <module>xbean-spring</module>
         <module>xbean-telnet</module>
         <module>maven-xbean-plugin</module>
@@ -356,4 +359,4 @@
         </plugins>
     </reporting>
 
-</project>
+</project>
\ No newline at end of file

Added: geronimo/xbean/trunk/xbean-bundleutils/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/pom.xml?rev=937957&view=auto
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/pom.xml (added)
+++ geronimo/xbean/trunk/xbean-bundleutils/pom.xml Mon Apr 26 08:00:08 2010
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!-- $Rev$ $Date$ -->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean</artifactId>
+        <version>3.7-SNAPSHOT</version>
+    </parent>
+    <artifactId>xbean-bundleutils</artifactId>
+    <packaging>bundle</packaging>
+    <name>xbean-bundleutils</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+</project>

Propchange: geronimo/xbean/trunk/xbean-bundleutils/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/xbean/trunk/xbean-bundleutils/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/xbean/trunk/xbean-bundleutils/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Apr 26 08:00:08 2010
@@ -0,0 +1,2 @@
+/geronimo/server/branches/2.2/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi:826768,832538,885058
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/osgi:749113,749116-807432,809079-825588

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassFinder.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassFinder.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.io.IOException;
 import java.net.URL;
@@ -32,9 +32,9 @@ import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import org.apache.geronimo.kernel.osgi.BundleDescription.ExportPackage;
-import org.apache.geronimo.kernel.osgi.BundleDescription.HeaderEntry;
-import org.apache.geronimo.kernel.osgi.BundleDescription.RequireBundle;
+import org.apache.xbean.osgi.bundle.util.BundleDescription.ExportPackage;
+import org.apache.xbean.osgi.bundle.util.BundleDescription.HeaderEntry;
+import org.apache.xbean.osgi.bundle.util.BundleDescription.RequireBundle;
 import org.osgi.framework.Bundle;
 import org.osgi.service.packageadmin.ExportedPackage;
 import org.osgi.service.packageadmin.PackageAdmin;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleClassLoader.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.io.IOException;
 import java.net.URL;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleDescription.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleDescription.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleDescription.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleDescription.java
Mon Apr 26 08:00:08 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.util.ArrayList;
 import java.util.Dictionary;
@@ -26,7 +26,7 @@ import java.util.Map;
 import java.util.jar.Attributes;
 import java.util.jar.Manifest;
 
-import org.apache.geronimo.kernel.osgi.HeaderParser.HeaderElement;
+import org.apache.xbean.osgi.bundle.util.HeaderParser.HeaderElement;
 import org.osgi.framework.Constants;
 import org.osgi.framework.Version;
 

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleResourceFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleResourceFinder.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleResourceFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleResourceFinder.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.io.FilterInputStream;
 import java.io.IOException;
@@ -30,7 +30,7 @@ import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import org.apache.geronimo.kernel.osgi.BundleDescription.HeaderEntry;
+import org.apache.xbean.osgi.bundle.util.BundleDescription.HeaderEntry;
 import org.osgi.framework.Bundle;
 import org.osgi.service.packageadmin.PackageAdmin;
 

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleUtils.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleUtils.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleUtils.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/BundleUtils.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.net.URL;
 import java.util.Collections;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.io.IOException;
 import java.io.InputStream;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
Mon Apr 26 08:00:08 2010
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.io.File;
 import java.io.InputStream;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DictionaryMap.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DictionaryMap.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DictionaryMap.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DictionaryMap.java
Mon Apr 26 08:00:08 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.util.AbstractMap;
 import java.util.Dictionary;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryFilter.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryFilter.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryFilter.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryFilter.java
Mon Apr 26 08:00:08 2010
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryRange.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryRange.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryRange.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DiscoveryRange.java
Mon Apr 26 08:00:08 2010
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/HeaderParser.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/HeaderParser.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/HeaderParser.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/HeaderParser.java
Mon Apr 26 08:00:08 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.util.ArrayList;
 import java.util.HashMap;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/VersionRange.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/VersionRange.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/VersionRange.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/VersionRange.java
Mon Apr 26 08:00:08 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import org.osgi.framework.Version;
 

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarEntry.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarEntry.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarEntry.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarEntry.java
Mon Apr 26 08:00:08 2010
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.kernel.osgi.jar;
+package org.apache.xbean.osgi.bundle.util.jar;
 
 import java.io.IOException;
 import java.net.URL;

Modified: geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarFile.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarFile.java?rev=937957&r1=937946&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarFile.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/jar/BundleJarFile.java
Mon Apr 26 08:00:08 2010
@@ -14,8 +14,10 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.kernel.osgi.jar;
+package org.apache.xbean.osgi.bundle.util.jar;
 
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
@@ -24,11 +26,10 @@ import java.util.Enumeration;
 import java.util.LinkedList;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
 
-import org.apache.geronimo.kernel.util.IOUtils;
-import org.apache.geronimo.kernel.util.JarUtils;
 import org.osgi.framework.Bundle;
 
 /**
@@ -36,12 +37,22 @@ import org.osgi.framework.Bundle;
  */
 public class BundleJarFile extends JarFile {
     
+    private static final File DUMMY_JAR_FILE;
+
+    static {
+        try {
+            DUMMY_JAR_FILE = createTempFile();
+            new JarOutputStream(new FileOutputStream(BundleJarFile.DUMMY_JAR_FILE), new Manifest()).close();
+        } catch (IOException e) {
+            throw new ExceptionInInitializerError(e);
+        }
+    }
     private final Bundle bundle;
     private boolean manifestLoaded = false;
     private Manifest manifest;
     
     public BundleJarFile(Bundle bundle) throws IOException {
-        super(JarUtils.DUMMY_JAR_FILE);
+        super(DUMMY_JAR_FILE);
         this.bundle = bundle;
     }
 
@@ -110,7 +121,7 @@ public class BundleJarFile extends JarFi
         if (entry == null) {
             throw new IOException("Entry not found: name=" + zipEntry.getName());
         } else if (entry.isDirectory()) {
-            return new IOUtils.EmptyInputStream();
+            return new EmptyInputStream();
         } else {
             return entry.getEntryURL().openStream();
         }
@@ -136,4 +147,50 @@ public class BundleJarFile extends JarFi
         }
         return manifest;
     }
+
+    // be careful to clean up the temp file... we tell the vm to delete this on exit
+    // but VMs can't be trusted to acutally delete the file
+    private static File createTempFile() throws IOException {
+        File tempFile = File.createTempFile("geronimo-fileutils", ".tmpfile");
+        tempFile.deleteOnExit();
+        return tempFile;
+    }
+
+
+    private static final class EmptyInputStream extends InputStream {
+
+         public int read() {
+             return -1;
+         }
+
+         public int read(byte b[]) {
+             return -1;
+         }
+
+         public int read(byte b[], int off, int len) {
+             return -1;
+         }
+
+         public long skip(long n) {
+             return 0;
+         }
+
+         public int available() {
+             return 0;
+         }
+
+         public void close() {
+         }
+
+         public synchronized void mark(int readlimit) {
+         }
+
+         public synchronized void reset() {
+         }
+
+         public boolean markSupported() {
+             return false;
+         }
+     }
+
 }

Copied: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
(from r937948, geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/BundleDescriptionTest.java)
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java?p2=geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java&p1=geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/BundleDescriptionTest.java&r1=937948&r2=937957&rev=937957&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/BundleDescriptionTest.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
Mon Apr 26 08:00:08 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.util.HashMap;
 import java.util.List;

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Apr 26 08:00:08 2010
@@ -0,0 +1 @@
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/BundleDescriptionTest.java:749113,749116-807432

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/BundleDescriptionTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
(from r937948, geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/HeaderParserTest.java)
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java?p2=geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java&p1=geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/HeaderParserTest.java&r1=937948&r2=937957&rev=937957&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/HeaderParserTest.java
(original)
+++ geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
Mon Apr 26 08:00:08 2010
@@ -16,12 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.geronimo.kernel.osgi;
+package org.apache.xbean.osgi.bundle.util;
 
 import java.util.List;
 
-import org.apache.geronimo.kernel.osgi.HeaderParser;
-import org.apache.geronimo.kernel.osgi.HeaderParser.HeaderElement;
+import org.apache.xbean.osgi.bundle.util.HeaderParser;
+import org.apache.xbean.osgi.bundle.util.HeaderParser.HeaderElement;
 
 import junit.framework.TestCase;
 

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Apr 26 08:00:08 2010
@@ -0,0 +1 @@
+/geronimo/server/trunk/framework/modules/geronimo-kernel/src/test/java/org/apache/geronimo/kernel/osgi/HeaderParserTest.java:749113,749116-807432

Propchange: geronimo/xbean/trunk/xbean-bundleutils/src/test/java/org/apache/xbean/osgi/bundle/util/HeaderParserTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/xbean/trunk/xbean-finder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/pom.xml?rev=937957&r1=937956&r2=937957&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/pom.xml (original)
+++ geronimo/xbean/trunk/xbean-finder/pom.xml Mon Apr 26 08:00:08 2010
@@ -33,6 +33,12 @@
     <description>XBean Finder helps to find annotations in classes</description>
     <dependencies>
         <dependency>
+            <artifactId>xbean-bundleutils</artifactId>
+            <groupId>org.apache.xbean</groupId>
+            <version>3.7-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
             <groupId>asm</groupId>
             <artifactId>asm</artifactId>
             <version>3.1</version>
@@ -44,6 +50,12 @@
             <version>3.1</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

Added: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java?rev=937957&view=auto
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
(added)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
Mon Apr 26 08:00:08 2010
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.xbean.finder;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.zip.ZipEntry;
+
+import org.apache.xbean.osgi.bundle.util.BundleResourceFinder;
+import org.apache.xbean.osgi.bundle.util.DiscoveryFilter;
+import org.osgi.framework.Bundle;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class BundleAnnotationFinder extends AbstractFinder {
+    private final Bundle bundle;
+
+    public BundleAnnotationFinder(PackageAdmin packageAdmin, Bundle bundle) throws Exception
{
+        this(packageAdmin, bundle, BundleResourceFinder.FULL_DISCOVERY_FILTER);
+    }
+
+    public BundleAnnotationFinder(PackageAdmin packageAdmin, Bundle bundle, DiscoveryFilter
discoveryFilter) throws Exception {
+        this.bundle = bundle;
+        BundleResourceFinder bundleResourceFinder = new BundleResourceFinder(packageAdmin,
bundle, "", ".class", discoveryFilter);
+        bundleResourceFinder.find(new AnnotationFindingCallback());
+    }
+
+    @Override
+    protected URL getResource(String s) {
+        return bundle.getResource(s);
+    }
+
+    @Override
+    protected Class<?> loadClass(String s) throws ClassNotFoundException {
+        return bundle.loadClass(s);
+    }
+
+    private class AnnotationFindingCallback implements BundleResourceFinder.ResourceFinderCallback
{
+
+        @Override
+        public void foundInDirectory(Bundle bundle, String baseDir, URL url) throws Exception
{
+            InputStream in = url.openStream();
+            try {
+                readClassDef(in);
+            } finally {
+                in.close();
+            }
+        }
+
+        @Override
+        public void foundInJar(Bundle bundle, String jarName, ZipEntry entry, InputStream
in) throws Exception {
+            readClassDef(in);
+        }
+    }
+
+}

Propchange: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/BundleAnnotationFinder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message