You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Eugene Kuleshov (JIRA)" <ji...@apache.org> on 2007/10/18 06:45:50 UTC

[jira] Created: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Interoperability with Eclipse Equinox and PDE
---------------------------------------------

                 Key: FELIX-397
                 URL: https://issues.apache.org/jira/browse/FELIX-397
             Project: Felix
          Issue Type: New Feature
          Components: Maven Bundle Plugin
            Reporter: Eugene Kuleshov


Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.

One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Eugene Kuleshov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538989 ] 

Eugene Kuleshov commented on FELIX-397:
---------------------------------------

Thanks Stuart. This almost works. 

Almost, because bundle plugin generates an absolute link to the local Maven repository in MANIFEST, 

  Include-Resource: target/dependency/junit-3.8.1.jar=C:\repo\junit\junit\3.8.1\junit-3.8.1.jar

such Eclipse project can't be shared across team members and require manual steps before it can be imported to the ide. 

It would be also more convenient if bundle plugin could copy required dependencies without manual configuration of maven-dependency-plugin, that would also help to match list of dependencies and target directory location (won't have to duplicate that).

> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-397:
-----------------------------------


Hi,

I'd like to get all resolved defects verified before releasing the 1.1.0 version of the bundleplugin - so I'd really appreciate it if you could check things are still ok with the current snapshot, and if so close off the defect.

Thanks in advance!

> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-397:
-----------------------------------

    Attachment: EMBED_EXAMPLE_2.zip

FYI, the previous example was generated from Pax-Construct and tweaked to use only the bundle and dependency plugins - the original example generated using Pax-Construct 0.2.1-SNAPSHOT is here.

To generate the Eclipse PDE files, use "mvn clean pax:eclipse"

BTW, to create this example I used the following Pax-Construct commands:

   pax-create-bundle -p org.example
   cd org.example
   pax-embed-jar -a junit -v 3.8.1

   (I added a ref to the junit class in the activator to check it compiled ok)

For more information about Pax-Construct, see the wiki:

   http://wiki.ops4j.org/confluence/x/8Q

and the current documentation for 0.2.0:

   http://www.ops4j.org/projects/pax/construct


> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-397:
-----------------------------------

    Attachment: EMBED_EXAMPLE.zip

Example of using the snapshot maven-bundle-plugin with the maven-dependency-plugin to create the necessary files for Eclipse PDE: uses manifestLocation to put the generated manifest in the top folder and Embed-Directory/Embed-StripGroup to match the Bundle-ClassPath entries with the locations used by the dependency plugin.

Use 'mvn clean eclipse:eclipse -Declipse.pde install' to generate the PDE metadata and manifest.

(install must be after eclipse:eclipse, otherwise a bug in the maven-eclipse-plugin will corrupt the manifest by adding a bogus empty line)

> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539002 ] 

Stuart McCulloch commented on FELIX-397:
----------------------------------------

You are correct that the *generated* manifest contains an absolute link in one of the manifest entries - however this particular entry (Include-Resource) is only used by the Bnd tool when assembling the bundle and will not affect use of the bundle by other people. This entry is *not* used by Eclipse when importing or deploying the bundle, or by the maven-eclipse-plugin.

