pluginPath and dependencies from remote p2 repositories
-
27-02-2021 - |
Question
In my pde build I'm using pluginPath
property to resolve dependencies from local p2 repositories for example:
DpluginPath=${basedir}/../../../plugins:/cache/3pp/site/mockito/1.8.2:/cache/3pp/site/spring/3.0.1
I'm trying to find how to effectively materialize caches from HTTP p2 to local files.
I know that I could use ant-contrib
for looping and invoke p2.mirror
task for each dependency. Specially important is for me is minimalizing network overhead - to keep builds fast.
But, is the better way to declare dependency and materialize p2 repositories on local filesystem?
La solution
To feed p2 repositories into your build, you should place all of your repos in repoBaseLocation
. Then by default transformedRepoLocation
will be the runnable repo that is consumed by your build, and you shouldn't need to play with pluginPath
. See Reusing Metadata.
How you get your repos into the repoBaseLocation
is then up to you. You could mirror stable repos into a common known location (a target directory outside of your current build directory) if they don't exist already, and have your build copy them into each repoBaseLocation
per build.