felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r561046 - in /felix/trunk/ipojo: manipulator/pom.xml manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java metadata/pom.xml
Date Mon, 30 Jul 2007 17:11:12 GMT
Author: clement
Date: Mon Jul 30 10:11:10 2007
New Revision: 561046

URL: http://svn.apache.org/viewvc?view=rev&rev=561046
Log:
Solve a simple bug in the iPOJO Manipulator when a class is already manipulated.

Modified:
    felix/trunk/ipojo/manipulator/pom.xml
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
    felix/trunk/ipojo/metadata/pom.xml

Modified: felix/trunk/ipojo/manipulator/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/pom.xml?view=diff&rev=561046&r1=561045&r2=561046
==============================================================================
--- felix/trunk/ipojo/manipulator/pom.xml (original)
+++ felix/trunk/ipojo/manipulator/pom.xml Mon Jul 30 10:11:10 2007
@@ -45,10 +45,10 @@
           <instructions>          
             <Bundle-Name>iPOJO Manipulator</Bundle-Name>
             <Bundle-Vendor>Clement ESCOFFIER</Bundle-Vendor>
-            <Bundle-Description> iPOJO Manipulator </Bundle-Description>
+            <Bundle-Description> iPOJO Manipulator </Bundle-Description>
+            <Export-Package>org.apache.felix.ipojo.manipulator</Export-Package>
             <Private-Package>
             	org.apache.felix.ipojo.manipulation,
-            	org.apache.felix.ipojo.manipulator,
             	org.apache.felix.ipojo.xml.parser,
               	org.objectweb.asm,
               	org.objectweb.asm.commons,

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java?view=diff&rev=561046&r1=561045&r2=561046
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
Mon Jul 30 10:11:10 2007
@@ -201,7 +201,11 @@
             finalWriter = cw0;
         }
         // The file is in the bundle
-        return finalWriter.toByteArray();
+        if (ck.isalreadyManipulated()) {
+            return new byte[0];
+        } else {
+            return finalWriter.toByteArray();
+        }
     }
 
     /**

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?view=diff&rev=561046&r1=561045&r2=561046
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
Mon Jul 30 10:11:10 2007
@@ -147,7 +147,7 @@
         try {
             inputJar = new JarFile(in);
         } catch (IOException e) {
-            error("Cannot the input file is not a JarFile : " + in.getAbsolutePath());
+            error("The input file is not a JarFile : " + in.getAbsolutePath());
             return;
         }
 
@@ -182,6 +182,7 @@
                         jos.write(outClazz);
                         jos.closeEntry();
                     } else { // The class is already manipulated
+                        jos.putNextEntry(curEntry);
                         InputStream currIn = inputJar.getInputStream(curEntry);
                         int c;
                         int i = 0;
@@ -415,7 +416,9 @@
         for (int i = 0; i < m_metadata.length; i++) {
             meta += buildManifestMetadata(m_metadata[i], "");
         }
-        att.putValue("iPOJO-Components", meta);
+        if (!meta.equals("")) { 
+            att.putValue("iPOJO-Components", meta);
+        }
     }
 
     /**
@@ -555,7 +558,7 @@
         }
 
         if (meta == null || meta.length == 0) {
-            warn("Neither component, neither instance in " + path);
+            warn("Neither component types, nor instances in " + path);
         }
 
         return meta;
@@ -595,3 +598,4 @@
     }
 
 }
+

Modified: felix/trunk/ipojo/metadata/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/metadata/pom.xml?view=diff&rev=561046&r1=561045&r2=561046
==============================================================================
--- felix/trunk/ipojo/metadata/pom.xml (original)
+++ felix/trunk/ipojo/metadata/pom.xml Mon Jul 30 10:11:10 2007
@@ -7,7 +7,25 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>org.apache.felix.ipojo.metadata</artifactId>
-  <packaging>jar</packaging>
+  <packaging>bundle</packaging>
   <version>0.7.3-SNAPSHOT</version>
   <name>Apache Felix iPOJO Metadata</name>
+  <build>
+  <plugins>
+  	<plugin>
+    	<groupId>org.apache.felix</groupId>
+    	<artifactId>maven-bundle-plugin</artifactId>
+    	<version>1.1.0-SNAPSHOT</version>
+    	<extensions>true</extensions>
+    	<configuration>
+        	<instructions>          
+          		<Bundle-Name>iPOJO Manipulator</Bundle-Name>
+		        <Bundle-Vendor>Clement ESCOFFIER</Bundle-Vendor>
+        		<Bundle-Description> iPOJO Metadata </Bundle-Description>
+          		<Export-Package>org.apache.felix.ipojo.metadata</Export-Package>
+        	</instructions>
+    	</configuration>
+  	</plugin>
+  </plugins>
+  </build>
 </project>



Mime
View raw message