Status: New
Owner: ----

New issue 799 by [email protected]: Fix OSGI metadata in latest Maven build
http://code.google.com/p/google-guice/issues/detail?id=799

Building latest master with Maven produces OSGi metadata that contains some unwanted imports. This is because the build now jarjars the classes after generation of the manifest instead of before, so the manifest imports both ASM and CGLIB. It also has J2SE-1.5 in its Bundle-RequiredExecutionEnvironment, despite the binary now being 1.6+. Finally it contains unwanted version ranges for Guava imports that unnecessarily constrain them to versions between 16.0 and 17.0.

Proposed patch:

 * remove J2SE-1.5 from Bundle-RequiredExecutionEnvironment
 * remove unwanted CGLIB and ASM imports
 * remove version ranges from Guava imports

diff --git a/pom.xml b/pom.xml
index dece81f..06ad0f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -245,10 +245,8 @@ See the Apache License Version 2.0 for the specific language governing permissio <Bundle-DocURL>http://code.google.com/p/google-guice/</Bundle-DocURL>
               <Bundle-Name>${project.artifactId}</Bundle-Name>
               <Bundle-SymbolicName>$(module)</Bundle-SymbolicName>
-              <Bundle-RequiredExecutionEnvironment>
-                J2SE-1.5,JavaSE-1.6
-              </Bundle-RequiredExecutionEnvironment>
-              <Import-Package>!com.google.inject.*,*</Import-Package>
+ <Bundle-RequiredExecutionEnvironment>JavaSE-1.6</Bundle-RequiredExecutionEnvironment> + <Import-Package>!net.sf.cglib.*,!org.objectweb.asm.*,!com.google.inject.*,*</Import-Package> <_exportcontents>!*.internal.*,$(module).*;version=${guice.api.version}</_exportcontents> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
               <_nouses>true</_nouses>
@@ -260,6 +258,10 @@ See the Apache License Version 2.0 for the specific language governing permissio
                 Ignore-Package,Bnd-LastModified
               </_removeheaders>
             </instructions>
+            <!--
+ | Exclude from version calculations, as it doesn't use semantic versioning
+            -->
+            <excludeDependencies>guava</excludeDependencies>
           </configuration>
           <executions>
             <execution>


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to