You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Göktürk Gezer <go...@apache.org> on 2012/04/04 16:06:58 UTC

IPojo manipulated bundle not synched with project folder contents

Hi Everyone,

We're using IPojo inside some Eclipse Plugin project for Eclipse itself.

Problem is:

IPojo manipulates the classes and generate new MANIFEST.MF file with
IPojo-Components contents. No problem with generated bundle but while
debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/ directory
and also loads the classes in [PROJECT]/target/classes which is default
behaviour. So clearly the problem is, these two aspects are not synched
with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
classes are loaded into Equinox.

I have to manually change those things for our plugins to work correctly
inside Eclipse, which is not an acceptable solution. I would like to know
if there is some sophisticated method to handle these issues.

Regards,
Gokturk

Re: IPojo manipulated bundle not synched with project folder contents

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
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öktürk Gezer <go...@gmail.com>

> 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 that
> way:
>
> *Created a new goal "ipojo-manipulate" in "process-classes" phase, which
> extends maven-bundle-plugin's "manifest" goal. Plugin property propagation
> 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 MANIFEST
> 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 can
> 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
> >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@apache.org>.
Sorry for late reply !

On Thu, Apr 12, 2012 at 5:20 PM, Guillaume Sauthier (OW2/GMail) <
guillaume.ow2@gmail.com> wrote:

> So, the solution with bnd-plugin is OK for you ?
>
Yeah i guess i can live without it .

> It feels easier than modifying the maven-ipojo-plugin ...
>
That's right.

> --G
>
> 2012/4/12 Göktürk Gezer <go...@gmail.com>
>
> > On Thu, Apr 12, 2012 at 12:28 PM, Guillaume Sauthier (Objectweb) <
> > guillaume.sauthier@objectweb.org> wrote:
> >
> > > 2012/4/12 Göktürk Gezer <go...@gmail.com>
> > >
> > > > Hi,
> > > >
> > > > On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> > > > guillaume.sauthier@objectweb.org> wrote:
> > > >
> > > > > Yes, the DirectoryResourceStore is extensible.
> > > > > I'm just wondering if we cannot achieve the same goal in an easier
> > way.
> > > > >
> > > > > What do you think of executing the maven-bundle-plugin's "manifest"
> > > goal
> > > > > with the ipojo-bnd-plugin activated ?
> > > > >
> > > > I didn't have a look at the ipojo-bnd-plugin yet. But definetely it
> > > should
> > > > be considered. I just focused on maven-ipojo-plugin first.
> > > >
> > >
> > > For me, modifying the Store for a new usage of maven-ipojo-plugin when
> > the
> > > same goal could be achieved with a combination of existing
> > > maven-bundle-plugin + ipojo-bnd-plugin is some kind of duplicate effort
> > ...
> > >
> >
> > It is just an option. So much like an experiment.
> >
> > However they are not doing the same thing. Main point was to manipulate
> the
> > classes and generate the MANIFEST correctly at "compile" time, and it
> does
> > that. If the same thing could be achieved with ipojo_bnd_plugin in
> > bundle@manifest goal, that would be a better solution for sure.
> >
> >
> > >
> > > >
> > > > > I tried that on a simple example, and I obtained a manipulated
> > manifest
> > > > in
> > > > > the defined directory...
> > > > >
> > > > Is this also manipulated the classes?
> > > >
> > >
> > > maven-bundle-plugin@manifest only generates the manifest in a
> dedicated
> > > directory.
> > > The bnd-plugin manipulates the component's classes, but this goal is
> > > designed not to produce any bytecode, so no manipulated bytecode
> here...
> > >
> > > Anyway, if you use the maven-bundle-plugin@bundle goal, with the
> > > "manifestLocation" configuration, you get both the manipulated bundle
> > > content AND the manipulated MANIFEST written in the location of your
> > > choice.
> > >
> >
> > Yes i confirm, above usage with <unpackBundle> works to update project
> > folder after packaging.
> >
> >
> > > --G
> > >
> > >
> > > >
> > > > >
> > > > > here is my plugin configuration:
> > > > >
> > > > >      <plugin>
> > > > >        <groupId>org.apache.felix</groupId>
> > > > >        <artifactId>maven-bundle-plugin</artifactId>
> > > > >        <version>2.3.7</version>
> > > > >        <extensions>true</extensions>
> > > > >        <executions>
> > > > >          <execution>
> > > > >            <id>generate-bundle-manifest</id>
> > > > >            <goals>
> > > > >              <goal>manifest</goal>
> > > > >            </goals>
> > > > >            <configuration>
> > > > >              <instructions>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> > > > >              </instructions>
> > > > >              <manifestLocation>target/manifest</manifestLocation>
> > > > >            </configuration>
> > > > >          </execution>
> > > > >        </executions>
> > > > >       <dependencies>
> > > > >        <dependency>
> > > > >          <groupId>org.apache.felix</groupId>
> > > > >          <artifactId>bnd-ipojo-plugin</artifactId>
> > > > >          <version>1.8.4</version>
> > > > >        </dependency>
> > > > >      </dependencies>
> > > > >      </plugin>
> > > > >
> > > > >
> > > > > Hope that helps
> > > > > --G
> > > > >
> > > > Regards,
> > > > Gokturk
> > > >
> > > > >
> > > > >
> > > > > 2012/4/12 Clement Escoffier <cl...@gmail.com>
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> > > > > >
> > > > > > > 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
> > > > > > that
> > > > > > > way:
> > > > > > >
> > > > > > > *Created a new goal "ipojo-manipulate" in "process-classes"
> > phase,
> > > > > which
> > > > > > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > > > > > propagation
> > > > > > > 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
> > > > > > MANIFEST
> > > > > > > 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
> > > > > > can
> > > > > > > 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 …
> > > > > >
> > > > > > The DirectoryResourceStore is definitely extendible. Guillaume
> has
> > > > > > probably a better idea about it. But anyway, it looks really
> cool !
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > Clement
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > From my favorite to less favorite:  1 - 3 - 2.
> > > > > > >
> > > > > > >
> > > > > > >> Regards,
> > > > > > >>
> > > > > > >> Clement
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > > > For additional commands, e-mail: users-help@felix.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by "Guillaume Sauthier (OW2/GMail)" <gu...@gmail.com>.
So, the solution with bnd-plugin is OK for you ?
It feels easier than modifying the maven-ipojo-plugin ...
--G

