Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 9607 invoked from network); 21 May 2007 13:42:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2007 13:42:37 -0000 Received: (qmail 71337 invoked by uid 500); 21 May 2007 13:42:42 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 71302 invoked by uid 500); 21 May 2007 13:42:42 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 71293 invoked by uid 99); 21 May 2007 13:42:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 06:42:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 May 2007 06:42:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 34BA671403A for ; Mon, 21 May 2007 06:42:16 -0700 (PDT) Message-ID: <15217028.1179754936196.JavaMail.jira@brutus> Date: Mon, 21 May 2007 06:42:16 -0700 (PDT) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Closed: (FELIX-261) maven-bundle-plugin, Include-Resources directive and maven MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall closed FELIX-261. --------------------------------- Resolution: Fixed Ok, this seems to be working for me, so I committed it (and am closing this issue again). In truth, I would have reversed the WARNING and gave it to people who are using Maven to copy resources instead of BND, but it is fine for now. Also, I didn't do any testing, but my suspicion is that Maven is still copying its resource list by default first, then BND is copying its list after...at least this is how it had been working. What we really need is to make it possible for the plugin to completely take over for Maven when it comes to deciding the content of the JAR file. > maven-bundle-plugin, Include-Resources directive and maven > ----------------------------------------------------------------------- > > Key: FELIX-261 > URL: https://issues.apache.org/jira/browse/FELIX-261 > Project: Felix > Issue Type: Improvement > Components: Maven Bundle Plugin > Reporter: Alin Dreghiciu > Assigned To: Richard S. Hall > Attachments: FELIX-261-20070413.patch, FELIX-261-20070517.patch, FELIX-261-20070521-add-warning.patch > > > Currently maven-bundle-plugin handling of resources is hardcoded to the usgae of folder "src/main/resources". > It should instead use the folder setting from the pom. > This is a followup of a discussion from felix mail list and bellow is a possible solution from Stuart McCulloch: > I think you just need to iterate through the project resource list, for example: > /* > * I grant license to ASF for inclusion of the following code > * in ASF works, as per the Apache Software License > */ > StringBuilder resourcePaths = new StringBuilder(); > for (Iterator i = project.getResources().iterator(); i.hasNext();) { > org.apache.maven.model.Resource resource = > (org.apache.maven.model.Resource)i.next(); > if (new File(resource.getDirectory()).exists()) { > String path = resource.getDirectory(); > String base = baseDir.getAbsolutePath(); > if (path.startsWith(base)) { > path = path.substring(base.length() + 1); > } > if (resourcePaths.length() > 0) { > resourcePaths.append(','); > } > resourcePaths.append(path); > } > } > header(properties, Analyzer.INCLUDE_RESOURCE, resourcePaths); > /*** warning: it hasn't been thoroughly tested! ***/ > There should also be a plugin option to turn off this code, just in case ;) > Also should we be preserving the path layout in the bundle, which requires > the PATH=PATH form of Include-Resource, or should we flatten resources? > Perhaps add another plugin option... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.