Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] how to force tycho to use a specific set of plugins from the local maven repo?

Problem with that is that multiply git repo's with eclipse plugins (which normally would be in a workspace)
are constantly being build and updated 

Those are going into the git repo, and for that i also need to push them constantly to a p2 repository?

What is the maven/tycho command to really push all kinds of git repo's to the same local p2 repository (so constantly updating 1)?

For now i just fixed it differently, in the manifest for a specific branch i now always include the bundle-version with a lower (including) and upper (excluding) bound version
I need to do that for many plugins so that is not so nice..
So for example if i have a branch:
8.2
and 
8.3

then all the plugins in 8.2 will have references as: [8.2.0,8.3.0)

that seems to work as far as i can test now.

And i only need to change that once when i make a new main branch (but thats 1 time in half to a full year)

As i said this is not so nice, what i would like to have that i can specify it once in the parent pom of a git repo
like normal maven dependencies. That i can say exactly if you want to lookup this plugin use that version (or version range)




On 27 September 2017 at 11:59, Henrik Steudel <hst@xxxxxxxxx> wrote:
Hi,

did you already try to use P2-Repositories[1] as dependency source for plugins from repo A instead of local Maven repository?

So, build A in version 1 builds a P2 repo which is then fed to build B with version 1. As this generated repo only includes exactly the plugin versions you want, build B will not accidentially take version 2 bundles anymore.

Steps:
  • mvn verify instead of mvn install
  • adding a P2-repository definition (<repository>) into parent pom which points to a URL file:/<PathToGeneratedRepository> (I used a Maven profile for this to make it optional)
  • -Dtycho.localArtifacts=ignore [2] (not necessarily required if install goal is not executed anyway)

[1] https://wiki.eclipse.org/Tycho/eclipse-repository
[2] https://wiki.eclipse.org/Tycho/Target_Platform

Hope this helps/suits your usecase.
Kind regards
Henrik


Am 25.09.2017 um 14:01 schrieb Johan Compagner:
Hi,

i have this as a setup (i have even more git repo's but to keep it simple)

1> Git repo A eclipse plugins with version 1

2> Git repo B eclipse plugins with version 1 (this has also the .product and .feature files)

B depends on plugins from A


maven is all setup, and mvn install will build all the plugins from A or B
And when i build B maven pickes up the plugins i build from A just fine

But now the problem, now i make a new branch on both git repo's and on both i up the version to 2

With the product build itself i can fix the versions in feature.xml (and use partly the tycho version push and my own regexp to fix all the the versions in that)

If i now build version 2 of A and B that works,

But if i now go back to V1 branch and build B
Then B will pick up the latest versions of A (so version 2 plugins of A)
But it still should pickup version 1 of A because i am in version 1 of B

it seems that i only can fix that to set in the manifest of all the plugins of B hardcoded:

;bundle-version="[1.0.0,1.0.1)",

 where that 1.0.1 is a non existing version 
But this is kind of horrible to maintain, or i need to write quite some regexp to change all those bundle-versions of all the manifest files (upping to a specific version and then also have a bogus version number that is just 1 micro version up of the other...

Is there just not an easier way?
Like forcing the version in the (parent)pom.xml?
Which is also using the full version string so 1.0.0.somequalifier
Because that is what i now also use


For example tycho version push on the feature.xml does work for the plugins of there own git repo, but it doesn't really just up all the plugins with that version.
But that last one is fixable by going over it with a regexp find/replace


In Eclipse workspace itself this is all very easy, you just have that workspace that tied everything together, P2 just builded a workspace what was checked out there.
But with Tycho this is just different, how can you configure such a set of many plugins over many git repo's all with specific versions? (and be able to up those easy)



--
Johan Compagner
Servoy


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


-- 
Entimo AG
Stralauer Platz 33 - 34 | 10243 Berlin | Germany
Tel: +49.30.52 00 24 133 | Fax: +49.30.52 00 24 101
hst@xxxxxxxxxx | http://www.entimo.com/

Vorstand: Jürgen Spieler (Vors.), Marianne Neumann
Aufsichtratsvorsitzender: Erika Tannenbaum

Sitz der Gesellschaft: Berlin, Germany | Handelsregister: HRB Berlin-Charlottenburg 85073



--
Johan Compagner
Servoy

Back to the top