Target file vs repository tag

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

Target file vs repository tag

patrikschalin
I'm in the process of converting our client build into a maven build using Tycho. Up until now I've done it using a .target file which was attached to a pom for simple artifact management and it worked fine. Now that I've seen the Eclipse Minerva project (http://wiki.eclipse.org/Minerva) I just had to test using the standard <repository> tag with <layout>p2</layout> and it works equally fine...  

I'm leaning towards the repository tag since it's just plain simpler than handling the target artifact but I'm curious to what other diffs there might be...good or bad.

Anybody have more info on the diffs between using .target file and using repository tag in pom?

Thanks
Patrik
Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

Max Rydahl Andersen
The reason why we (JBoss Tools) uses .target files is that we then can ensure
that we don't get surprises when building since we fixed the versions in the target platform.

Bad thing about .target files is that they aren't modular so if you have a large set of plugins
the only way (that we currently know) is to have these share the same target platform and
that's kinda bummer since then the close to 1 GB of dependencies for the complete project
becomes a *drag* for everyone else to download/configure even though they only use a
small % of it.

So currently its a struggle in both approaches - pure repo, is simplar but also hides
potential version updates and target files are deterministic but doesn't scale well
as it is today.

/max

On Mar 8, 2011, at 12:33, patrikschalin wrote:

