.target file artifacts

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

.target file artifacts

David Erickson
Hi I am working on getting my OSGI app to compile using an Eclipse
.target file as its source.  I've duplicated the setup m2eclipse is
using, however I am running into a problem with using a local directory
as a plugin source for the target, as opposed to just http repository
locations.

For example, when my .target file contains:
<location path="${resource_loc:/Main Target/plugins}" type="Directory"/>
</locations>

Maven gives a NPE:
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error:
java.lang.NullPointerException
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:116)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.NullPointerException
        at
org.apache.maven.artifact.repository.MavenArtifactRepository.protocol(MavenArtifactRepository.java:216)
        at
org.apache.maven.artifact.repository.MavenArtifactRepository.<init>(MavenArtifactRepository.java:76)
        at
org.codehaus.tycho.p2.P2ArtifactRepositoryLayout.newMavenArtifactRepository(P2ArtifactRepositoryLayout.java:45)
        at
org.apache.maven.repository.legacy.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:131)
        at
org.apache.maven.repository.legacy.LegacyRepositorySystem.createArtifactRepository(LegacyRepositorySystem.java:706)
        at
org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.getMirror(P2TargetPlatformResolver.java:399)
        at
org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:269)
        at
org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:133)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:191)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
        ... 11 more

Is there a way for me to add a directory containing plugins and have it
picked up by both Maven and Eclipse?

Thanks,
David
Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
I should add, when I remove the local directory entry Maven runs fine
but cannot resolve the plugins it needs to build.

-David

David Erickson wrote:

> Hi I am working on getting my OSGI app to compile using an Eclipse
> .target file as its source.  I've duplicated the setup m2eclipse is
> using, however I am running into a problem with using a local directory
> as a plugin source for the target, as opposed to just http repository
> locations.
>
> For example, when my .target file contains:
> <location path="${resource_loc:/Main Target/plugins}" type="Directory"/>
> </locations>
>
> Maven gives a NPE:
> [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
> org.apache.maven.InternalErrorException: Internal error:
> java.lang.NullPointerException
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:116)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.NullPointerException
>     at
> org.apache.maven.artifact.repository.MavenArtifactRepository.protocol(MavenArtifactRepository.java:216)
>
>     at
> org.apache.maven.artifact.repository.MavenArtifactRepository.<init>(MavenArtifactRepository.java:76)
>
>     at
> org.codehaus.tycho.p2.P2ArtifactRepositoryLayout.newMavenArtifactRepository(P2ArtifactRepositoryLayout.java:45)
>
>     at
> org.apache.maven.repository.legacy.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:131)
>
>     at
> org.apache.maven.repository.legacy.LegacyRepositorySystem.createArtifactRepository(LegacyRepositorySystem.java:706)
>
>     at
> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.getMirror(P2TargetPlatformResolver.java:399)
>
>     at
> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:269)
>
>     at
> org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:133)
>
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:191)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
>     ... 11 more
>
> Is there a way for me to add a directory containing plugins and have it
> picked up by both Maven and Eclipse?
>
> Thanks,
> David
>

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

Igor Fedorenko-2
In reply to this post by David Erickson
Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
elements of .target file. You might be able to use file:// repository
location protocol, but I have not tried that myself. You still need to
have p2 metadata in that directory.

Out of curiosity, why do you want to use local directory as plugin
source? Is it for prototyping or you'd like to use this long term?

--
Regards,
Igor

David Erickson wrote:

> Hi I am working on getting my OSGI app to compile using an Eclipse
> .target file as its source.  I've duplicated the setup m2eclipse is
> using, however I am running into a problem with using a local directory
> as a plugin source for the target, as opposed to just http repository
> locations.
>
> For example, when my .target file contains:
> <location path="${resource_loc:/Main Target/plugins}" type="Directory"/>
> </locations>
>
> Maven gives a NPE:
> [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
> org.apache.maven.InternalErrorException: Internal error:
> java.lang.NullPointerException
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:116)
>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>
>     at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.NullPointerException
>     at
> org.apache.maven.artifact.repository.MavenArtifactRepository.protocol(MavenArtifactRepository.java:216)
>
>     at
> org.apache.maven.artifact.repository.MavenArtifactRepository.<init>(MavenArtifactRepository.java:76)
>
>     at
> org.codehaus.tycho.p2.P2ArtifactRepositoryLayout.newMavenArtifactRepository(P2ArtifactRepositoryLayout.java:45)
>
>     at
> org.apache.maven.repository.legacy.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:131)
>
>     at
> org.apache.maven.repository.legacy.LegacyRepositorySystem.createArtifactRepository(LegacyRepositorySystem.java:706)
>
>     at
> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.getMirror(P2TargetPlatformResolver.java:399)
>
>     at
> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:269)
>
>     at
> org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:133)
>
>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:191)
>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
>     ... 11 more
>
> Is there a way for me to add a directory containing plugins and have it
> picked up by both Maven and Eclipse?
>
> Thanks,
> David
Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
In reply to this post by David Erickson
Hi Igor,
Right now its for prototyping, but maybe you can help me figure out my workflow.  I have a java project, call it library x. It is just a jar with osgi metadata added, but is not a pde plugin project in eclipse. The jar is currently built in ant then I have to manually copy it to my target/plugins folder so it is picked up on the next launch.

Ideally id like to be able to edit the source for x and have it picked up without having to manually copy anything, and I would like to make x available to my maven osgi build without needing to deploy a website.

Any suggestions on how to do this? Is it possible to build x using maven and have my osgi build depend on it in the target env somehow? And what would this mean for my eclipse target?

Thanks
David

Igor Fedorenko <[hidden email]> wrote:

>Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>elements of .target file. You might be able to use file:// repository
>location protocol, but I have not tried that myself. You still need to
>have p2 metadata in that directory.
>
>Out of curiosity, why do you want to use local directory as plugin
>source? Is it for prototyping or you'd like to use this long term?
>
>--
>Regards,
>Igor
>
>David Erickson wrote:
>> Hi I am working on getting my OSGI app to compile using an Eclipse
>> .target file as its source.  I've duplicated the setup m2eclipse is
>> using, however I am running into a problem with using a local directory
>> as a plugin source for the target, as opposed to just http repository
>> locations.
>>
>> For example, when my .target file contains:
>> <location path="${resource_loc:/Main Target/plugins}" type="Directory"/>
>> </locations>
>>
>> Maven gives a NPE:
>> [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
>> org.apache.maven.InternalErrorException: Internal error:
>> java.lang.NullPointerException
>>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:116)
>>     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>>     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
>>     at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>>     at java.lang.reflect.Method.invoke(Method.java:597)
>>     at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>
>>     at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>>     at
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>
>>     at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: java.lang.NullPointerException
>>     at
>> org.apache.maven.artifact.repository.MavenArtifactRepository.protocol(MavenArtifactRepository.java:216)
>>
>>     at
>> org.apache.maven.artifact.repository.MavenArtifactRepository.<init>(MavenArtifactRepository.java:76)
>>
>>     at
>> org.codehaus.tycho.p2.P2ArtifactRepositoryLayout.newMavenArtifactRepository(P2ArtifactRepositoryLayout.java:45)
>>
>>     at
>> org.apache.maven.repository.legacy.repository.DefaultArtifactRepositoryFactory.createArtifactRepository(DefaultArtifactRepositoryFactory.java:131)
>>
>>     at
>> org.apache.maven.repository.legacy.LegacyRepositorySystem.createArtifactRepository(LegacyRepositorySystem.java:706)
>>
>>     at
>> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.getMirror(P2TargetPlatformResolver.java:399)
>>
>>     at
>> org.sonatype.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:269)
>>
>>     at
>> org.codehaus.tycho.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:133)
>>
>>     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:191)
>>     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
>>     ... 11 more
>>
>> Is there a way for me to add a directory containing plugins and have it
>> picked up by both Maven and Eclipse?
>>
>> Thanks,
>> David
>
Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

