Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B7AF4DE1A for ; Sun, 8 Jul 2012 16:27:35 +0000 (UTC) Received: (qmail 49718 invoked by uid 500); 8 Jul 2012 16:27:35 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 49653 invoked by uid 500); 8 Jul 2012 16:27:35 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 49432 invoked by uid 99); 8 Jul 2012 16:27:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2012 16:27:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id D2C3E141899 for ; Sun, 8 Jul 2012 16:27:34 +0000 (UTC) Date: Sun, 8 Jul 2012 16:27:34 +0000 (UTC) From: "Uwe Barthel (JIRA)" To: issues@karaf.apache.org Message-ID: <1134168064.20170.1341764854865.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1300819129.2531.1341391774555.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (KARAF-1617) Blueprint deployer in combination with maven URL deployer creates wrong OSGi/blueprint/ file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Barthel updated KARAF-1617: ------------------------------- Labels: newbie patch (was: newbie) > Blueprint deployer in combination with maven URL deployer creates wrong OSGi/blueprint/ file > -------------------------------------------------------------------------------------------- > > Key: KARAF-1617 > URL: https://issues.apache.org/jira/browse/KARAF-1617 > Project: Karaf > Issue Type: Bug > Components: karaf-core > Affects Versions: 2.2.8 > Environment: Karaf 2.2.8 > * org/apache/karaf/deployer/org.apache.karaf.deployer.blueprint/2.2.8 > * org/apache/aries/blueprint/org.apache.aries.blueprint/0.3.2 > Reporter: Uwe Barthel > Assignee: Freeman Fang > Labels: newbie, patch > Attachments: patch_karaf_1617.txt > > > We are using the Aries JNDI service for providing database-datasources via JNDI. > The datasource definition is a blueprint-XML file like [this one|https://github.com/cschneider/Karaf-Tutorial/blob/master/db/datasource/datasource-derby.xml] and is located in our Maven repository. > I try to install the datasource definition like: > {quote} > bundle:install -s blueprint:mvn:my.product.database/my.product.database.layer//xml/datasource-hsqldb > {quote} > or via Kara feature: > {quote} > feature:install datasource-hsqldb > {quote} > {code:title=features.xml} > [...] > > hsqldb > blueprint:mvn:my.product.database/my.product.database.layer/${project.version}/xml/datasource-hsqldb > > [...] > {code} > The bundle will be installed but the blueprint service was not created. > The blueprint deployer creates a bundle-JAR file and including a new ZipEntry as blueprint service descriptor into {{OSGi/blueprint/}}. > {code:title=org.apache.karaf.deployer.blueprint.BlueprintTransformer.transform(URL, OutputStream)} > [...] > String name = url.getPath(); > int idx = name.lastIndexOf('/'); > if (idx >= 0) { > name = name.substring(idx + 1); > } > [...] > e = new ZipEntry("OSGI-INF/blueprint/" + name); > out.putNextEntry(e); > // Copy the new DOM > if (tf == null) { > tf = TransformerFactory.newInstance(); > } > tf.newTransformer().transform(new DOMSource(doc), new StreamResult(out)); > out.closeEntry(); > [...] > {code} > Based on the {{mvn:}} URL the name of the blueprint descriptor file is {{datasource-hsqldb}} (w/o the {{.xml}} extension). > The blueprint service needs the {{.xml}} file extension. > {code:title=org.apache.aries.blueprint.container.BlueprintExtender.checkBundle(Bundle)} > [...] > addEntries(bundle, name, "*.xml", pathList); > [...] > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira