Closed jwausle closed 7 years ago
You need to make a clean task for your cnf project. See https://github.com/bndtools/bnd/blob/master/cnf/build.gradle
Thanks @bjhargrave. That`s a quickfix right?
In general:
It is the fix. You ran clean to reset to the original state, that should include any caches, no? git clean -dfx
would also clean the cache.
If you change the URL of the repo and don't also change the name of the repo, name = "p2-repo"
, then you have two repos (old URL and new URL; they are distinct repos) sharing the same cache (based on repo name). So you should clean the cache upon changing repos (URLs) or use a different cache (repo name).
:cnf:cleanCache
task. The :cnf:clean
task will dependOn the :cnf:cleanCache
task unless gradle is --offline
. You can also avoid the :cnf:cleanCache
task by -x cleanCache
in the command line:./gradlew -x cleanCache clean build
That is extremely inconvenient since I use "gradle clean build" to force a clean build before I commit. Doing that offline will blow away my cache and break my build. Please make clean NOT depend on cleanCache.
I discussed this with @rotty3000 and we thought this was OK. But feedback from others would be good.
gradle --rerun-tasks
is probably a saner choice or git clean
to get a really clean build. I never really trust gradle clean
.
Well on jenkins I do a git clean, but offline I do not...
Besides, if you really want a clean build, you should start with an empty cache like your CI system probably does.
If I change my P2Repositry.url to a new one with same bundles with another version inside Than the 'cnf/cache' and 'downloaded-runbundles' contains always the previous(old) bundles after
gradle runbundles
execution.howto reproduce
P2 repos
cnf/build.bnd
project/bnd.bndrun
# gradle clean runbundles
Update 'cnf/build.bnd'
url = http://p2repo/unzipped/
2.0# gradle clean runbundles
againquickfix
# rm -rf cnf/cache/p2-repo
# gradle clean runbundles
:)