Comments (10)
I attached a patch.
Original comment by puce1977
on 30 Nov 2013 at 10:43
Attachments:
from ez-vcard.
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.
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.
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.
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.
Updated patch which uses fremarker v2.3.20
Original comment by puce1977
on 30 Nov 2013 at 12:06
Attachments:
from ez-vcard.
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.
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.
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.
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)
- quoted-printable encoded entities are not correctly converted HOT 1
- vCards broken on systems with locale with non-Western digits HOT 5
- Address field parsing issue HOT 2
- Caret encoding: \n not encoded to ^n HOT 3
- Getting crash reports in the release version of the android app HOT 4
- Vulnerability (CVE-2021-37714) in jsoup 1.13.1 HOT 4
- Can't call VCardPropertyScribe.write* explicitly for all properties HOT 2
- Sharing VCF with image to WhatsApp doesn't work HOT 3
- unable to get Photo when using bytes data
- Unable to share Vcf contact card for Android 11 and above. HOT 1
- IMPP: case-insensitive comparison of schemes HOT 1
- VCardWriter - Writes data without proper formatting for Google Contacts - Expected : YYYY-MM-DD ; current : YYYYMMDD HOT 2
- [Q] How do I get the `RawProperty`s? HOT 1
- Version 0.11.3 vulnerabilities HOT 3
- Migration to 0.12.0 while still supporting Android API 21..25 HOT 6
- Add support for Jigsaw modules HOT 1
- Parsing from chunk of text HOT 2
- Custom getter in VCardProperty HOT 9
- Invalid value for "MonthOfYear" caused by wrong BDAY date HOT 1
- Raw property values HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ez-vcard.