2012/4/12 Göktürk Gezer <go...@gmail.com>

> On Thu, Apr 12, 2012 at 12:28 PM, Guillaume Sauthier (Objectweb) <
> guillaume.sauthier@objectweb.org> wrote:
>
> > 2012/4/12 Göktürk Gezer <go...@gmail.com>
> >
> > > Hi,
> > >
> > > On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> > > guillaume.sauthier@objectweb.org> wrote:
> > >
> > > > Yes, the DirectoryResourceStore is extensible.
> > > > I'm just wondering if we cannot achieve the same goal in an easier
> way.
> > > >
> > > > What do you think of executing the maven-bundle-plugin's "manifest"
> > goal
> > > > with the ipojo-bnd-plugin activated ?
> > > >
> > > I didn't have a look at the ipojo-bnd-plugin yet. But definetely it
> > should
> > > be considered. I just focused on maven-ipojo-plugin first.
> > >
> >
> > For me, modifying the Store for a new usage of maven-ipojo-plugin when
> the
> > same goal could be achieved with a combination of existing
> > maven-bundle-plugin + ipojo-bnd-plugin is some kind of duplicate effort
> ...
> >
>
> It is just an option. So much like an experiment.
>
> However they are not doing the same thing. Main point was to manipulate the
> classes and generate the MANIFEST correctly at "compile" time, and it does
> that. If the same thing could be achieved with ipojo_bnd_plugin in
> bundle@manifest goal, that would be a better solution for sure.
>
>
> >
> > >
> > > > I tried that on a simple example, and I obtained a manipulated
> manifest
> > > in
> > > > the defined directory...
> > > >
> > > Is this also manipulated the classes?
> > >
> >
> > maven-bundle-plugin@manifest only generates the manifest in a dedicated
> > directory.
> > The bnd-plugin manipulates the component's classes, but this goal is
> > designed not to produce any bytecode, so no manipulated bytecode here...
> >
> > Anyway, if you use the maven-bundle-plugin@bundle goal, with the
> > "manifestLocation" configuration, you get both the manipulated bundle
> > content AND the manipulated MANIFEST written in the location of your
> > choice.
> >
>
> Yes i confirm, above usage with <unpackBundle> works to update project
> folder after packaging.
>
>
> > --G
> >
> >
> > >
> > > >
> > > > here is my plugin configuration:
> > > >
> > > >      <plugin>
> > > >        <groupId>org.apache.felix</groupId>
> > > >        <artifactId>maven-bundle-plugin</artifactId>
> > > >        <version>2.3.7</version>
> > > >        <extensions>true</extensions>
> > > >        <executions>
> > > >          <execution>
> > > >            <id>generate-bundle-manifest</id>
> > > >            <goals>
> > > >              <goal>manifest</goal>
> > > >            </goals>
> > > >            <configuration>
> > > >              <instructions>
> > > >
> > > >
> > > >
> > >
> >
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> > > >              </instructions>
> > > >              <manifestLocation>target/manifest</manifestLocation>
> > > >            </configuration>
> > > >          </execution>
> > > >        </executions>
> > > >       <dependencies>
> > > >        <dependency>
> > > >          <groupId>org.apache.felix</groupId>
> > > >          <artifactId>bnd-ipojo-plugin</artifactId>
> > > >          <version>1.8.4</version>
> > > >        </dependency>
> > > >      </dependencies>
> > > >      </plugin>
> > > >
> > > >
> > > > Hope that helps
> > > > --G
> > > >
> > > Regards,
> > > Gokturk
> > >
> > > >
> > > >
> > > > 2012/4/12 Clement Escoffier <cl...@gmail.com>
> > > >
> > > > > Hi,
> > > > >
> > > > > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> > > > >
> > > > > > 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
> > > > > that
> > > > > > way:
> > > > > >
> > > > > > *Created a new goal "ipojo-manipulate" in "process-classes"
> phase,
> > > > which
> > > > > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > > > > propagation
> > > > > > 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
> > > > > MANIFEST
> > > > > > 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
> > > > > can
> > > > > > 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 …
> > > > >
> > > > > The DirectoryResourceStore is definitely extendible. Guillaume has
> > > > > probably a better idea about it. But anyway, it looks really cool !
> > > > >
> > > > > Regards,
> > > > >
> > > > > Clement
> > > > >
> > > > >
> > > > > >
> > > > > > From my favorite to less favorite:  1 - 3 - 2.
> > > > > >
> > > > > >
> > > > > >> Regards,
> > > > > >>
> > > > > >> Clement
> > > > > >>
> > > > > >>
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > > For additional commands, e-mail: users-help@felix.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
On Thu, Apr 12, 2012 at 12:28 PM, Guillaume Sauthier (Objectweb) <
guillaume.sauthier@objectweb.org> wrote:

> 2012/4/12 Göktürk Gezer <go...@gmail.com>
>
> > Hi,
> >
> > On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> > guillaume.sauthier@objectweb.org> wrote:
> >
> > > Yes, the DirectoryResourceStore is extensible.
> > > I'm just wondering if we cannot achieve the same goal in an easier way.
> > >
> > > What do you think of executing the maven-bundle-plugin's "manifest"
> goal
> > > with the ipojo-bnd-plugin activated ?
> > >
> > I didn't have a look at the ipojo-bnd-plugin yet. But definetely it
> should
> > be considered. I just focused on maven-ipojo-plugin first.
> >
>
> For me, modifying the Store for a new usage of maven-ipojo-plugin when the
> same goal could be achieved with a combination of existing
> maven-bundle-plugin + ipojo-bnd-plugin is some kind of duplicate effort ...
>

It is just an option. So much like an experiment.

However they are not doing the same thing. Main point was to manipulate the
classes and generate the MANIFEST correctly at "compile" time, and it does
that. If the same thing could be achieved with ipojo_bnd_plugin in
bundle@manifest goal, that would be a better solution for sure.


>
> >
> > > I tried that on a simple example, and I obtained a manipulated manifest
> > in
> > > the defined directory...
> > >
> > Is this also manipulated the classes?
> >
>
> maven-bundle-plugin@manifest only generates the manifest in a dedicated
> directory.
> The bnd-plugin manipulates the component's classes, but this goal is
> designed not to produce any bytecode, so no manipulated bytecode here...
>
> Anyway, if you use the maven-bundle-plugin@bundle goal, with the
> "manifestLocation" configuration, you get both the manipulated bundle
> content AND the manipulated MANIFEST written in the location of your
> choice.
>

Yes i confirm, above usage with <unpackBundle> works to update project
folder after packaging.


> --G
>
>
> >
> > >
> > > here is my plugin configuration:
> > >
> > >      <plugin>
> > >        <groupId>org.apache.felix</groupId>
> > >        <artifactId>maven-bundle-plugin</artifactId>
> > >        <version>2.3.7</version>
> > >        <extensions>true</extensions>
> > >        <executions>
> > >          <execution>
> > >            <id>generate-bundle-manifest</id>
> > >            <goals>
> > >              <goal>manifest</goal>
> > >            </goals>
> > >            <configuration>
> > >              <instructions>
> > >
> > >
> > >
> >
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> > >              </instructions>
> > >              <manifestLocation>target/manifest</manifestLocation>
> > >            </configuration>
> > >          </execution>
> > >        </executions>
> > >       <dependencies>
> > >        <dependency>
> > >          <groupId>org.apache.felix</groupId>
> > >          <artifactId>bnd-ipojo-plugin</artifactId>
> > >          <version>1.8.4</version>
> > >        </dependency>
> > >      </dependencies>
> > >      </plugin>
> > >
> > >
> > > Hope that helps
> > > --G
> > >
> > Regards,
> > Gokturk
> >
> > >
> > >
> > > 2012/4/12 Clement Escoffier <cl...@gmail.com>
> > >
> > > > Hi,
> > > >
> > > > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> > > >
> > > > > 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
> > > > that
> > > > > way:
> > > > >
> > > > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
> > > which
> > > > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > > > propagation
> > > > > 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
> > > > MANIFEST
> > > > > 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
> > > > can
> > > > > 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 …
> > > >
> > > > The DirectoryResourceStore is definitely extendible. Guillaume has
> > > > probably a better idea about it. But anyway, it looks really cool !
> > > >
> > > > Regards,
> > > >
> > > > Clement
> > > >
> > > >
> > > > >
> > > > > From my favorite to less favorite:  1 - 3 - 2.
> > > > >
> > > > >
> > > > >> Regards,
> > > > >>
> > > > >> Clement
> > > > >>
> > > > >>
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > For additional commands, e-mail: users-help@felix.apache.org
> > > >
> > > >
> > >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
2012/4/12 Göktürk Gezer <go...@gmail.com>

> Hi,
>
> On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> guillaume.sauthier@objectweb.org> wrote:
>
> > Yes, the DirectoryResourceStore is extensible.
> > I'm just wondering if we cannot achieve the same goal in an easier way.
> >
> > What do you think of executing the maven-bundle-plugin's "manifest" goal
> > with the ipojo-bnd-plugin activated ?
> >
> I didn't have a look at the ipojo-bnd-plugin yet. But definetely it should
> be considered. I just focused on maven-ipojo-plugin first.
>

For me, modifying the Store for a new usage of maven-ipojo-plugin when the
same goal could be achieved with a combination of existing
maven-bundle-plugin + ipojo-bnd-plugin is some kind of duplicate effort ...


>
> > I tried that on a simple example, and I obtained a manipulated manifest
> in
> > the defined directory...
> >
> Is this also manipulated the classes?
>

maven-bundle-plugin@manifest only generates the manifest in a dedicated
directory.
The bnd-plugin manipulates the component's classes, but this goal is
designed not to produce any bytecode, so no manipulated bytecode here...

Anyway, if you use the maven-bundle-plugin@bundle goal, with the
"manifestLocation" configuration, you get both the manipulated bundle
content AND the manipulated MANIFEST written in the location of your choice.

--G