Igor Fedorenko-2
We plan significantly improve interoperability between Tycho and other
ways to produce OSGi bundles with Maven, both during CLI build and
inside Eclipse IDE... unfortunately, no plans to support ant (for
obvious reason), so I am not sure if this is relevant to your scenario.

--
Regards,
Igor

David Erickson wrote:

> Hi Igor, Right now its for prototyping, but maybe you can help me
> figure out my workflow.  I have a java project, call it library x. It
> is just a jar with osgi metadata added, but is not a pde plugin
> project in eclipse. The jar is currently built in ant then I have to
> manually copy it to my target/plugins folder so it is picked up on
> the next launch.
>
> Ideally id like to be able to edit the source for x and have it
> picked up without having to manually copy anything, and I would like
> to make x available to my maven osgi build without needing to deploy
> a website.
>
> Any suggestions on how to do this? Is it possible to build x using
> maven and have my osgi build depend on it in the target env somehow?
> And what would this mean for my eclipse target?
>
> Thanks David
>
> Igor Fedorenko <[hidden email]> wrote:
>
>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>> elements of .target file. You might be able to use file://
>> repository location protocol, but I have not tried that myself. You
>> still need to have p2 metadata in that directory.
>>
>> Out of curiosity, why do you want to use local directory as plugin
>> source? Is it for prototyping or you'd like to use this long term?
>>
>> -- Regards, Igor

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
can get everything working.  Perhaps you can elaborate on your plans for
improving interop?

I spent most of the day pondering on my current problems, maybe I can
try and succinctly sum them up and see if you (or others of course) have
suggestions.

The current crux of my perceived problems is dealing with plugins that
have been exported as jars, but do not have a corresponding feature, or
update site. For example, my plugin needs commons-cli, for which an OSGI
bundle exists in the SpringSource Enterprise Bundle Repository.  However
there is no corresponding update site and feature containing it.  Thus I
can only add it to an Eclipse .target using  the Directory or
Installation type, via an exact path entry (bad for other developers),
or a relative path using Eclipse variables (not supported in Tycho).  As
I see it, some options are:

-Create a feature for every 3rd party library I need to reference and
put it in an update site visible to the .target file
-Modify Tycho to be able to resolve Eclipse variables (ie
${resource_loc:/<Project name>/plugins}, the name can be extracted from
the .project files) and support .target location type
Directory/Installation, put all library bundles into SCM in this folder
-Extend PDE to support a special location type, say Maven, that has an
indirection layer to the local Maven repository

If there is a much simpler way to solve this problem I am open to
suggestions.

Thanks,
David

Igor Fedorenko wrote:

> We plan significantly improve interoperability between Tycho and other
> ways to produce OSGi bundles with Maven, both during CLI build and
> inside Eclipse IDE... unfortunately, no plans to support ant (for
> obvious reason), so I am not sure if this is relevant to your scenario.
>
> --
> Regards,
> Igor
>
> David Erickson wrote:
>> Hi Igor, Right now its for prototyping, but maybe you can help me
>> figure out my workflow.  I have a java project, call it library x. It
>> is just a jar with osgi metadata added, but is not a pde plugin
>> project in eclipse. The jar is currently built in ant then I have to
>> manually copy it to my target/plugins folder so it is picked up on
>> the next launch.
>>
>> Ideally id like to be able to edit the source for x and have it
>> picked up without having to manually copy anything, and I would like
>> to make x available to my maven osgi build without needing to deploy
>> a website.
>>
>> Any suggestions on how to do this? Is it possible to build x using
>> maven and have my osgi build depend on it in the target env somehow?
>> And what would this mean for my eclipse target?
>>
>> Thanks David
>>
>> Igor Fedorenko <[hidden email]> wrote:
>>
>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>> elements of .target file. You might be able to use file://
>>> repository location protocol, but I have not tried that myself. You
>>> still need to have p2 metadata in that directory.
>>>
>>> Out of curiosity, why do you want to use local directory as plugin
>>> source? Is it for prototyping or you'd like to use this long term?
>>>
>>> -- Regards, Igor
>
>

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
As an interim solution I went with the first option, I've created a
.target that loads all the dependent libraries checked into a plugins/
folder, a single feature that includes all of the plugins, and an update
site containing this feature that I then push off and reference from my
main development target.  This seems to work but is a fair amount of effort.

-David

David Erickson wrote:

> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
> can get everything working.  Perhaps you can elaborate on your plans for
> improving interop?
>
> I spent most of the day pondering on my current problems, maybe I can
> try and succinctly sum them up and see if you (or others of course) have
> suggestions.
> The current crux of my perceived problems is dealing with plugins that
> have been exported as jars, but do not have a corresponding feature, or
> update site. For example, my plugin needs commons-cli, for which an OSGI
> bundle exists in the SpringSource Enterprise Bundle Repository.  However
> there is no corresponding update site and feature containing it.  Thus I
> can only add it to an Eclipse .target using  the Directory or
> Installation type, via an exact path entry (bad for other developers),
> or a relative path using Eclipse variables (not supported in Tycho).  As
> I see it, some options are:
>
> -Create a feature for every 3rd party library I need to reference and
> put it in an update site visible to the .target file
> -Modify Tycho to be able to resolve Eclipse variables (ie
> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
> the .project files) and support .target location type
> Directory/Installation, put all library bundles into SCM in this folder
> -Extend PDE to support a special location type, say Maven, that has an
> indirection layer to the local Maven repository
>
> If there is a much simpler way to solve this problem I am open to
> suggestions.
>
> Thanks,
> David
>
> Igor Fedorenko wrote:
>> We plan significantly improve interoperability between Tycho and other
>> ways to produce OSGi bundles with Maven, both during CLI build and
>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>> obvious reason), so I am not sure if this is relevant to your scenario.
>>
>> --
>> Regards,
>> Igor
>>
>> David Erickson wrote:
>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>> figure out my workflow.  I have a java project, call it library x. It
>>> is just a jar with osgi metadata added, but is not a pde plugin
>>> project in eclipse. The jar is currently built in ant then I have to
>>> manually copy it to my target/plugins folder so it is picked up on
>>> the next launch.
>>>
>>> Ideally id like to be able to edit the source for x and have it
>>> picked up without having to manually copy anything, and I would like
>>> to make x available to my maven osgi build without needing to deploy
>>> a website.
>>>
>>> Any suggestions on how to do this? Is it possible to build x using
>>> maven and have my osgi build depend on it in the target env somehow?
>>> And what would this mean for my eclipse target?
>>>
>>> Thanks David
>>>
>>> Igor Fedorenko <[hidden email]> wrote:
>>>
>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>> elements of .target file. You might be able to use file://
>>>> repository location protocol, but I have not tried that myself. You
>>>> still need to have p2 metadata in that directory.
>>>>
>>>> Out of curiosity, why do you want to use local directory as plugin
>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>
>>>> -- Regards, Igor
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: .target file artifacts

Sievers, Jan
Hi David,

another option is to use the eclipse commandline app

http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application

all you need is a plugins/ folder containing all your 3rd party bundles.
It will create a corresponding p2 repo which can be referenced by tycho. No need to create features/site.xml in this case.

Best Regards
Jan


-----Original Message-----
From: David Erickson [mailto:[hidden email]]
Sent: Dienstag, 13. April 2010 01:17
To: [hidden email]
Subject: Re: [Tycho Users] .target file artifacts

As an interim solution I went with the first option, I've created a
.target that loads all the dependent libraries checked into a plugins/
folder, a single feature that includes all of the plugins, and an update
site containing this feature that I then push off and reference from my
main development target.  This seems to work but is a fair amount of effort.

-David

David Erickson wrote:

> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
> can get everything working.  Perhaps you can elaborate on your plans for
> improving interop?
>
> I spent most of the day pondering on my current problems, maybe I can
> try and succinctly sum them up and see if you (or others of course) have
> suggestions.
> The current crux of my perceived problems is dealing with plugins that
> have been exported as jars, but do not have a corresponding feature, or
> update site. For example, my plugin needs commons-cli, for which an OSGI
> bundle exists in the SpringSource Enterprise Bundle Repository.  However
> there is no corresponding update site and feature containing it.  Thus I
> can only add it to an Eclipse .target using  the Directory or
> Installation type, via an exact path entry (bad for other developers),
> or a relative path using Eclipse variables (not supported in Tycho).  As
> I see it, some options are:
>
> -Create a feature for every 3rd party library I need to reference and
> put it in an update site visible to the .target file
> -Modify Tycho to be able to resolve Eclipse variables (ie
> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
> the .project files) and support .target location type
> Directory/Installation, put all library bundles into SCM in this folder
> -Extend PDE to support a special location type, say Maven, that has an
> indirection layer to the local Maven repository
>
> If there is a much simpler way to solve this problem I am open to
> suggestions.
>
> Thanks,
> David
>
> Igor Fedorenko wrote:
>> We plan significantly improve interoperability between Tycho and other
>> ways to produce OSGi bundles with Maven, both during CLI build and
>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>> obvious reason), so I am not sure if this is relevant to your scenario.
>>
>> --
>> Regards,
>> Igor
>>
>> David Erickson wrote:
>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>> figure out my workflow.  I have a java project, call it library x. It
>>> is just a jar with osgi metadata added, but is not a pde plugin
>>> project in eclipse. The jar is currently built in ant then I have to
>>> manually copy it to my target/plugins folder so it is picked up on
>>> the next launch.
>>>
>>> Ideally id like to be able to edit the source for x and have it
>>> picked up without having to manually copy anything, and I would like
>>> to make x available to my maven osgi build without needing to deploy
>>> a website.
>>>
>>> Any suggestions on how to do this? Is it possible to build x using
>>> maven and have my osgi build depend on it in the target env somehow?
>>> And what would this mean for my eclipse target?
>>>
>>> Thanks David
>>>
>>> Igor Fedorenko <[hidden email]> wrote:
>>>
>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>> elements of .target file. You might be able to use file://
>>>> repository location protocol, but I have not tried that myself. You
>>>> still need to have p2 metadata in that directory.
>>>>
>>>> Out of curiosity, why do you want to use local directory as plugin
>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>
>>>> -- Regards, Igor
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

Igor Fedorenko-2
In reply to this post by David Erickson
FYI, I plan to write some visionary docoware/blog about this, just kinda
short on time atm.

--
Regards,
Igor

David Erickson wrote:

> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
> can get everything working.  Perhaps you can elaborate on your plans for
> improving interop?
>
> I spent most of the day pondering on my current problems, maybe I can
> try and succinctly sum them up and see if you (or others of course) have
> suggestions.
> The current crux of my perceived problems is dealing with plugins that
> have been exported as jars, but do not have a corresponding feature, or
> update site. For example, my plugin needs commons-cli, for which an OSGI
> bundle exists in the SpringSource Enterprise Bundle Repository.  However
> there is no corresponding update site and feature containing it.  Thus I
> can only add it to an Eclipse .target using  the Directory or
> Installation type, via an exact path entry (bad for other developers),
> or a relative path using Eclipse variables (not supported in Tycho).  As
> I see it, some options are:
>
> -Create a feature for every 3rd party library I need to reference and
> put it in an update site visible to the .target file
> -Modify Tycho to be able to resolve Eclipse variables (ie
> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
> the .project files) and support .target location type
> Directory/Installation, put all library bundles into SCM in this folder
> -Extend PDE to support a special location type, say Maven, that has an
> indirection layer to the local Maven repository
>
> If there is a much simpler way to solve this problem I am open to
> suggestions.
>
> Thanks,
> David
>
> Igor Fedorenko wrote:
>> We plan significantly improve interoperability between Tycho and other
>> ways to produce OSGi bundles with Maven, both during CLI build and
>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>> obvious reason), so I am not sure if this is relevant to your scenario.
>>
>> --
>> Regards,
>> Igor
>>
>> David Erickson wrote:
>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>> figure out my workflow.  I have a java project, call it library x. It
>>> is just a jar with osgi metadata added, but is not a pde plugin
>>> project in eclipse. The jar is currently built in ant then I have to
>>> manually copy it to my target/plugins folder so it is picked up on
>>> the next launch.
>>>
>>> Ideally id like to be able to edit the source for x and have it
>>> picked up without having to manually copy anything, and I would like
>>> to make x available to my maven osgi build without needing to deploy
>>> a website.
>>>
>>> Any suggestions on how to do this? Is it possible to build x using
>>> maven and have my osgi build depend on it in the target env somehow?
>>> And what would this mean for my eclipse target?
>>>
>>> Thanks David
>>>
>>> Igor Fedorenko <[hidden email]> wrote:
>>>
>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>> elements of .target file. You might be able to use file://
>>>> repository location protocol, but I have not tried that myself. You
>>>> still need to have p2 metadata in that directory.
>>>>
>>>> Out of curiosity, why do you want to use local directory as plugin
>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>
>>>> -- Regards, Igor
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
In reply to this post by Sievers, Jan
Hi Jan,
I actually gave this a shot over the weekend, and while I agree with you
that Tycho can reference it via an explicit entry in the POM, you still
have to put an entry into your Eclipse target file that is has an
Eclipse-specific workspace relative path, or an explicit absolute path
(bad for multiple machines/developers).  This has the problem of
maintaining two different pointers to the plugins, one from the POM and
one from the .target file.  Not terrible, but not ideal.  It would be
great if Tycho could just resolve the workspace-variable by examining
the .project files (assuming the variable is only using the project
name), which would solve this.  Oh and have Tycho not throw an NPE if
you use a directory entry in your target ;)

Thanks,
David

Sievers, Jan wrote:

> Hi David,
>
> another option is to use the eclipse commandline app
>
> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application
>
> all you need is a plugins/ folder containing all your 3rd party bundles.
> It will create a corresponding p2 repo which can be referenced by tycho. No need to create features/site.xml in this case.
>
> Best Regards
> Jan
>
>
> -----Original Message-----
> From: David Erickson [mailto:[hidden email]]
> Sent: Dienstag, 13. April 2010 01:17
> To: [hidden email]
> Subject: Re: [Tycho Users] .target file artifacts
>
> As an interim solution I went with the first option, I've created a
> .target that loads all the dependent libraries checked into a plugins/
> folder, a single feature that includes all of the plugins, and an update
> site containing this feature that I then push off and reference from my
> main development target.  This seems to work but is a fair amount of effort.
>
> -David
>
> David Erickson wrote:
>  
>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
>> can get everything working.  Perhaps you can elaborate on your plans for
>> improving interop?
>>
>> I spent most of the day pondering on my current problems, maybe I can
>> try and succinctly sum them up and see if you (or others of course) have
>> suggestions.
>> The current crux of my perceived problems is dealing with plugins that
>> have been exported as jars, but do not have a corresponding feature, or
>> update site. For example, my plugin needs commons-cli, for which an OSGI
>> bundle exists in the SpringSource Enterprise Bundle Repository.  However
>> there is no corresponding update site and feature containing it.  Thus I
>> can only add it to an Eclipse .target using  the Directory or
>> Installation type, via an exact path entry (bad for other developers),
>> or a relative path using Eclipse variables (not supported in Tycho).  As
>> I see it, some options are:
>>
>> -Create a feature for every 3rd party library I need to reference and
>> put it in an update site visible to the .target file
>> -Modify Tycho to be able to resolve Eclipse variables (ie
>> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
>> the .project files) and support .target location type
>> Directory/Installation, put all library bundles into SCM in this folder
>> -Extend PDE to support a special location type, say Maven, that has an
>> indirection layer to the local Maven repository
>>
>> If there is a much simpler way to solve this problem I am open to
>> suggestions.
>>
>> Thanks,
>> David
>>
>> Igor Fedorenko wrote:
>>    
>>> We plan significantly improve interoperability between Tycho and other
>>> ways to produce OSGi bundles with Maven, both during CLI build and
>>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>>> obvious reason), so I am not sure if this is relevant to your scenario.
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>> David Erickson wrote:
>>>      
>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>> figure out my workflow.  I have a java project, call it library x. It
>>>> is just a jar with osgi metadata added, but is not a pde plugin
>>>> project in eclipse. The jar is currently built in ant then I have to
>>>> manually copy it to my target/plugins folder so it is picked up on
>>>> the next launch.
>>>>
>>>> Ideally id like to be able to edit the source for x and have it
>>>> picked up without having to manually copy anything, and I would like
>>>> to make x available to my maven osgi build without needing to deploy
>>>> a website.
>>>>
>>>> Any suggestions on how to do this? Is it possible to build x using
>>>> maven and have my osgi build depend on it in the target env somehow?
>>>> And what would this mean for my eclipse target?
>>>>
>>>> Thanks David
>>>>
>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>
>>>>        
>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>> elements of .target file. You might be able to use file://
>>>>> repository location protocol, but I have not tried that myself. You
>>>>> still need to have p2 metadata in that directory.
>>>>>
>>>>> Out of curiosity, why do you want to use local directory as plugin
>>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>>
>>>>> -- Regards, Igor
>>>>>          
>>>      
>>    
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

RE: .target file artifacts

Sievers, Jan
Hi David,

we serve the p2 repo created by

http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application

via an HTTP server (tomcat/apache/you name it) and put that URL into the .target file (or in the repo configuration in pom.xml/settings.xml).

Regards
Jan


-----Original Message-----
From: David Erickson [mailto:[hidden email]]
Sent: Dienstag, 13. April 2010 16:15
To: [hidden email]
Subject: Re: [Tycho Users] .target file artifacts

Hi Jan,
I actually gave this a shot over the weekend, and while I agree with you
that Tycho can reference it via an explicit entry in the POM, you still
have to put an entry into your Eclipse target file that is has an
Eclipse-specific workspace relative path, or an explicit absolute path
(bad for multiple machines/developers).  This has the problem of
maintaining two different pointers to the plugins, one from the POM and
one from the .target file.  Not terrible, but not ideal.  It would be
great if Tycho could just resolve the workspace-variable by examining
the .project files (assuming the variable is only using the project
name), which would solve this.  Oh and have Tycho not throw an NPE if
you use a directory entry in your target ;)

Thanks,
David

Sievers, Jan wrote:

> Hi David,
>
> another option is to use the eclipse commandline app
>
> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application
>
> all you need is a plugins/ folder containing all your 3rd party bundles.
> It will create a corresponding p2 repo which can be referenced by tycho. No need to create features/site.xml in this case.
>
> Best Regards
> Jan
>
>
> -----Original Message-----
> From: David Erickson [mailto:[hidden email]]
> Sent: Dienstag, 13. April 2010 01:17
> To: [hidden email]
> Subject: Re: [Tycho Users] .target file artifacts
>
> As an interim solution I went with the first option, I've created a
> .target that loads all the dependent libraries checked into a plugins/
> folder, a single feature that includes all of the plugins, and an update
> site containing this feature that I then push off and reference from my
> main development target.  This seems to work but is a fair amount of effort.
>
> -David
>
> David Erickson wrote:
>  
>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
>> can get everything working.  Perhaps you can elaborate on your plans for
>> improving interop?
>>
>> I spent most of the day pondering on my current problems, maybe I can
>> try and succinctly sum them up and see if you (or others of course) have
>> suggestions.
>> The current crux of my perceived problems is dealing with plugins that
>> have been exported as jars, but do not have a corresponding feature, or
>> update site. For example, my plugin needs commons-cli, for which an OSGI
>> bundle exists in the SpringSource Enterprise Bundle Repository.  However
>> there is no corresponding update site and feature containing it.  Thus I
>> can only add it to an Eclipse .target using  the Directory or
>> Installation type, via an exact path entry (bad for other developers),
>> or a relative path using Eclipse variables (not supported in Tycho).  As
>> I see it, some options are:
>>
>> -Create a feature for every 3rd party library I need to reference and
>> put it in an update site visible to the .target file
>> -Modify Tycho to be able to resolve Eclipse variables (ie
>> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
>> the .project files) and support .target location type
>> Directory/Installation, put all library bundles into SCM in this folder
>> -Extend PDE to support a special location type, say Maven, that has an
>> indirection layer to the local Maven repository
>>
>> If there is a much simpler way to solve this problem I am open to
>> suggestions.
>>
>> Thanks,
>> David
>>
>> Igor Fedorenko wrote:
>>    
>>> We plan significantly improve interoperability between Tycho and other
>>> ways to produce OSGi bundles with Maven, both during CLI build and
>>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>>> obvious reason), so I am not sure if this is relevant to your scenario.
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>> David Erickson wrote:
>>>      
>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>> figure out my workflow.  I have a java project, call it library x. It
>>>> is just a jar with osgi metadata added, but is not a pde plugin
>>>> project in eclipse. The jar is currently built in ant then I have to
>>>> manually copy it to my target/plugins folder so it is picked up on
>>>> the next launch.
>>>>
>>>> Ideally id like to be able to edit the source for x and have it
>>>> picked up without having to manually copy anything, and I would like
>>>> to make x available to my maven osgi build without needing to deploy
>>>> a website.
>>>>
>>>> Any suggestions on how to do this? Is it possible to build x using
>>>> maven and have my osgi build depend on it in the target env somehow?
>>>> And what would this mean for my eclipse target?
>>>>
>>>> Thanks David
>>>>
>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>
>>>>        
>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>> elements of .target file. You might be able to use file://
>>>>> repository location protocol, but I have not tried that myself. You
>>>>> still need to have p2 metadata in that directory.
>>>>>
>>>>> Out of curiosity, why do you want to use local directory as plugin
>>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>>
>>>>> -- Regards, Igor
>>>>>          
>>>      
>>    
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

Pete Carapetyan-2
Very helpful post, thanks!

On Tue, Apr 13, 2010 at 9:43 AM, Sievers, Jan <[hidden email]> wrote:
Hi David,

we serve the p2 repo created by

http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application

via an HTTP server (tomcat/apache/you name it) and put that URL into the .target file (or in the repo configuration in pom.xml/settings.xml).

Regards
Jan

Reply | Threaded
Open this post in threaded view
|

RE: .target file artifacts

aobele
In reply to this post by Sievers, Jan

This process can be automated. It's not that hard to write a maven
plugin goal that will download a bunch of maven dependencies and then
stick them into an update site that can be used by both Eclipse targets
and Tycho.

-----Original Message-----
From: Sievers, Jan [mailto:[hidden email]]
Sent: 2010, April, 13 10:44 AM
To: [hidden email]
Subject: RE: [Tycho Users] .target file artifacts

Hi David,

we serve the p2 repo created by

http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publis
her_Application

via an HTTP server (tomcat/apache/you name it) and put that URL into the
.target file (or in the repo configuration in pom.xml/settings.xml).

Regards
Jan


-----Original Message-----
From: David Erickson [mailto:[hidden email]]
Sent: Dienstag, 13. April 2010 16:15
To: [hidden email]
Subject: Re: [Tycho Users] .target file artifacts

Hi Jan,
I actually gave this a shot over the weekend, and while I agree with you
that Tycho can reference it via an explicit entry in the POM, you still
have to put an entry into your Eclipse target file that is has an
Eclipse-specific workspace relative path, or an explicit absolute path
(bad for multiple machines/developers).  This has the problem of
maintaining two different pointers to the plugins, one from the POM and
one from the .target file.  Not terrible, but not ideal.  It would be
great if Tycho could just resolve the workspace-variable by examining
the .project files (assuming the variable is only using the project
name), which would solve this.  Oh and have Tycho not throw an NPE if
you use a directory entry in your target ;)

Thanks,
David

Sievers, Jan wrote:
> Hi David,
>
> another option is to use the eclipse commandline app
>
> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publ
> isher_Application
>
> all you need is a plugins/ folder containing all your 3rd party
bundles.
> It will create a corresponding p2 repo which can be referenced by
tycho. No need to create features/site.xml in this case.

>
> Best Regards
> Jan
>
>
> -----Original Message-----
> From: David Erickson [mailto:[hidden email]]
> Sent: Dienstag, 13. April 2010 01:17
> To: [hidden email]
> Subject: Re: [Tycho Users] .target file artifacts
>
> As an interim solution I went with the first option, I've created a
> .target that loads all the dependent libraries checked into a plugins/

> folder, a single feature that includes all of the plugins, and an
> update site containing this feature that I then push off and reference

> from my main development target.  This seems to work but is a fair
amount of effort.

>
> -David
>
> David Erickson wrote:
>  
>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven
>> if I can get everything working.  Perhaps you can elaborate on your
>> plans for improving interop?
>>
>> I spent most of the day pondering on my current problems, maybe I can

>> try and succinctly sum them up and see if you (or others of course)
>> have suggestions.
>> The current crux of my perceived problems is dealing with plugins
>> that have been exported as jars, but do not have a corresponding
>> feature, or update site. For example, my plugin needs commons-cli,
>> for which an OSGI bundle exists in the SpringSource Enterprise Bundle

>> Repository.  However there is no corresponding update site and
>> feature containing it.  Thus I can only add it to an Eclipse .target
>> using  the Directory or Installation type, via an exact path entry
>> (bad for other developers), or a relative path using Eclipse
>> variables (not supported in Tycho).  As I see it, some options are:
>>
>> -Create a feature for every 3rd party library I need to reference and

>> put it in an update site visible to the .target file -Modify Tycho to

>> be able to resolve Eclipse variables (ie ${resource_loc:/<Project
>> name>/plugins}, the name can be extracted from the .project files)
>> and support .target location type Directory/Installation, put all
>> library bundles into SCM in this folder -Extend PDE to support a
>> special location type, say Maven, that has an indirection layer to
>> the local Maven repository
>>
>> If there is a much simpler way to solve this problem I am open to
>> suggestions.
>>
>> Thanks,
>> David
>>
>> Igor Fedorenko wrote:
>>    
>>> We plan significantly improve interoperability between Tycho and
>>> other ways to produce OSGi bundles with Maven, both during CLI build

>>> and inside Eclipse IDE... unfortunately, no plans to support ant
>>> (for obvious reason), so I am not sure if this is relevant to your
scenario.

>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>> David Erickson wrote:
>>>      
>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>> figure out my workflow.  I have a java project, call it library x.
>>>> It is just a jar with osgi metadata added, but is not a pde plugin
>>>> project in eclipse. The jar is currently built in ant then I have
>>>> to manually copy it to my target/plugins folder so it is picked up
>>>> on the next launch.
>>>>
>>>> Ideally id like to be able to edit the source for x and have it
>>>> picked up without having to manually copy anything, and I would
>>>> like to make x available to my maven osgi build without needing to
>>>> deploy a website.
>>>>
>>>> Any suggestions on how to do this? Is it possible to build x using
>>>> maven and have my osgi build depend on it in the target env
somehow?

>>>> And what would this mean for my eclipse target?
>>>>
>>>> Thanks David
>>>>
>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>
>>>>        
>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>> elements of .target file. You might be able to use file://
>>>>> repository location protocol, but I have not tried that myself.
>>>>> You still need to have p2 metadata in that directory.
>>>>>
>>>>> Out of curiosity, why do you want to use local directory as plugin

>>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>>
>>>>> -- Regards, Igor
>>>>>          
>>>      
>>    
>
>
>
>  

________________________________________

This E-Mail (including any attachments) may contain privileged or confidential information.  It is intended only for the addressee(s) indicated above.

The sender does not waive any of its rights, privileges or other protections respecting this information.  

Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited.

