Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 484279061 for ; Thu, 12 Apr 2012 08:03:34 +0000 (UTC) Received: (qmail 83998 invoked by uid 500); 12 Apr 2012 08:03:33 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 83441 invoked by uid 500); 12 Apr 2012 08:03:28 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Delivered-To: moderator for users@felix.apache.org Received: (qmail 62757 invoked by uid 99); 12 Apr 2012 07:53:49 -0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of guillaume.ow2@gmail.com designates 209.85.212.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=LWl94PmPYrQNjCilnNy0UPGLhUHcEfc6ZAjTgL8yR3k=; b=Pdf/FkHRuNTjQ9pcRUivNnOr68V7xsObysPxbpahemxY42HT21XkFXuPUY9arjyBIs wq8cj/sdA3mESFX77AMHL+KQk9lO2eM9VmM95pqg/b6r8OwKHSojnlB8X8Ib1tWaCnBK 188BvUxDPJMNRV/GaFYK8OkJ8BfB36SxpRNwPOWVyQF6FAKFmgSxxYcVngLSmV8oqeZo oma1fNtVH8OSzHq06K6OCulO/jPn0OcDE5f0tie60p4SGnvCIshJ3wjZDyoxAgoTCKe9 2zpmcq0U3BebET4HwGdhFdTqjEURvjJ0Sd5B6VJt9rE1tntWSqQo01G2ioKP0ygvjQSx l3LA== MIME-Version: 1.0 Sender: guillaume.ow2@gmail.com In-Reply-To: References: <4F9953D4-0C1C-48B7-B14E-900B67604408@gmail.com> <97C6E57B-5F98-4C4F-9FAB-58759A47B49B@gmail.com> Date: Thu, 12 Apr 2012 09:53:21 +0200 X-Google-Sender-Auth: nFZuNfwI_58yvY8kcn45NZ5cj7I Message-ID: Subject: Re: IPojo manipulated bundle not synched with project folder contents From: "Guillaume Sauthier (Objectweb)" To: users@felix.apache.org Content-Type: multipart/alternative; boundary=f46d043892ab5473bc04bd76a641 --f46d043892ab5473bc04bd76a641 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable What about using the ipojo-bnd-plugin (there is a recent thread on users@felix with configuration details) ? It directly executes iPOJO manipulation inside the maven-bundle-plugin, so it follow the behavior dictated by the bnd configuration. --G 2012/4/11 G=F6kt=FCrk Gezer > Hi Clement, > > > > > Question is, in which shape we should integrate that facility into > maven > > > build: > > > * A new goal for directoryManipulation for use in 'compile' phase > > > * A new boolean property for ipojo-bundle goal to unpack manipulated > > > content into project folder > > > * Modification of current mojo to also accept directory paths as > > > manipulation candidate > > > * Or combination of above approaches, > > > > > > > So, I will eliminate 2 because of the overhead. I would be in favor of = 1 > > because you don't actually have to package the bundle to get it to work= , > > however it requires the manifest to be updated too. I'm not sure that > this > > is actually possible. > > > I reconsidered the option-1 today and yeah, it seems non-trivial just > inside maven-ipojo-plugin. But i've managed to implement the option-1 tha= t > way: > > *Created a new goal "ipojo-manipulate" in "process-classes" phase, which > extends maven-bundle-plugin's "manifest" goal. Plugin property propagatio= n > is managed by maven-inherit-plugin added to parent pom. > *As i see maven-ipojo-plugin is beeing used with maven-bundle-plugin > generally. So i read the maven-bundle-plugin configuration in pom.xml > inside "ipojo-manipulate" mojo to issue a MANIFEST file generation. > If pom.xml does not contain maven-bundle-plugin instructions then MANIFES= T > is generated with default values by bnd. > *Then manipulate the class contents and MANIFEST file using > directoryManipulation(); > > In my experiments, manipulated contents and MANIFEST work just fine after > maven-bundle-plugin:bundle without maven-ipojo-plugin:ipojo-bundle after > packaging. > > When configured correctly with m2e plugin, i believe that this new goal c= an > replace ipojo-ant task inside eclipse. But i don't know it for sure, didn= 't > tried it yet, since i don't know how m2e's MavenBuilder works internally. > > One problem with the implementation comes from > DirectoryResourceStore.open() method, since it is writing manipulated > MANIFEST to a fixed location rather then altering given MANIFEST. So i > added a additional field to DirectoryResourceStore to keep MANIFEST file'= s > path, then used it. However i don't know if i'm breaking some intended > behavior here? > > Please let me know WDYT about that approach in theory ... > > From my favorite to less favorite: 1 - 3 - 2. > > > > Regards, > > > > Clement > > > > > --f46d043892ab5473bc04bd76a641--