>
> >
> > here is my plugin configuration:
> >
> >      <plugin>
> >        <groupId>org.apache.felix</groupId>
> >        <artifactId>maven-bundle-plugin</artifactId>
> >        <version>2.3.7</version>
> >        <extensions>true</extensions>
> >        <executions>
> >          <execution>
> >            <id>generate-bundle-manifest</id>
> >            <goals>
> >              <goal>manifest</goal>
> >            </goals>
> >            <configuration>
> >              <instructions>
> >
> >
> >
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> >              </instructions>
> >              <manifestLocation>target/manifest</manifestLocation>
> >            </configuration>
> >          </execution>
> >        </executions>
> >       <dependencies>
> >        <dependency>
> >          <groupId>org.apache.felix</groupId>
> >          <artifactId>bnd-ipojo-plugin</artifactId>
> >          <version>1.8.4</version>
> >        </dependency>
> >      </dependencies>
> >      </plugin>
> >
> >
> > Hope that helps
> > --G
> >
> Regards,
> Gokturk
>
> >
> >
> > 2012/4/12 Clement Escoffier <cl...@gmail.com>
> >
> > > Hi,
> > >
> > > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> > >
> > > > 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
> > > that
> > > > way:
> > > >
> > > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
> > which
> > > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > > propagation
> > > > 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
> > > MANIFEST
> > > > 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
> > > can
> > > > 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 …
> > >
> > > The DirectoryResourceStore is definitely extendible. Guillaume has
> > > probably a better idea about it. But anyway, it looks really cool !
> > >
> > > Regards,
> > >
> > > Clement
> > >
> > >
> > > >
> > > > From my favorite to less favorite:  1 - 3 - 2.
> > > >
> > > >
> > > >> Regards,
> > > >>
> > > >> Clement
> > > >>
> > > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > For additional commands, e-mail: users-help@felix.apache.org
> > >
> > >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
On Thu, Apr 12, 2012 at 2:17 PM, Guillaume Sauthier (Objectweb) <
guillaume.sauthier@objectweb.org> wrote:

> If you want the classes of the bundle to be placed in the target/classes
> directory, you have to use the <unpackBundle> configuration option.


> That should do the trick for you, right ?
>
Yeah it should have and i tried it already, but it didn't work for some
reason. Maybe i'm doing something wrong !

> --G
>
> 2012/4/12 Göktürk Gezer <go...@gmail.com>
>
> > Hi Guillaume,
> >
> > I looked further into it and, unfortunately it is not manipulating the
> > classes. But it is a more polished approach.
> >
> > I'll look into ipojo-bnd-plugin to see if its possible. More pointers are
> > welcomed.
> >
> > Regards,
> > Gokturk
> >
> > On Thu, Apr 12, 2012 at 12:02 PM, Göktürk Gezer <gokturk.gezer@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> > > guillaume.sauthier@objectweb.org> wrote:
> > >
> > >> Yes, the DirectoryResourceStore is extensible.
> > >> I'm just wondering if we cannot achieve the same goal in an easier
> way.
> > >>
> > >> What do you think of executing the maven-bundle-plugin's "manifest"
> goal
> > >> with the ipojo-bnd-plugin activated ?
> > >>
> > > I didn't have a look at the ipojo-bnd-plugin yet. But definetely it
> > should
> > > be considered. I just focused on maven-ipojo-plugin first.
> > >
> > >> I tried that on a simple example, and I obtained a manipulated
> manifest
> > in
> > >> the defined directory...
> > >>
> > > Is this also manipulated the classes?
> > >
> > >>
> > >> here is my plugin configuration:
> > >>
> > >>      <plugin>
> > >>        <groupId>org.apache.felix</groupId>
> > >>        <artifactId>maven-bundle-plugin</artifactId>
> > >>        <version>2.3.7</version>
> > >>        <extensions>true</extensions>
> > >>        <executions>
> > >>          <execution>
> > >>            <id>generate-bundle-manifest</id>
> > >>            <goals>
> > >>              <goal>manifest</goal>
> > >>            </goals>
> > >>            <configuration>
> > >>              <instructions>
> > >>
> > >>
> > >>
> >
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> > >>              </instructions>
> > >>              <manifestLocation>target/manifest</manifestLocation>
> > >>            </configuration>
> > >>          </execution>
> > >>        </executions>
> > >>       <dependencies>
> > >>        <dependency>
> > >>          <groupId>org.apache.felix</groupId>
> > >>          <artifactId>bnd-ipojo-plugin</artifactId>
> > >>          <version>1.8.4</version>
> > >>        </dependency>
> > >>      </dependencies>
> > >>      </plugin>
> > >>
> > >>
> > >> Hope that helps
> > >> --G
> > >>
> > > Regards,
> > > Gokturk
> > >
> > >>
> > >>
> > >> 2012/4/12 Clement Escoffier <cl...@gmail.com>
> > >>
> > >> > Hi,
> > >> >
> > >> > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> > >> >
> > >> > > 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
> > >> > that
> > >> > > way:
> > >> > >
> > >> > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
> > >> which
> > >> > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > >> > propagation
> > >> > > 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
> > >> > MANIFEST
> > >> > > 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
> > >> > can
> > >> > > 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 …
> > >> >
> > >> > The DirectoryResourceStore is definitely extendible. Guillaume has
> > >> > probably a better idea about it. But anyway, it looks really cool !
> > >> >
> > >> > Regards,
> > >> >
> > >> > Clement
> > >> >
> > >> >
> > >> > >
> > >> > > From my favorite to less favorite:  1 - 3 - 2.
> > >> > >
> > >> > >
> > >> > >> Regards,
> > >> > >>
> > >> > >> Clement
> > >> > >>
> > >> > >>
> > >> >
> > >> >
> > >> >
> ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >> > For additional commands, e-mail: users-help@felix.apache.org
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
If you want the classes of the bundle to be placed in the target/classes
directory, you have to use the <unpackBundle> configuration option.

That should do the trick for you, right ?
--G

2012/4/12 Göktürk Gezer <go...@gmail.com>

