FranzGames / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Make source jar an OSGi source code bundle #491

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please add the following lines to the source jar to make it an OSGi source code 
bundle.

Bundle-ManifestVersion: 2
Bundle-SymbolicName:com.google.gson.source
Bundle-Version: 2.2.2
Eclipse-SourceBundle: com.google.gson;version="2.2.2"

This can be achieved easily by adding this snippet to the maven-source-plugin.

        <configuration>
          <archive>
            <manifestEntries>
              <Eclipse-SourceBundle>com.google.gson;version="${project.version}"</Eclipse-SourceBundle>
              <Bundle-SymbolicName>com.google.gson.source</Bundle-SymbolicName>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
              <Bundle-Version>${project.version}</Bundle-Version>
            </manifestEntries>
          </archive>
        </configuration>

Original issue reported on code.google.com by adriaan....@gmail.com on 20 Dec 2012 at 10:10

GoogleCodeExporter commented 9 years ago
Has this issue been resolved yet?  Thanks!

Original comment by MBah2...@gmail.com on 26 Sep 2013 at 6:09

GoogleCodeExporter commented 9 years ago
@MBah2... : yes :

If you download the last jar (ex. from 
http://mvnrepository.com/artifact/com.google.code.gson/gson/2.2.4 ) you should 
see bundle informations into jar://META-INF/MANIFEST.MF :

Manifest-Version: 1.0
Export-Package: com.google.gson;version=2.2.4, com.google.gson.annotat
 ions;version=2.2.4, com.google.gson.reflect;version=2.2.4, com.google
 .gson.stream;version=2.2.4, com.google.gson.internal;version=2.2.4, c
 om.google.gson.internal.bind;version=2.2.4
Bundle-ClassPath: .
Built-By: inder
Bundle-Name: Gson
Created-By: Apache Maven 3.0.4
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Google Gson Project
Bundle-ContactAddress: http://code.google.com/p/google-gson/
Bundle-Version: 2.2.4
Build-Jdk: 1.7.0_21
Bundle-ManifestVersion: 2
Bundle-Description: Google Gson library
Bundle-SymbolicName: com.google.gson
Archiver-Version: Plexus Archiver

I also load it with success onto OSGi fwk.

Maybe this issue could be closed..

Original comment by BVandepu...@gmail.com on 16 Apr 2014 at 1:25

GoogleCodeExporter commented 9 years ago
Closed as suggested by BVandeputte.
Thanks for the verification.

Original comment by inder123 on 17 Apr 2014 at 9:44