If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately.

This E-Mail (including any attachments) has been scanned for viruses.

It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened.

However, it is the responsibility of the recipient to ensure that it is virus free.

The sender accepts no responsibility for any loss or damage arising in any way from its use.

E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel.

Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information.

IRS CIRCULAR 230 NOTICE:  TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVICE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER.

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
In reply to this post by Sievers, Jan
Hmm the problem I was running into was that if I had no features
defined, Eclipse would not pick up the plugins on their own.  Your sure
you have no features defined that you are exporting?  And would you mind
  sending out the command line your using?

Thanks
David

Sievers, Jan wrote:

> Hi David,
>
> we serve the p2 repo created by
>
> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application
>
> via an HTTP server (tomcat/apache/you name it) and put that URL into the .target file (or in the repo configuration in pom.xml/settings.xml).
>
> Regards
> Jan
>
>
> -----Original Message-----
> From: David Erickson [mailto:[hidden email]]
> Sent: Dienstag, 13. April 2010 16:15
> To: [hidden email]
> Subject: Re: [Tycho Users] .target file artifacts
>
> Hi Jan,
> I actually gave this a shot over the weekend, and while I agree with you
> that Tycho can reference it via an explicit entry in the POM, you still
> have to put an entry into your Eclipse target file that is has an
> Eclipse-specific workspace relative path, or an explicit absolute path
> (bad for multiple machines/developers).  This has the problem of
> maintaining two different pointers to the plugins, one from the POM and
> one from the .target file.  Not terrible, but not ideal.  It would be
> great if Tycho could just resolve the workspace-variable by examining
> the .project files (assuming the variable is only using the project
> name), which would solve this.  Oh and have Tycho not throw an NPE if
> you use a directory entry in your target ;)
>
> Thanks,
> David
>
> Sievers, Jan wrote:
>> Hi David,
>>
>> another option is to use the eclipse commandline app
>>
>> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application
>>
>> all you need is a plugins/ folder containing all your 3rd party bundles.
>> It will create a corresponding p2 repo which can be referenced by tycho. No need to create features/site.xml in this case.
>>
>> Best Regards
>> Jan
>>
>>
>> -----Original Message-----
>> From: David Erickson [mailto:[hidden email]]
>> Sent: Dienstag, 13. April 2010 01:17
>> To: [hidden email]
>> Subject: Re: [Tycho Users] .target file artifacts
>>
>> As an interim solution I went with the first option, I've created a
>> .target that loads all the dependent libraries checked into a plugins/
>> folder, a single feature that includes all of the plugins, and an update
>> site containing this feature that I then push off and reference from my
>> main development target.  This seems to work but is a fair amount of effort.
>>
>> -David
>>
>> David Erickson wrote:
>>  
>>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven if I
>>> can get everything working.  Perhaps you can elaborate on your plans for
>>> improving interop?
>>>
>>> I spent most of the day pondering on my current problems, maybe I can
>>> try and succinctly sum them up and see if you (or others of course) have
>>> suggestions.
>>> The current crux of my perceived problems is dealing with plugins that
>>> have been exported as jars, but do not have a corresponding feature, or
>>> update site. For example, my plugin needs commons-cli, for which an OSGI
>>> bundle exists in the SpringSource Enterprise Bundle Repository.  However
>>> there is no corresponding update site and feature containing it.  Thus I
>>> can only add it to an Eclipse .target using  the Directory or
>>> Installation type, via an exact path entry (bad for other developers),
>>> or a relative path using Eclipse variables (not supported in Tycho).  As
>>> I see it, some options are:
>>>
>>> -Create a feature for every 3rd party library I need to reference and
>>> put it in an update site visible to the .target file
>>> -Modify Tycho to be able to resolve Eclipse variables (ie
>>> ${resource_loc:/<Project name>/plugins}, the name can be extracted from
>>> the .project files) and support .target location type
>>> Directory/Installation, put all library bundles into SCM in this folder
>>> -Extend PDE to support a special location type, say Maven, that has an
>>> indirection layer to the local Maven repository
>>>
>>> If there is a much simpler way to solve this problem I am open to
>>> suggestions.
>>>
>>> Thanks,
>>> David
>>>
>>> Igor Fedorenko wrote:
>>>    
>>>> We plan significantly improve interoperability between Tycho and other
>>>> ways to produce OSGi bundles with Maven, both during CLI build and
>>>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>>>> obvious reason), so I am not sure if this is relevant to your scenario.
>>>>
>>>> --
>>>> Regards,
>>>> Igor
>>>>
>>>> David Erickson wrote:
>>>>      
>>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>>> figure out my workflow.  I have a java project, call it library x. It
>>>>> is just a jar with osgi metadata added, but is not a pde plugin
>>>>> project in eclipse. The jar is currently built in ant then I have to
>>>>> manually copy it to my target/plugins folder so it is picked up on
>>>>> the next launch.
>>>>>
>>>>> Ideally id like to be able to edit the source for x and have it
>>>>> picked up without having to manually copy anything, and I would like
>>>>> to make x available to my maven osgi build without needing to deploy
>>>>> a website.
>>>>>
>>>>> Any suggestions on how to do this? Is it possible to build x using
>>>>> maven and have my osgi build depend on it in the target env somehow?
>>>>> And what would this mean for my eclipse target?
>>>>>
>>>>> Thanks David
>>>>>
>>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>>
>>>>>        
>>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>>> elements of .target file. You might be able to use file://
>>>>>> repository location protocol, but I have not tried that myself. You
>>>>>> still need to have p2 metadata in that directory.
>>>>>>
>>>>>> Out of curiosity, why do you want to use local directory as plugin
>>>>>> source? Is it for prototyping or you'd like to use this long term?
>>>>>>
>>>>>> -- Regards, Igor
>>>>>>          
>>>>      
>>>    
>>
>>
>>  
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
I just tried this again to verify and when I try to add the software
site pointing to it, if I have "Group by Category" selected it shows
"There are no categorized items", and if I click that off it shows
"There are no items available".  Either way there is no way for me to
hit the "Next" or "Finish" button to add the site to the target.

-David

David Erickson wrote:

