Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9D3E2200B51 for ; Mon, 18 Jul 2016 07:29:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9BD94160A6C; Mon, 18 Jul 2016 05:29:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1FD6160A6B for ; Mon, 18 Jul 2016 07:29:42 +0200 (CEST) Received: (qmail 61205 invoked by uid 500); 18 Jul 2016 05:22:20 -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 61171 invoked by uid 99); 18 Jul 2016 05:22:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2016 05:22:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 78CDE2C029F for ; Mon, 18 Jul 2016 05:22:20 +0000 (UTC) Date: Mon, 18 Jul 2016 05:22:20 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (KARAF-3727) Cave generates the repository.xml with "bad" path on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 18 Jul 2016 05:29:43 -0000 [ https://issues.apache.org/jira/browse/KARAF-3727?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 updated KARAF-3727: ---------------------------------------- Fix Version/s: cave-2.3.1 > Cave generates the repository.xml with "bad" path on Windows > ------------------------------------------------------------ > > Key: KARAF-3727 > URL: https://issues.apache.org/jira/browse/KARAF-3727 > Project: Karaf > Issue Type: Bug > Components: cave-repository > Affects Versions: cave-2.3.0, cave-3.0.0 > Reporter: Jean-Baptiste Onofr=C3=A9 > Assignee: Jean-Baptiste Onofr=C3=A9 > Fix For: cave-2.3.1, cave-3.0.1 > > > On Windows, when using cave:repository-update nice-repo, the generated re= pository.xml contains bad paths: > {code} > > symbolicname=3D"org.apache.felix.ipojo"=20 > presentationname=3D"Apache Felix iPOJO" =20 > uri=3D"file:/C:/foo/bar/apache-karaf-3.0.2/foo/bundle_repo/test-repo/org/= apache/felix/org.apache.felix.ipojo/1.8.0/org.apache.felix.ipojo-1.8.0.jar"= =20 > version=3D"1.8.0"> > {code} > Especially, the slashes are not good on Windows. > The issue is that, in the CaveRepositoryImpl, we do: > {code} > private void useResourceRelativeUri(ResourceImpl resource) throws Excepti= on { > String resourceURI =3D resource.getURI(); > String locationURI =3D "file:" + this.getLocation(); > LOGGER.debug("Converting resource URI {} relatively to repository URI= {}", resourceURI, locationURI); > if (resourceURI.startsWith(locationURI)) { > resourceURI =3D resourceURI.substring(locationURI.length() + 1); > LOGGER.debug("Resource URI converted to " + resourceURI); > resource.put(Resource.URI, resourceURI); > } > } > {code} > The problem is that, if the resourceURI looks good (using back slashes), = the locationURI uses forward slashes. So the method doesn't trim the URI fo= r the repository.xml and it ends with the full path (instead of the relativ= e one). -- This message was sent by Atlassian JIRA (v6.3.4#6332)