> Hi Guillaume,
>
> I looked further into it and, unfortunately it is not manipulating the
> classes. But it is a more polished approach.
>
> I'll look into ipojo-bnd-plugin to see if its possible. More pointers are
> welcomed.
>
> Regards,
> Gokturk
>
> On Thu, Apr 12, 2012 at 12:02 PM, Göktürk Gezer <gokturk.gezer@gmail.com
> >wrote:
>
> > Hi,
> >
> > On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> > guillaume.sauthier@objectweb.org> wrote:
> >
> >> Yes, the DirectoryResourceStore is extensible.
> >> I'm just wondering if we cannot achieve the same goal in an easier way.
> >>
> >> What do you think of executing the maven-bundle-plugin's "manifest" goal
> >> with the ipojo-bnd-plugin activated ?
> >>
> > I didn't have a look at the ipojo-bnd-plugin yet. But definetely it
> should
> > be considered. I just focused on maven-ipojo-plugin first.
> >
> >> I tried that on a simple example, and I obtained a manipulated manifest
> in
> >> the defined directory...
> >>
> > Is this also manipulated the classes?
> >
> >>
> >> here is my plugin configuration:
> >>
> >>      <plugin>
> >>        <groupId>org.apache.felix</groupId>
> >>        <artifactId>maven-bundle-plugin</artifactId>
> >>        <version>2.3.7</version>
> >>        <extensions>true</extensions>
> >>        <executions>
> >>          <execution>
> >>            <id>generate-bundle-manifest</id>
> >>            <goals>
> >>              <goal>manifest</goal>
> >>            </goals>
> >>            <configuration>
> >>              <instructions>
> >>
> >>
> >>
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
> >>              </instructions>
> >>              <manifestLocation>target/manifest</manifestLocation>
> >>            </configuration>
> >>          </execution>
> >>        </executions>
> >>       <dependencies>
> >>        <dependency>
> >>          <groupId>org.apache.felix</groupId>
> >>          <artifactId>bnd-ipojo-plugin</artifactId>
> >>          <version>1.8.4</version>
> >>        </dependency>
> >>      </dependencies>
> >>      </plugin>
> >>
> >>
> >> Hope that helps
> >> --G
> >>
> > Regards,
> > Gokturk
> >
> >>
> >>
> >> 2012/4/12 Clement Escoffier <cl...@gmail.com>
> >>
> >> > Hi,
> >> >
> >> > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> >> >
> >> > > 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
> >> > that
> >> > > way:
> >> > >
> >> > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
> >> which
> >> > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> >> > propagation
> >> > > 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
> >> > MANIFEST
> >> > > 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
> >> > can
> >> > > 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 …
> >> >
> >> > The DirectoryResourceStore is definitely extendible. Guillaume has
> >> > probably a better idea about it. But anyway, it looks really cool !
> >> >
> >> > Regards,
> >> >
> >> > Clement
> >> >
> >> >
> >> > >
> >> > > From my favorite to less favorite:  1 - 3 - 2.
> >> > >
> >> > >
> >> > >> Regards,
> >> > >>
> >> > >> Clement
> >> > >>
> >> > >>
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> > For additional commands, e-mail: users-help@felix.apache.org
> >> >
> >> >
> >>
> >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi Guillaume,

I looked further into it and, unfortunately it is not manipulating the
classes. But it is a more polished approach.

I'll look into ipojo-bnd-plugin to see if its possible. More pointers are
welcomed.

Regards,
Gokturk

On Thu, Apr 12, 2012 at 12:02 PM, Göktürk Gezer <go...@gmail.com>wrote:

> Hi,
>
> On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
> guillaume.sauthier@objectweb.org> wrote:
>
>> Yes, the DirectoryResourceStore is extensible.
>> I'm just wondering if we cannot achieve the same goal in an easier way.
>>
>> What do you think of executing the maven-bundle-plugin's "manifest" goal
>> with the ipojo-bnd-plugin activated ?
>>
> I didn't have a look at the ipojo-bnd-plugin yet. But definetely it should
> be considered. I just focused on maven-ipojo-plugin first.
>
>> I tried that on a simple example, and I obtained a manipulated manifest in
>> the defined directory...
>>
> Is this also manipulated the classes?
>
>>
>> here is my plugin configuration:
>>
>>      <plugin>
>>        <groupId>org.apache.felix</groupId>
>>        <artifactId>maven-bundle-plugin</artifactId>
>>        <version>2.3.7</version>
>>        <extensions>true</extensions>
>>        <executions>
>>          <execution>
>>            <id>generate-bundle-manifest</id>
>>            <goals>
>>              <goal>manifest</goal>
>>            </goals>
>>            <configuration>
>>              <instructions>
>>
>>
>>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
>>              </instructions>
>>              <manifestLocation>target/manifest</manifestLocation>
>>            </configuration>
>>          </execution>
>>        </executions>
>>       <dependencies>
>>        <dependency>
>>          <groupId>org.apache.felix</groupId>
>>          <artifactId>bnd-ipojo-plugin</artifactId>
>>          <version>1.8.4</version>
>>        </dependency>
>>      </dependencies>
>>      </plugin>
>>
>>
>> Hope that helps
>> --G
>>
> Regards,
> Gokturk
>
>>
>>
>> 2012/4/12 Clement Escoffier <cl...@gmail.com>
>>
>> > Hi,
>> >
>> > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
>> >
>> > > 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
>> > that
>> > > way:
>> > >
>> > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
>> which
>> > > extends maven-bundle-plugin's "manifest" goal. Plugin property
>> > propagation
>> > > 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
>> > MANIFEST
>> > > 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
>> > can
>> > > 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 …
>> >
>> > The DirectoryResourceStore is definitely extendible. Guillaume has
>> > probably a better idea about it. But anyway, it looks really cool !
>> >
>> > Regards,
>> >
>> > Clement
>> >
>> >
>> > >
>> > > From my favorite to less favorite:  1 - 3 - 2.
>> > >
>> > >
>> > >> Regards,
>> > >>
>> > >> Clement
>> > >>
>> > >>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> > For additional commands, e-mail: users-help@felix.apache.org
>> >
>> >
>>
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi,

On Thu, Apr 12, 2012 at 11:50 AM, Guillaume Sauthier (Objectweb) <
guillaume.sauthier@objectweb.org> wrote:

> Yes, the DirectoryResourceStore is extensible.
> I'm just wondering if we cannot achieve the same goal in an easier way.
>
> What do you think of executing the maven-bundle-plugin's "manifest" goal
> with the ipojo-bnd-plugin activated ?
>
I didn't have a look at the ipojo-bnd-plugin yet. But definetely it should
be considered. I just focused on maven-ipojo-plugin first.

> I tried that on a simple example, and I obtained a manipulated manifest in
> the defined directory...
>
Is this also manipulated the classes?

>
> here is my plugin configuration:
>
>      <plugin>
>        <groupId>org.apache.felix</groupId>
>        <artifactId>maven-bundle-plugin</artifactId>
>        <version>2.3.7</version>
>        <extensions>true</extensions>
>        <executions>
>          <execution>
>            <id>generate-bundle-manifest</id>
>            <goals>
>              <goal>manifest</goal>
>            </goals>
>            <configuration>
>              <instructions>
>
>
>  <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
>              </instructions>
>              <manifestLocation>target/manifest</manifestLocation>
>            </configuration>
>          </execution>
>        </executions>
>       <dependencies>
>        <dependency>
>          <groupId>org.apache.felix</groupId>
>          <artifactId>bnd-ipojo-plugin</artifactId>
>          <version>1.8.4</version>
>        </dependency>
>      </dependencies>
>      </plugin>
>
>
> Hope that helps
> --G
>
Regards,
Gokturk

>
>
> 2012/4/12 Clement Escoffier <cl...@gmail.com>
>
> > Hi,
> >
> > On 11.04.2012, at 18:31, Göktürk Gezer wrote:
> >
> > > 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
> > that
> > > way:
> > >
> > > *Created a new goal "ipojo-manipulate" in "process-classes" phase,
> which
> > > extends maven-bundle-plugin's "manifest" goal. Plugin property
> > propagation
> > > 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
> > MANIFEST
> > > 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
> > can
> > > 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 …
> >
> > The DirectoryResourceStore is definitely extendible. Guillaume has
> > probably a better idea about it. But anyway, it looks really cool !
> >
> > Regards,
> >
> > Clement
> >
> >
> > >
> > > From my favorite to less favorite:  1 - 3 - 2.
> > >
> > >
> > >> Regards,
> > >>
> > >> Clement
> > >>
> > >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Yes, the DirectoryResourceStore is extensible.
I'm just wondering if we cannot achieve the same goal in an easier way.

What do you think of executing the maven-bundle-plugin's "manifest" goal
with the ipojo-bnd-plugin activated ?
I tried that on a simple example, and I obtained a manipulated manifest in
the defined directory...

here is my plugin configuration:

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>generate-bundle-manifest</id>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <instructions>

 <_plugin>org.apache.felix.ipojo.bnd.PojoizationPlugin;use-local-schemas=true</_plugin>
              </instructions>
              <manifestLocation>target/manifest</manifestLocation>
            </configuration>
          </execution>
        </executions>
       <dependencies>
        <dependency>
          <groupId>org.apache.felix</groupId>
          <artifactId>bnd-ipojo-plugin</artifactId>
          <version>1.8.4</version>
        </dependency>
      </dependencies>
      </plugin>


Hope that helps
--G


2012/4/12 Clement Escoffier <cl...@gmail.com>

> Hi,
>
> On 11.04.2012, at 18:31, Göktürk Gezer wrote:
>
> > 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
> that
> > way:
> >
> > *Created a new goal "ipojo-manipulate" in "process-classes" phase, which
> > extends maven-bundle-plugin's "manifest" goal. Plugin property
> propagation
> > 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
> MANIFEST
> > 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
> can
> > 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 …
>
> The DirectoryResourceStore is definitely extendible. Guillaume has
> probably a better idea about it. But anyway, it looks really cool !
>
> Regards,
>
> Clement
>
>
> >
> > From my favorite to less favorite:  1 - 3 - 2.
> >
> >
> >> Regards,
> >>
> >> Clement
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi,

On Thu, Apr 12, 2012 at 11:25 AM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
> On 11.04.2012, at 18:31, Göktürk Gezer wrote:
>
> > 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
> that
> > way:
> >
> > *Created a new goal "ipojo-manipulate" in "process-classes" phase, which
> > extends maven-bundle-plugin's "manifest" goal. Plugin property
> propagation
> > 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
> MANIFEST
> > 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
> can
> > 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 …
>
> The DirectoryResourceStore is definitely extendible. Guillaume has
> probably a better idea about it. But anyway, it looks really cool !
>

I attached the patch in jira.

With this patch:

<plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-ipojo-plugin</artifactId>
        <version>1.9.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>ipojo-directory-manipulation</id>
            <phase>compile</phase>
            <goals>
              <goal>ipojo-manipulate</goal>
            </goals>
            <configuration>
              <manifestLocation>META-INF</manifestLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>

that definition along with the maven-bundle-plugin definition will generate
the MANIFEST and manipulate the classes in "mvn compile". Clients can
specify manifestLocation in both maven-bundle-plugin and maven-ipojo-plugin
to let them be the same location at their will.

>
> Regards,
>
> Clement
>
>
> >
> > From my favorite to less favorite:  1 - 3 - 2.
> >
> >
> >> Regards,
> >>
> >> Clement
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

On 11.04.2012, at 18:31, Göktürk Gezer wrote:

> 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 that
> way:
> 
> *Created a new goal "ipojo-manipulate" in "process-classes" phase, which
> extends maven-bundle-plugin's "manifest" goal. Plugin property propagation
> 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 MANIFEST
> 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 can
> 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 …