The problem you see is an unrelated issue with the maven-eclipse-plugin, which adds any dependent non-bundle jars as 'linked' files (see the generated .project file for the actual link) when it runs in PDE mode. This causes the problem in sharing the project, not the Include-Resource entry. ( Note if you use the Pax-Construct tools this won't occur, as it extends the maven-eclipse-plugin so that embedded jars appear with the correct M2_REPO aliased entry in the .classpath file )

Secondly, while it may be convenient in some situations to have the maven-bundle-plugin configure the maven-dependency-plugin, this is really outside of the scope of the bundle-plugin and would negatively impact people who don't use Eclipse and don't require such functionality. In these cases you should either configure the plugins manually as explained above, or use something which has been explicitly written to do this for you, such as the Pax-Construct tools.

The strength of Maven comes from having small plugins that focus on a particular task that can then be put together as required.

> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Resolved: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On Oct 18, 2007, at 10:57 AM, Stuart McCulloch wrote:

> On 18/10/2007, Richard S. Hall <he...@ungoverned.org> wrote:
>>
>> Is this something we should document clearly in the bundle plugin
>> documentation so that people can easily discover how to get it and
>> Eclipse working together?
>
>
> definitely - just added some text to the wiki about this approach

Good work!

-> richard

>
> -> richard
>>
>> On Oct 18, 2007, at 2:00 AM, Stuart McCulloch (JIRA) wrote:
>>
>>>
>>>      [ https://issues.apache.org/jira/browse/FELIX-397?
>>> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>
>>> Stuart McCulloch resolved FELIX-397.
>>> ------------------------------------
>>>
>>>     Resolution: Duplicate
>>>
>>> This is effectively a duplicate of FELIX-376 which provides a way
>>> to write the manifest generated during the bundle phase to a custom
>>> location using the <manifestLocation> setting in the POM or the -
>>> DmanifestLocation property on the command line.
>>>
>>> With this and the maven-dependency-plugin it is straightforward to
>>> generate the necessary files for Eclipse PDE.
>>>
>>> Hence I am closing this issue as a duplicate of FELIX-376.
>>>
>>> If you need a really simple way to produce Eclipse friendly OSGi
>>> bundles and wrappers, please look at Pax-Construct.
>>>
>>>> Interoperability with Eclipse Equinox and PDE
>>>> ---------------------------------------------
>>>>
>>>>                 Key: FELIX-397
>>>>                 URL: https://issues.apache.org/jira/browse/ 
>>>> FELIX-397
>>>>             Project: Felix
>>>>          Issue Type: New Feature
>>>>          Components: Maven Bundle Plugin
>>>>            Reporter: Eugene Kuleshov
>>>>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>>>>
>>>>
>>>> Maven bundle plugin can nicely collect all Maven dependencies,
>>>> generate bundle manifest  and create jar package. However it is
>>>> not very useful if you need to run that bundle in self-hosted mode
>>>> for debugging. Eclipse provides nice development and debugging
>>>> environment for OSGi bundles, but bundles created by this plugin
>>>> can't be easily used there.
>>>> One possible option would be to provide a separate goal that would
>>>> create folder structure compatible with Eclipse PDE. Basically
>>>> place generated manifest file into the ${basedir}/META-INF/
>>>> MANIFEST.MF and copy jars according to the Bundle-ClassPath
>>>> attribute. Then such project could be imported into Eclipse and
>>>> used with PDE.
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> You can reply to this email to add a comment to the issue online.
>>>
>>
>>
>
>
> -- 
> Cheers, Stuart


Re: [jira] Resolved: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by Stuart McCulloch <st...@jayway.net>.
On 18/10/2007, Richard S. Hall <he...@ungoverned.org> wrote:
>
> Is this something we should document clearly in the bundle plugin
> documentation so that people can easily discover how to get it and
> Eclipse working together?


definitely - just added some text to the wiki about this approach

-> richard
>
> On Oct 18, 2007, at 2:00 AM, Stuart McCulloch (JIRA) wrote:
>
> >
> >      [ https://issues.apache.org/jira/browse/FELIX-397?
> > page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> >
> > Stuart McCulloch resolved FELIX-397.
> > ------------------------------------
> >
> >     Resolution: Duplicate
> >
> > This is effectively a duplicate of FELIX-376 which provides a way
> > to write the manifest generated during the bundle phase to a custom
> > location using the <manifestLocation> setting in the POM or the -
> > DmanifestLocation property on the command line.
> >
> > With this and the maven-dependency-plugin it is straightforward to
> > generate the necessary files for Eclipse PDE.
> >
> > Hence I am closing this issue as a duplicate of FELIX-376.
> >
> > If you need a really simple way to produce Eclipse friendly OSGi
> > bundles and wrappers, please look at Pax-Construct.
> >
> >> Interoperability with Eclipse Equinox and PDE
> >> ---------------------------------------------
> >>
> >>                 Key: FELIX-397
> >>                 URL: https://issues.apache.org/jira/browse/FELIX-397
> >>             Project: Felix
> >>          Issue Type: New Feature
> >>          Components: Maven Bundle Plugin
> >>            Reporter: Eugene Kuleshov
> >>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
> >>
> >>
> >> Maven bundle plugin can nicely collect all Maven dependencies,
> >> generate bundle manifest  and create jar package. However it is
> >> not very useful if you need to run that bundle in self-hosted mode
> >> for debugging. Eclipse provides nice development and debugging
> >> environment for OSGi bundles, but bundles created by this plugin
> >> can't be easily used there.
> >> One possible option would be to provide a separate goal that would
> >> create folder structure compatible with Eclipse PDE. Basically
> >> place generated manifest file into the ${basedir}/META-INF/
> >> MANIFEST.MF and copy jars according to the Bundle-ClassPath
> >> attribute. Then such project could be imported into Eclipse and
> >> used with PDE.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
>
>


-- 
Cheers, Stuart

Re: [jira] Resolved: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Is this something we should document clearly in the bundle plugin  
documentation so that people can easily discover how to get it and  
Eclipse working together?

-> richard

On Oct 18, 2007, at 2:00 AM, Stuart McCulloch (JIRA) wrote:

>
>      [ https://issues.apache.org/jira/browse/FELIX-397? 
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Stuart McCulloch resolved FELIX-397.
> ------------------------------------
>
>     Resolution: Duplicate
>
> This is effectively a duplicate of FELIX-376 which provides a way  
> to write the manifest generated during the bundle phase to a custom  
> location using the <manifestLocation> setting in the POM or the - 
> DmanifestLocation property on the command line.
>
> With this and the maven-dependency-plugin it is straightforward to  
> generate the necessary files for Eclipse PDE.
>
> Hence I am closing this issue as a duplicate of FELIX-376.
>
> If you need a really simple way to produce Eclipse friendly OSGi  
> bundles and wrappers, please look at Pax-Construct.
>
>> Interoperability with Eclipse Equinox and PDE
>> ---------------------------------------------
>>
>>                 Key: FELIX-397
>>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>>             Project: Felix
>>          Issue Type: New Feature
>>          Components: Maven Bundle Plugin
>>            Reporter: Eugene Kuleshov
>>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>>
>>
>> Maven bundle plugin can nicely collect all Maven dependencies,  
>> generate bundle manifest  and create jar package. However it is  
>> not very useful if you need to run that bundle in self-hosted mode  
>> for debugging. Eclipse provides nice development and debugging  
>> environment for OSGi bundles, but bundles created by this plugin  
>> can't be easily used there.
>> One possible option would be to provide a separate goal that would  
>> create folder structure compatible with Eclipse PDE. Basically  
>> place generated manifest file into the ${basedir}/META-INF/ 
>> MANIFEST.MF and copy jars according to the Bundle-ClassPath  
>> attribute. Then such project could be imported into Eclipse and  
>> used with PDE.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>


[jira] Resolved: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch resolved FELIX-397.
------------------------------------

    Resolution: Duplicate

This is effectively a duplicate of FELIX-376 which provides a way to write the manifest generated during the bundle phase to a custom location using the <manifestLocation> setting in the POM or the -DmanifestLocation property on the command line.

With this and the maven-dependency-plugin it is straightforward to generate the necessary files for Eclipse PDE.

Hence I am closing this issue as a duplicate of FELIX-376.

If you need a really simple way to produce Eclipse friendly OSGi bundles and wrappers, please look at Pax-Construct.

> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-397) Interoperability with Eclipse Equinox and PDE

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch closed FELIX-397.
----------------------------------


> Interoperability with Eclipse Equinox and PDE
> ---------------------------------------------
>
>                 Key: FELIX-397
>                 URL: https://issues.apache.org/jira/browse/FELIX-397
>             Project: Felix
>          Issue Type: New Feature
>          Components: Maven Bundle Plugin
>            Reporter: Eugene Kuleshov
>         Attachments: EMBED_EXAMPLE.zip, EMBED_EXAMPLE_2.zip
>
>
> Maven bundle plugin can nicely collect all Maven dependencies, generate bundle manifest  and create jar package. However it is not very useful if you need to run that bundle in self-hosted mode for debugging. Eclipse provides nice development and debugging environment for OSGi bundles, but bundles created by this plugin can't be easily used there.
> One possible option would be to provide a separate goal that would create folder structure compatible with Eclipse PDE. Basically place generated manifest file into the ${basedir}/META-INF/MANIFEST.MF and copy jars according to the Bundle-ClassPath attribute. Then such project could be imported into Eclipse and used with PDE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.