> I'm in the process of converting our client build into a maven build using
> Tycho. Up until now I've done it using a .target file which was attached to
> a pom for simple artifact management and it worked fine. Now that I've seen
> the Eclipse Minerva project ( http://wiki.eclipse.org/Minerva
> http://wiki.eclipse.org/Minerva ) I just had to test using the standard  tag
> with p2 and it works equally fine...  
>
> I'm leaning towards the repository tag since it's just plain simpler than
> handling the target artifact but I'm curious to what other diffs there might
> be...good or bad.
>
> Anybody have more info on the diffs between using .target file and using
> repository tag in pom?
>
> Thanks
> Patrik
>
> --
> View this message in context: http://software.2206966.n2.nabble.com/Target-file-vs-repository-tag-tp6121802p6121802.html
> Sent from the Tycho Users mailing list archive at Nabble.com.

/max
http://about.me/maxandersen



Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

patrikschalin
Thanks for the reply, Max.

Yes I noticed that property of the target file as well, before I realized I tried to setup a build with multiple .target files but soon found out that it was no option... :(

Forgot to mention that we have a local mirror of the eclipse target site to ensure that it is fairly static or at least we get to choose when to update...also the local mirror boosts the build performance for devs since we have the mirror on the inside.

Mirrors are super easy to setup with the P2 utils. http://wiki.eclipse.org/Equinox_p2_Repository_Mirroring

/Patrik
Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

Vlad Tatavu
In reply to this post by patrikschalin
One advantage of using .target files is that you can then use the same
target platform inside eclipse and in the tycho build.  But maintaining
the target files is a pain. :(

Vlad

On 3/8/2011 6:33 AM, patrikschalin wrote:

> I'm in the process of converting our client build into a maven build using
> Tycho. Up until now I've done it using a .target file which was attached to
> a pom for simple artifact management and it worked fine. Now that I've seen
> the Eclipse Minerva project ( http://wiki.eclipse.org/Minerva
> http://wiki.eclipse.org/Minerva ) I just had to test using the standard  tag
> with p2 and it works equally fine...
>
> I'm leaning towards the repository tag since it's just plain simpler than
> handling the target artifact but I'm curious to what other diffs there might
> be...good or bad.
>
> Anybody have more info on the diffs between using .target file and using
> repository tag in pom?
>
> Thanks
> Patrik
>
> --
> View this message in context: http://software.2206966.n2.nabble.com/Target-file-vs-repository-tag-tp6121802p6121802.html
> Sent from the Tycho Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

Max Rydahl Andersen

On Mar 8, 2011, at 15:29, Vlad Tatavu wrote:

> One advantage of using .target files is that you can then use the same target platform inside eclipse and in the tycho build.  But maintaining the target files is a pain. :(

we thought we could use it from within eclipse too but I haven' t managed to get PDE to load our target files without error (bug in PDE target management thats reported
but not fixed yet - can find the id needed).

But tycho works fine with them and thus also why I wished tycho could materialize an eclipse configuration with it so didnt have to swear at p2 ;)

/max

> Vlad
>
> On 3/8/2011 6:33 AM, patrikschalin wrote:
>> I'm in the process of converting our client build into a maven build using
>> Tycho. Up until now I've done it using a .target file which was attached to
>> a pom for simple artifact management and it worked fine. Now that I've seen
>> the Eclipse Minerva project ( http://wiki.eclipse.org/Minerva
>> http://wiki.eclipse.org/Minerva ) I just had to test using the standard  tag
>> with p2 and it works equally fine...
>>
>> I'm leaning towards the repository tag since it's just plain simpler than
>> handling the target artifact but I'm curious to what other diffs there might
>> be...good or bad.
>>
>> Anybody have more info on the diffs between using .target file and using
>> repository tag in pom?
>>
>> Thanks
>> Patrik
>>
>> --
>> View this message in context: http://software.2206966.n2.nabble.com/Target-file-vs-repository-tag-tp6121802p6121802.html
>> Sent from the Tycho Users mailing list archive at Nabble.com.
>>
>

/max
http://about.me/maxandersen



Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

nickboldt
If you have a .target file, you can convert that to a p2.mirror
script, resolve it locally, and then use that to a) build with Tycho,
or b) install into Eclipse (and build with m2e/tycho). That way you're
never stuck using the oft-borked Target Editor in Eclipse.

This is what we do for JBT [0]:

[0] http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/

Check out the build.xml script. which will suck the contents of
multiple.target into the local dir, in a ./REPO/ subfolder, and can
also be called by Tycho using the get.local.target profile (`mvn clean
install -f target-platform/pom.xml -Pget.local.target`).

From there, you can point Tycho at that repo using a config.xml to
identify it as a local mirror of a remote one, or else point your
parent pom at the .target file via the build plugin
org.sonatype.tycho:target-platform-configuration in the parent pom
[1].

[1] http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml

As far as mirroring eclipse.org sites, I've got that down to something
this simple - an ant script [2] you can call headless or from within
Eclipse to generate the mirror locally:

[2] http://anonsvn.jboss.org/repos/jbosstools/trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml

Do that a half-dozen times, and you can composite the specific
dependency mirrors into a single composite site [3].

[3] http://download.jboss.org/jbosstools/updates/indigo/


On Tue, Mar 8, 2011 at 3:14 PM, Max Rydahl Andersen
<[hidden email]> wrote:

>
> On Mar 8, 2011, at 15:29, Vlad Tatavu wrote:
>
>> One advantage of using .target files is that you can then use the same target platform inside eclipse and in the tycho build.  But maintaining the target files is a pain. :(
>
> we thought we could use it from within eclipse too but I haven' t managed to get PDE to load our target files without error (bug in PDE target management thats reported
> but not fixed yet - can find the id needed).
>
> But tycho works fine with them and thus also why I wished tycho could materialize an eclipse configuration with it so didnt have to swear at p2 ;)
>
> /max
>> Vlad
>>
>> On 3/8/2011 6:33 AM, patrikschalin wrote:
>>> I'm in the process of converting our client build into a maven build using
>>> Tycho. Up until now I've done it using a .target file which was attached to
>>> a pom for simple artifact management and it worked fine. Now that I've seen
>>> the Eclipse Minerva project ( http://wiki.eclipse.org/Minerva
>>> http://wiki.eclipse.org/Minerva ) I just had to test using the standard ┬átag
>>> with p2 and it works equally fine...
>>>
>>> I'm leaning towards the repository tag since it's just plain simpler than
>>> handling the target artifact but I'm curious to what other diffs there might
>>> be...good or bad.
>>>
>>> Anybody have more info on the diffs between using .target file and using
>>> repository tag in pom?
>>>
>>> Thanks
>>> Patrik
>>>
>>> --
>>> View this message in context: http://software.2206966.n2.nabble.com/Target-file-vs-repository-tag-tp6121802p6121802.html
>>> Sent from the Tycho Users mailing list archive at Nabble.com.
>>>
>>
>
> /max
> http://about.me/maxandersen
>
>
>
>



--
Nick Boldt :: JBoss by Red Hat
Productization Lead :: JBoss Tools & Dev Studio
Release Engineer :: Dash Athena
http://nick.divbyzero.com
Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

patrikschalin
Thanks all for your comments, really valuable =)

So...:

 - For Tycho command line AND Eclipse you need .target
 - Tycho command line can handle both repo tag or .target file using target platform plugin.
 - Eclipse + M2E needs .target file.

Referencing Eclipse download sites directly can be a bit too dynamic in regards to versions you end up with in your target. Alt. is to create a mirror either locally or shared within your org.

Mirror can be used both in .target and pom repository tag.

I like pom repository tag because it is simple and straight forward to setup and use although it leaves me with setting up a target in Eclipse manually....kind of leaning towards .target again...

Thanks
Patrik
Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

patrikschalin
This got me thinking...does M2E really bring anything extra to the workspace if my Tycho setup is based on a .target file that I install as target platform in Eclipse? Can't see what that would be....
Reply | Threaded
Open this post in threaded view
|

Re: Target file vs repository tag

jserup
This post has NOT been accepted by the mailing list yet.
As alternative to what nick suggest you can also use the buckmeister plugin:

http://download.eclipse.org/tools/buckminster/updates-3.6

to build an all environment p2 site from a .target file :

http://nirmalsasidharan.wordpress.com/tag/buckminster/

This p2 site can then be moved to a remote server. Point your local eclipse target and your tycho target to this this p2 site and you minimize the target resolution performance issue.

Further you can export the .target file (referencing the build p2 site) to a local directory, create a new .target file and update it with the local directory - this is by far the fastest way to work with a target in eclipse from my experience. This way you are sure that both you as a developer and tycho works with the same target definition - of course tycho still needs to use the p2 specified .target file.