The DirectoryResourceStore is definitely extendible. Guillaume has probably a better idea about it. But anyway, it looks really cool !

Regards,

Clement


> 
> From my favorite to less favorite:  1 - 3 - 2.
> 
> 
>> Regards,
>> 
>> Clement
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
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 that
way:

*Created a new goal "ipojo-manipulate" in "process-classes" phase, which
extends maven-bundle-plugin's "manifest" goal. Plugin property propagation
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 MANIFEST
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 can
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
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

On 10.04.2012, at 16:18, Göktürk Gezer wrote:

> Hi,
> 
> On Tue, Apr 10, 2012 at 11:48 AM, Clement Escoffier <
> clement.escoffier@gmail.com> wrote:
> 
>> Hi,
>> 
>> On 07.04.2012, at 14:04, Göktürk Gezer wrote:
>> 
>>> Hi again,
>>> 
>>> I deployed external builders but, for %100 consistency with maven and
>>> eclipse, is it possible to instruct maven-ipojo-plugin to update manifest
>>> and classes in project foldet with manipulated versions during maven
>> build ?
>>> 
>> 
>> Unfortunately no. The maven-ipojo-plugin does not have the options to use
>> the directory manipulation. It can be a nice improvement.
>> 
> 
> Then let me create a jira for this and start working on it:
> https://issues.apache.org/jira/browse/FELIX-3452
> 

Cool !

> 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. 
From my favorite to less favorite:  1 - 3 - 2.

Regards,

Clement


> I'll be glad if you give me a pointers on how would you prefer it to be
> handled.
> 
> Regards,
> Gokturk
> 
> 
> 
>> Regards,
>> 
>> Clement
>> 
>>> Thanks,
>>> Göktürk
>>> On Apr 4, 2012 8:08 PM, "Clement Escoffier" <clement.escoffier@gmail.com
>>> 
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> You can plug an external builder using Ant doing the manipulation and
>> the
>>>> manifest change 'in-place'. So, every time you change something, the
>>>> builder call an Ant target (using the iPOJO Ant Task) and you get your
>> data
>>>> updated.
>>>> You can download the project template here:
>>>> 
>> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip
>>>> 
>>>> The page
>>>> 
>> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.htmlgivesyou some details.
>>>> 
>>>> Regards,
>>>> 
>>>> Clement
>>>> 
>>>> On 04.04.2012, at 16:06, Göktürk Gezer wrote:
>>>> 
>>>>> Hi Everyone,
>>>>> 
>>>>> We're using IPojo inside some Eclipse Plugin project for Eclipse
>> itself.
>>>>> 
>>>>> Problem is:
>>>>> 
>>>>> IPojo manipulates the classes and generate new MANIFEST.MF file with
>>>>> IPojo-Components contents. No problem with generated bundle but while
>>>>> debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/
>> directory
>>>>> and also loads the classes in [PROJECT]/target/classes which is default
>>>>> behaviour. So clearly the problem is, these two aspects are not synched
>>>>> with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
>>>>> classes are loaded into Equinox.
>>>>> 
>>>>> I have to manually change those things for our plugins to work
>> correctly
>>>>> inside Eclipse, which is not an acceptable solution. I would like to
>> know
>>>>> if there is some sophisticated method to handle these issues.
>>>>> 
>>>>> Regards,
>>>>> Gokturk
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi,

On Tue, Apr 10, 2012 at 11:48 AM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
> On 07.04.2012, at 14:04, Göktürk Gezer wrote:
>
> > Hi again,
> >
> > I deployed external builders but, for %100 consistency with maven and
> > eclipse, is it possible to instruct maven-ipojo-plugin to update manifest
> > and classes in project foldet with manipulated versions during maven
> build ?
> >
>
> Unfortunately no. The maven-ipojo-plugin does not have the options to use
> the directory manipulation. It can be a nice improvement.
>

Then let me create a jira for this and start working on it:
https://issues.apache.org/jira/browse/FELIX-3452

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,

I'll be glad if you give me a pointers on how would you prefer it to be
handled.

Regards,
Gokturk



> Regards,
>
> Clement
>
> > Thanks,
> > Göktürk
> > On Apr 4, 2012 8:08 PM, "Clement Escoffier" <clement.escoffier@gmail.com
> >
> > wrote:
> >
> >> Hi,
> >>
> >> You can plug an external builder using Ant doing the manipulation and
> the
> >> manifest change 'in-place'. So, every time you change something, the
> >> builder call an Ant target (using the iPOJO Ant Task) and you get your
> data
> >> updated.
> >> You can download the project template here:
> >>
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip
> >>
> >> The page
> >>
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.htmlgivesyou some details.
> >>
> >> Regards,
> >>
> >> Clement
> >>
> >> On 04.04.2012, at 16:06, Göktürk Gezer wrote:
> >>
> >>> Hi Everyone,
> >>>
> >>> We're using IPojo inside some Eclipse Plugin project for Eclipse
> itself.
> >>>
> >>> Problem is:
> >>>
> >>> IPojo manipulates the classes and generate new MANIFEST.MF file with
> >>> IPojo-Components contents. No problem with generated bundle but while
> >>> debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/
> directory
> >>> and also loads the classes in [PROJECT]/target/classes which is default
> >>> behaviour. So clearly the problem is, these two aspects are not synched
> >>> with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
> >>> classes are loaded into Equinox.
> >>>
> >>> I have to manually change those things for our plugins to work
> correctly
> >>> inside Eclipse, which is not an acceptable solution. I would like to
> know
> >>> if there is some sophisticated method to handle these issues.
> >>>
> >>> Regards,
> >>> Gokturk
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

On 07.04.2012, at 14:04, Göktürk Gezer wrote:

> Hi again,
> 
> I deployed external builders but, for %100 consistency with maven and
> eclipse, is it possible to instruct maven-ipojo-plugin to update manifest
> and classes in project foldet with manipulated versions during maven build ?
> 

Unfortunately no. The maven-ipojo-plugin does not have the options to use the directory manipulation. It can be a nice improvement.

Regards,

Clement

> Thanks,
> Göktürk
> On Apr 4, 2012 8:08 PM, "Clement Escoffier" <cl...@gmail.com>
> wrote:
> 
>> Hi,
>> 
>> You can plug an external builder using Ant doing the manipulation and the
>> manifest change 'in-place'. So, every time you change something, the
>> builder call an Ant target (using the iPOJO Ant Task) and you get your data
>> updated.
>> You can download the project template here:
>> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip
>> 
>> The page
>> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.htmlgives you some details.
>> 
>> Regards,
>> 
>> Clement
>> 
>> On 04.04.2012, at 16:06, Göktürk Gezer wrote:
>> 
>>> Hi Everyone,
>>> 
>>> We're using IPojo inside some Eclipse Plugin project for Eclipse itself.
>>> 
>>> Problem is:
>>> 
>>> IPojo manipulates the classes and generate new MANIFEST.MF file with
>>> IPojo-Components contents. No problem with generated bundle but while
>>> debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/ directory
>>> and also loads the classes in [PROJECT]/target/classes which is default
>>> behaviour. So clearly the problem is, these two aspects are not synched
>>> with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
>>> classes are loaded into Equinox.
>>> 
>>> I have to manually change those things for our plugins to work correctly
>>> inside Eclipse, which is not an acceptable solution. I would like to know
>>> if there is some sophisticated method to handle these issues.
>>> 
>>> Regards,
>>> Gokturk
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi again,

I deployed external builders but, for %100 consistency with maven and
eclipse, is it possible to instruct maven-ipojo-plugin to update manifest
and classes in project foldet with manipulated versions during maven build ?

Thanks,
Göktürk
On Apr 4, 2012 8:08 PM, "Clement Escoffier" <cl...@gmail.com>
wrote:

> Hi,
>
> You can plug an external builder using Ant doing the manipulation and the
> manifest change 'in-place'. So, every time you change something, the
> builder call an Ant target (using the iPOJO Ant Task) and you get your data
> updated.
> You can download the project template here:
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip
>
> The page
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.htmlgives you some details.
>
> Regards,
>
> Clement
>
> On 04.04.2012, at 16:06, Göktürk Gezer wrote:
>
> > Hi Everyone,
> >
> > We're using IPojo inside some Eclipse Plugin project for Eclipse itself.
> >
> > Problem is:
> >
> > IPojo manipulates the classes and generate new MANIFEST.MF file with
> > IPojo-Components contents. No problem with generated bundle but while
> > debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/ directory
> > and also loads the classes in [PROJECT]/target/classes which is default
> > behaviour. So clearly the problem is, these two aspects are not synched
> > with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
> > classes are loaded into Equinox.
> >
> > I have to manually change those things for our plugins to work correctly
> > inside Eclipse, which is not an acceptable solution. I would like to know
> > if there is some sophisticated method to handle these issues.
> >
> > Regards,
> > Gokturk
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Göktürk Gezer <go...@gmail.com>.
Hi Clement,

Thanks for the pointers.

Regards,
Gokturk

On Wed, Apr 4, 2012 at 8:08 PM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
> You can plug an external builder using Ant doing the manipulation and the
> manifest change 'in-place'. So, every time you change something, the
> builder call an Ant target (using the iPOJO Ant Task) and you get your data
> updated.
> You can download the project template here:
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip
>
> The page
> http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.htmlgives you some details.
>
> Regards,
>
> Clement
>
> On 04.04.2012, at 16:06, Göktürk Gezer wrote:
>
> > Hi Everyone,
> >
> > We're using IPojo inside some Eclipse Plugin project for Eclipse itself.
> >
> > Problem is:
> >
> > IPojo manipulates the classes and generate new MANIFEST.MF file with
> > IPojo-Components contents. No problem with generated bundle but while
> > debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/ directory
> > and also loads the classes in [PROJECT]/target/classes which is default
> > behaviour. So clearly the problem is, these two aspects are not synched
> > with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
> > classes are loaded into Equinox.
> >
> > I have to manually change those things for our plugins to work correctly
> > inside Eclipse, which is not an acceptable solution. I would like to know
> > if there is some sophisticated method to handle these issues.
> >
> > Regards,
> > Gokturk
>
>

Re: IPojo manipulated bundle not synched with project folder contents

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

You can plug an external builder using Ant doing the manipulation and the manifest change 'in-place'. So, every time you change something, the builder call an Ant target (using the iPOJO Ant Task) and you get your data updated.
You can download the project template here: http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.data/MyiPOJOBundle-1.4.2.zip

The page http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.html gives you some details.

Regards,

Clement

On 04.04.2012, at 16:06, Göktürk Gezer wrote:

> Hi Everyone,
> 
> We're using IPojo inside some Eclipse Plugin project for Eclipse itself.
> 
> Problem is:
> 
> IPojo manipulates the classes and generate new MANIFEST.MF file with
> IPojo-Components contents. No problem with generated bundle but while
> debugging, Eclipse picks the MANIFEST.MF in [PROJECT]/META-INF/ directory
> and also loads the classes in [PROJECT]/target/classes which is default
> behaviour. So clearly the problem is, these two aspects are not synched
> with the manipulated bundle, thus, wrong MANIFEST.MF and nonmanipulated
> classes are loaded into Equinox.
> 
> I have to manually change those things for our plugins to work correctly
> inside Eclipse, which is not an acceptable solution. I would like to know
> if there is some sophisticated method to handle these issues.
> 
> Regards,
> Gokturk