Well, if everyone is following the correct rules for specifying versions, then starting with a clean cache is not necessary. Like Maven, Tycho will fetch the latest permitted and available version of any dependency. If Tycho already has the latest revision
of a dependency (subject to restrictions on the versions in the dependency declaration), then it should not refetch the artifact / plugin / feature.
If you cannot get a correct build unless you wipe out your .m2 cache, it’s generally telling you that you or one of your dependent artifacts are handling versions incorrectly. Wiping the cache is an effective workaround, but it would be better to get
all parties to fix their version handling. Wiping the cache for each build defeats part of the purpose of using Maven/Tycho in the first place. :-)
---Tom
How is it possible to make tycho always look and fetch the very current version that is available on the p2?
The only reliable way I'm aware of is to use fully-qualified versions in your .target file and not add any other repository to the pom.xml. Then when upstream version change, you can update your .target file to make sure your build will pick the latest version.
For builds repeated quite often (such as CI builds), despite it takes more time, it's often better to start from a clean .m2 repo and use the "-U" flag to avoid being hit by caching issues.
Beware that if you have multiple versions of the same bundle, it's not necessarily the newer ones that "wins" in the dependency resolution:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=418546
HTH,