Coder Social home page Coder Social logo

Provide OSGi Metadata about ez-vcard HOT 10 CLOSED

mangstadt avatar mangstadt commented on July 23, 2024
Provide OSGi Metadata

from ez-vcard.

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I attached a patch.

Original comment by puce1977 on 30 Nov 2013 at 10:43

Attachments:

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
The generated Mainfest file (on my machine) looks like this now:

Manifest-Version: 1.0
Bnd-LastModified: 1385808303005
Build-Jdk: 1.7.0_45
Built-By: puce
Bundle-Description: A library that reads and writes vCards, supporting a
 ll versions of the vCard standard (2.1, 3.0, and 4.0) as well as xCard 
 (XML-encoded vCards), hCard (HTML-encoded vCards), and jCard (JSON-enco
 ded vCards).
Bundle-License: http://opensource.org/licenses/bsd-license.php
Bundle-ManifestVersion: 2
Bundle-Name: ez-vcard
Bundle-SymbolicName: com.googlecode.ez-vcard
Bundle-Vendor: Michael Angstadt
Bundle-Version: 0.9.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: ezvcard;uses:="ezvcard.io.scribe,ezvcard.parameter,ezvca
 rd.property,ezvcard.util,javax.xml.transform,org.w3c.dom,org.xml.sax";v
 ersion="0.9.1.SNAPSHOT",ezvcard.io;uses:="ezvcard,ezvcard.property";ver
 sion="0.9.1.SNAPSHOT",ezvcard.io.text;uses:="ezvcard,ezvcard.io.scribe,
 ezvcard.parameter,ezvcard.property";version="0.9.1.SNAPSHOT",ezvcard.io
 .json;uses:="com.fasterxml.jackson.core,ezvcard,ezvcard.io.scribe,ezvca
 rd.parameter,ezvcard.property";version="0.9.1.SNAPSHOT",ezvcard.io.html
 ;uses:="ezvcard,ezvcard.io.scribe,ezvcard.property,org.jsoup.nodes";ver
 sion="0.9.1.SNAPSHOT",ezvcard.io.scribe;uses:="ezvcard,ezvcard.io,ezvca
 rd.io.html,ezvcard.io.json,ezvcard.io.xml,ezvcard.parameter,ezvcard.pro
 perty,ezvcard.util,javax.xml.namespace,org.jsoup.nodes,org.w3c.dom";ver
 sion="0.9.1.SNAPSHOT",ezvcard.io.xml;uses:="ezvcard,ezvcard.io.scribe,e
 zvcard.property,javax.xml.namespace,javax.xml.transform,org.w3c.dom,org
 .xml.sax";version="0.9.1.SNAPSHOT",ezvcard.property;uses:="ezvcard,ezvc
 ard.parameter,ezvcard.util,org.w3c.dom,org.xml.sax";version="0.9.1.SNAP
 SHOT",ezvcard.util;uses:="javax.xml.transform,org.jsoup.nodes,org.jsoup
 .select,org.w3c.dom,org.xml.sax";version="0.9.1.SNAPSHOT",ezvcard.util.
 org.apache.commons.codec;version="0.9.1.SNAPSHOT",ezvcard.util.org.apac
 he.commons.codec.binary;uses:="ezvcard.util.org.apache.commons.codec";v
 ersion="0.9.1.SNAPSHOT",ezvcard.util.org.apache.commons.codec.net;uses:
 ="ezvcard.util.org.apache.commons.codec";version="0.9.1.SNAPSHOT",ezvca
 rd.parameter;uses:="ezvcard,ezvcard.util";version="0.9.1.SNAPSHOT"
Import-Package: com.fasterxml.jackson.core;version="[2.1,3)",freemarker.
 template,javax.xml.namespace,javax.xml.parsers,javax.xml.transform,java
 x.xml.transform.dom,javax.xml.transform.stream,javax.xml.xpath,org.jsou
 p;version="[1.7,2)",org.jsoup.nodes;version="[1.7,2)",org.jsoup.select;
 version="[1.7,2)",org.w3c.dom,org.xml.sax
Tool: Bnd-2.1.0.20130426-122213

Original comment by puce1977 on 30 Nov 2013 at 10:47

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
If you have some classes which you just need internally but don't actually 
belong to the API and if you don't want to guarantee backwards compatibility 
for those classes, then you should exclude them from from "Export-Package".

The easiest way is to put those classes in a *.impl.* or *.internal.* package 
as the Maven Bundle Plugin excludes these packages by default.

Original comment by puce1977 on 30 Nov 2013 at 10:56

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Note: jackson-core and jsoup already contain the OSGi metadata but freemarker 
doesn't.

Original comment by puce1977 on 30 Nov 2013 at 11:12

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
fremarker v2.3.20 contains the OSGi metadata. Please upgrade the dependency.

Original comment by puce1977 on 30 Nov 2013 at 12:01

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Updated patch which uses fremarker v2.3.20

Original comment by puce1977 on 30 Nov 2013 at 12:06

Attachments:

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Sounds good, thanks for this. :)  Is there anything else that needs to be done? 
 I saw something about an "activator" when reading the Wikipedia page on OSGi.  
And do you know why the build fails with the original <resource> configuration?

Original comment by mike.angstadt on 4 Dec 2013 at 3:45

  • Changed state: Accepted

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
OSGi provides 3 layers: the module layer, the lifecycle layer and the service 
layer.

The module layer controls what code can be accessed by which bundle and the 
OSGi metadata in the Manifest file is the way to control this.

The activator gives a hook to the bundle's lifecycle management. You only need 
this if you activly want to do something when the bundle gets started rather 
than waiting to get called from code of another bundle.

The service layer allows to search and provide service implementations (e.g. a 
VCardImporter which implements some common a Importer interface).

It's possible that the library could benefit from the lifecyle and service 
layer as well, but for the start, the provided patch is enough to access the 
ez-vcard classes from another bundle.

Original comment by puce1977 on 4 Dec 2013 at 9:54

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Regarding the changed resource configuration: I'm not sure why it works with a 
jar-packaging but not with a bundle-packaging, but actually I'm more suprised 
that it did work before.

When you filter binary files with Maven usually the resulting file gets 
corrupted. Maybe there was some slight corruption or just a simple precaution 
which failed the filtering of the png files when using the Maven Bundle Plugin, 
altough the resulting png files surprisingly still could be opened before.

Original comment by puce1977 on 4 Dec 2013 at 10:01

from ez-vcard.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Hmm strange.  Well thanks again for the patch.  If you think ez-vcard could 
benefit from plugging into the other layers, let me know. :)

Original comment by mike.angstadt on 4 Dec 2013 at 10:55

  • Changed state: Fixed

from ez-vcard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.