> Hmm the problem I was running into was that if I had no features
> defined, Eclipse would not pick up the plugins on their own.  Your sure
> you have no features defined that you are exporting?  And would you mind
>  sending out the command line your using?
>
> Thanks
> David
>
> Sievers, Jan wrote:
>> Hi David,
>>
>> we serve the p2 repo created by
>>
>> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application 
>>
>>
>> via an HTTP server (tomcat/apache/you name it) and put that URL into
>> the .target file (or in the repo configuration in pom.xml/settings.xml).
>>
>> Regards
>> Jan
>>
>>
>> -----Original Message-----
>> From: David Erickson [mailto:[hidden email]] Sent: Dienstag,
>> 13. April 2010 16:15
>> To: [hidden email]
>> Subject: Re: [Tycho Users] .target file artifacts
>>
>> Hi Jan,
>> I actually gave this a shot over the weekend, and while I agree with
>> you that Tycho can reference it via an explicit entry in the POM, you
>> still have to put an entry into your Eclipse target file that is has
>> an Eclipse-specific workspace relative path, or an explicit absolute
>> path (bad for multiple machines/developers).  This has the problem of
>> maintaining two different pointers to the plugins, one from the POM
>> and one from the .target file.  Not terrible, but not ideal.  It would
>> be great if Tycho could just resolve the workspace-variable by
>> examining the .project files (assuming the variable is only using the
>> project name), which would solve this.  Oh and have Tycho not throw an
>> NPE if you use a directory entry in your target ;)
>>
>> Thanks,
>> David
>>
>> Sievers, Jan wrote:
>>> Hi David,
>>>
>>> another option is to use the eclipse commandline app
>>>
>>> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application 
>>>
>>>
>>> all you need is a plugins/ folder containing all your 3rd party bundles.
>>> It will create a corresponding p2 repo which can be referenced by
>>> tycho. No need to create features/site.xml in this case.
>>>
>>> Best Regards
>>> Jan
>>>
>>>
>>> -----Original Message-----
>>> From: David Erickson [mailto:[hidden email]] Sent: Dienstag,
>>> 13. April 2010 01:17
>>> To: [hidden email]
>>> Subject: Re: [Tycho Users] .target file artifacts
>>>
>>> As an interim solution I went with the first option, I've created a
>>> .target that loads all the dependent libraries checked into a
>>> plugins/ folder, a single feature that includes all of the plugins,
>>> and an update site containing this feature that I then push off and
>>> reference from my main development target.  This seems to work but is
>>> a fair amount of effort.
>>>
>>> -David
>>>
>>> David Erickson wrote:
>>>  
>>>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven
>>>> if I can get everything working.  Perhaps you can elaborate on your
>>>> plans for improving interop?
>>>>
>>>> I spent most of the day pondering on my current problems, maybe I
>>>> can try and succinctly sum them up and see if you (or others of
>>>> course) have suggestions.
>>>> The current crux of my perceived problems is dealing with plugins
>>>> that have been exported as jars, but do not have a corresponding
>>>> feature, or update site. For example, my plugin needs commons-cli,
>>>> for which an OSGI bundle exists in the SpringSource Enterprise
>>>> Bundle Repository.  However there is no corresponding update site
>>>> and feature containing it.  Thus I can only add it to an Eclipse
>>>> .target using  the Directory or Installation type, via an exact path
>>>> entry (bad for other developers), or a relative path using Eclipse
>>>> variables (not supported in Tycho).  As I see it, some options are:
>>>>
>>>> -Create a feature for every 3rd party library I need to reference
>>>> and put it in an update site visible to the .target file
>>>> -Modify Tycho to be able to resolve Eclipse variables (ie
>>>> ${resource_loc:/<Project name>/plugins}, the name can be extracted
>>>> from the .project files) and support .target location type
>>>> Directory/Installation, put all library bundles into SCM in this folder
>>>> -Extend PDE to support a special location type, say Maven, that has
>>>> an indirection layer to the local Maven repository
>>>>
>>>> If there is a much simpler way to solve this problem I am open to
>>>> suggestions.
>>>>
>>>> Thanks,
>>>> David
>>>>
>>>> Igor Fedorenko wrote:
>>>>    
>>>>> We plan significantly improve interoperability between Tycho and other
>>>>> ways to produce OSGi bundles with Maven, both during CLI build and
>>>>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>>>>> obvious reason), so I am not sure if this is relevant to your
>>>>> scenario.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Igor
>>>>>
>>>>> David Erickson wrote:
>>>>>      
>>>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>>>> figure out my workflow.  I have a java project, call it library x. It
>>>>>> is just a jar with osgi metadata added, but is not a pde plugin
>>>>>> project in eclipse. The jar is currently built in ant then I have to
>>>>>> manually copy it to my target/plugins folder so it is picked up on
>>>>>> the next launch.
>>>>>>
>>>>>> Ideally id like to be able to edit the source for x and have it
>>>>>> picked up without having to manually copy anything, and I would like
>>>>>> to make x available to my maven osgi build without needing to deploy
>>>>>> a website.
>>>>>>
>>>>>> Any suggestions on how to do this? Is it possible to build x using
>>>>>> maven and have my osgi build depend on it in the target env somehow?
>>>>>> And what would this mean for my eclipse target?
>>>>>>
>>>>>> Thanks David
>>>>>>
>>>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>>>
>>>>>>        
>>>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>>>> elements of .target file. You might be able to use file://
>>>>>>> repository location protocol, but I have not tried that myself. You
>>>>>>> still need to have p2 metadata in that directory.
>>>>>>>
>>>>>>> Out of curiosity, why do you want to use local directory as
>>>>>>> plugin source? Is it for prototyping or you'd like to use this
>>>>>>> long term?
>>>>>>>
>>>>>>> -- Regards, Igor
>>>>>>>          
>>>>>      
>>>>    
>>>
>>>
>>>  
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: .target file artifacts

Sievers, Jan
I just remembered we put that into a wiki page already:
https://docs.sonatype.org/display/TYCHO/How+to+make+existing+OSGi+bundles+consumable+by+Tycho

> Hmm the problem I was running into was that if I had no features
> defined, Eclipse would not pick up the plugins on their own.

you are right. I tend to consider this a bug in the eclipse update UI because the underlying p2 does not require features to be able to install something.
Probably a legacy from the old update manager which was based on features only.

However there is no problem to create feature project(s) with tycho which consume bundles from the 3rd party repo and add this feature to a tycho update site project.
our tycho build produces an update site which includes all the bundles consumed from the 3rd party p2 repo (along with all other bundles built from source).
we use the update site produced by the tycho build (which is entirely based on features) as target platform in the IDE.

This allows you to import just those projects you want to work on from source into your workspace, the rest is provided binary in the target platform.

Best Regards
Jan





-----Original Message-----
From: David Erickson [mailto:[hidden email]]
Sent: Dienstag, 13. April 2010 19:24
To: [hidden email]
Subject: Re: [Tycho Users] .target file artifacts

I just tried this again to verify and when I try to add the software
site pointing to it, if I have "Group by Category" selected it shows
"There are no categorized items", and if I click that off it shows
"There are no items available".  Either way there is no way for me to
hit the "Next" or "Finish" button to add the site to the target.

-David

David Erickson wrote:

> Hmm the problem I was running into was that if I had no features
> defined, Eclipse would not pick up the plugins on their own.  Your sure
> you have no features defined that you are exporting?  And would you mind
>  sending out the command line your using?
>
> Thanks
> David
>
> Sievers, Jan wrote:
>> Hi David,
>>
>> we serve the p2 repo created by
>>
>> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application 
>>
>>
>> via an HTTP server (tomcat/apache/you name it) and put that URL into
>> the .target file (or in the repo configuration in pom.xml/settings.xml).
>>
>> Regards
>> Jan
>>
>>
>> -----Original Message-----
>> From: David Erickson [mailto:[hidden email]] Sent: Dienstag,
>> 13. April 2010 16:15
>> To: [hidden email]
>> Subject: Re: [Tycho Users] .target file artifacts
>>
>> Hi Jan,
>> I actually gave this a shot over the weekend, and while I agree with
>> you that Tycho can reference it via an explicit entry in the POM, you
>> still have to put an entry into your Eclipse target file that is has
>> an Eclipse-specific workspace relative path, or an explicit absolute
>> path (bad for multiple machines/developers).  This has the problem of
>> maintaining two different pointers to the plugins, one from the POM
>> and one from the .target file.  Not terrible, but not ideal.  It would
>> be great if Tycho could just resolve the workspace-variable by
>> examining the .project files (assuming the variable is only using the
>> project name), which would solve this.  Oh and have Tycho not throw an
>> NPE if you use a directory entry in your target ;)
>>
>> Thanks,
>> David
>>
>> Sievers, Jan wrote:
>>> Hi David,
>>>
>>> another option is to use the eclipse commandline app
>>>
>>> http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application 
>>>
>>>
>>> all you need is a plugins/ folder containing all your 3rd party bundles.
>>> It will create a corresponding p2 repo which can be referenced by
>>> tycho. No need to create features/site.xml in this case.
>>>
>>> Best Regards
>>> Jan
>>>
>>>
>>> -----Original Message-----
>>> From: David Erickson [mailto:[hidden email]] Sent: Dienstag,
>>> 13. April 2010 01:17
>>> To: [hidden email]
>>> Subject: Re: [Tycho Users] .target file artifacts
>>>
>>> As an interim solution I went with the first option, I've created a
>>> .target that loads all the dependent libraries checked into a
>>> plugins/ folder, a single feature that includes all of the plugins,
>>> and an update site containing this feature that I then push off and
>>> reference from my main development target.  This seems to work but is
>>> a fair amount of effort.
>>>
>>> -David
>>>
>>> David Erickson wrote:
>>>  
>>>> Thanks for the reply Igor, I am happy to dump ant in favor of Maven
>>>> if I can get everything working.  Perhaps you can elaborate on your
>>>> plans for improving interop?
>>>>
>>>> I spent most of the day pondering on my current problems, maybe I
>>>> can try and succinctly sum them up and see if you (or others of
>>>> course) have suggestions.
>>>> The current crux of my perceived problems is dealing with plugins
>>>> that have been exported as jars, but do not have a corresponding
>>>> feature, or update site. For example, my plugin needs commons-cli,
>>>> for which an OSGI bundle exists in the SpringSource Enterprise
>>>> Bundle Repository.  However there is no corresponding update site
>>>> and feature containing it.  Thus I can only add it to an Eclipse
>>>> .target using  the Directory or Installation type, via an exact path
>>>> entry (bad for other developers), or a relative path using Eclipse
>>>> variables (not supported in Tycho).  As I see it, some options are:
>>>>
>>>> -Create a feature for every 3rd party library I need to reference
>>>> and put it in an update site visible to the .target file
>>>> -Modify Tycho to be able to resolve Eclipse variables (ie
>>>> ${resource_loc:/<Project name>/plugins}, the name can be extracted
>>>> from the .project files) and support .target location type
>>>> Directory/Installation, put all library bundles into SCM in this folder
>>>> -Extend PDE to support a special location type, say Maven, that has
>>>> an indirection layer to the local Maven repository
>>>>
>>>> If there is a much simpler way to solve this problem I am open to
>>>> suggestions.
>>>>
>>>> Thanks,
>>>> David
>>>>
>>>> Igor Fedorenko wrote:
>>>>    
>>>>> We plan significantly improve interoperability between Tycho and other
>>>>> ways to produce OSGi bundles with Maven, both during CLI build and
>>>>> inside Eclipse IDE... unfortunately, no plans to support ant (for
>>>>> obvious reason), so I am not sure if this is relevant to your
>>>>> scenario.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Igor
>>>>>
>>>>> David Erickson wrote:
>>>>>      
>>>>>> Hi Igor, Right now its for prototyping, but maybe you can help me
>>>>>> figure out my workflow.  I have a java project, call it library x. It
>>>>>> is just a jar with osgi metadata added, but is not a pde plugin
>>>>>> project in eclipse. The jar is currently built in ant then I have to
>>>>>> manually copy it to my target/plugins folder so it is picked up on
>>>>>> the next launch.
>>>>>>
>>>>>> Ideally id like to be able to edit the source for x and have it
>>>>>> picked up without having to manually copy anything, and I would like
>>>>>> to make x available to my maven osgi build without needing to deploy
>>>>>> a website.
>>>>>>
>>>>>> Any suggestions on how to do this? Is it possible to build x using
>>>>>> maven and have my osgi build depend on it in the target env somehow?
>>>>>> And what would this mean for my eclipse target?
>>>>>>
>>>>>> Thanks David
>>>>>>
>>>>>> Igor Fedorenko <[hidden email]> wrote:
>>>>>>
>>>>>>        
>>>>>>> Tycho only supports p2 (i.e. type="InstallableUnit") <location/>
>>>>>>> elements of .target file. You might be able to use file://
>>>>>>> repository location protocol, but I have not tried that myself. You
>>>>>>> still need to have p2 metadata in that directory.
>>>>>>>
>>>>>>> Out of curiosity, why do you want to use local directory as
>>>>>>> plugin source? Is it for prototyping or you'd like to use this
>>>>>>> long term?
>>>>>>>
>>>>>>> -- Regards, Igor
>>>>>>>          
>>>>>      
>>>>    
>>>
>>>
>>>  
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

David Erickson
Sievers, Jan wrote:

> I just remembered we put that into a wiki page already:
> https://docs.sonatype.org/display/TYCHO/How+to+make+existing+OSGi+bundles+consumable+by+Tycho
>
>> Hmm the problem I was running into was that if I had no features
>> defined, Eclipse would not pick up the plugins on their own.
>
> you are right. I tend to consider this a bug in the eclipse update UI because the underlying p2 does not require features to be able to install something.
> Probably a legacy from the old update manager which was based on features only.
>
> However there is no problem to create feature project(s) with tycho which consume bundles from the 3rd party repo and add this feature to a tycho update site project.
> our tycho build produces an update site which includes all the bundles consumed from the 3rd party p2 repo (along with all other bundles built from source).
> we use the update site produced by the tycho build (which is entirely based on features) as target platform in the IDE.
>
> This allows you to import just those projects you want to work on from source into your workspace, the rest is provided binary in the target platform.

Thanks Jan,
Do you have an example anywhere of a feature project that consumes
pre-existing plugin jars, and an update site publishing the feature?

I currently am trying to pull in Spring DM testing jars by building a
feature/site using PDE,  but it is not respecting resolution: optional
in Import-Classpath, so I have to add every dependency of every jar and
this list is untenable to add to the feature.

Thanks,
David

Reply | Threaded
Open this post in threaded view
|

Re: .target file artifacts

Lars Fischer-3
In reply to this post by aobele
Hello,

On 13.04.2010 17:25, Obele, Azubuko wrote:
 >
 > This process can be automated. It's not that hard to write a maven
 > plugin goal that will download a bunch of maven dependencies and then
 > stick them into an update site that can be used by both Eclipse targets
 > and Tycho.

could you show an example, how to do this?

I would like to create an update site from some features. These features
should also be build on maven.

Regards,
Lars