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?

> > On 27 September 2017 at 11:59, Henrik Steudel <hst@xxxxxxxxx> wrote:
> >
> > 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.

Is that the recommended approach for avoiding this kind of version trouble?  

I ended up using the approach that Johan outlines below, where I set the upper limit of the version.  That works well enough for now since my CI system only builds the dev and release branches, and I generally only have a few of those branches live at any given time, and they all have distinct version numbers.  

But I imagine that my approach would break down quickly if I tried to make our CI system build all feature branches before they’re merged to dev (i.e., using a more standard git-flow / CI workflow).  In that case, setting the upper bound on the dependencies is going to be a little unworkable.  I think that I would still want to set the upper bounds on the dependencies to prevent the dependencies from drifting to the latest release, but I don’t think that we’d advance the version on each feature branch off of dev.  So, in that case, if the dev Bundle-Version: 8.3.0, then so are all of the feature branches off of dev. I want to make sure that the build for branch feature/bug-1234 is going to use the dependencies built from that same branch instead of the code from the feature/bug-4567 branch, even if the plug-ins on those two feature branches have the same.  You’re saying that you have the CI system build local, file-based p2-repositories for each plug-in and then have Tycho dependencies set up to use those p2 repositories instead of the local maven-based cache?  

I’m assuming here that we’re talking about dependencies built from the same repository, such as foo.ui and foo.test depending on foo.core. 


> From: Johan Compagner <jcompagner@xxxxxxxxxx>
> Reply-To: Tycho user list <tycho-user@xxxxxxxxxxx>
> Date: Wednesday, September 27, 2017 at 7:21 AM
> To: Henrik Steudel <hst@xxxxxxxxx>
> Cc: Tycho user list <tycho-user@xxxxxxxxxxx>
> Subject: 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)

Back to the top