Closed jonathanl-telenav closed 2 years ago
TLDR: Your kivakit checkout is on the wrong branch, or it is behind a bunch of commits.
We have a handy script to avoid ever having this situation. It's called cactus-development-preparation
and aliased as cdev
.
To never have this problem again, here are some one-time-only steps:
~/bin
directory (or ~/local/.bin
directory) in your PATHcd cactus && git pull && mvn -Dmaven.test.skip.exec=true clean install
VERSION=1.5.19 mvn com.telenav.cactus:cactus-maven-plugin:${VERSION}:install-scripts
rehash
and press entercdev
and Cactus will make sure all your checkouts are on the develop
(or publish
for assets branches) branches and up to dateThereafter, after a release or when you just want to be sure you're really up to date with the universe, just type cdev
and poof. If you know there's a new version of cactus, simply run cactus-update-scripts
to update your scripts.
If you've gotta, gotta, gotta put the scripts somewhere other than ~/bin
or ~/.local/bin
, then pass -Dcactus.script.destination=/path/to/some/writable/folder/on/the/path
when you install them.
If you're morally opposed to installing the scripts for some reason, pull and build cactus first and then run this:
VERSION=1.5.19 mvn \
-Dcactus.scope=all-project-families \
-Dcactus.target-branch=develop \
-Dcactus.update-root=true \
-Dcactus.include-root=true \
com.telenav.cactus:cactus-maven-plugin:${VERSION}:checkout
A few other things:
--threads N
with Maven is unreliable at best - sometimes it will race because it's trying build a thing that uses something which is still being built, sometimes it won't. I will summarily close build bugs that have not been reproduced without --threads
.-Dcactus.families=
is intended to do there - best to get rid of it -Dcactus.scope=all
- maybe you meant all-project-families
(all
will add up to all-project-families
but it's really only useful for operations like push and commit where you need them to apply to assets checkouts not just checkouts with a pom in the root)For running vanilla mvn clean install
, mvn clean install
is plenty - at least at present, for run of the mill building of stuff, the cactus plugin is not in play other than generating build metadata, and those arguments aren't going to apply to that - that mojo just runs against whatever project it's told to.
I just built and encountered the exact same problem. The reason was that my checkout of kivakit
was still on the release/current
branch. Yours probably is too. So you're building a branch just for kivakit that is 1.6.2
, but everything else expects 1.6.3-SNAPSHOT
.
The bug reproduces on develop branch. The code is, in fact, updated. Try it.
Also, something tells me this giant comment doesn't belong in GitHub issues, but on some documentation page for cactus.
Did you do the steps described above?
Other things that could be going on:
This failure was cached in the local repository and resolution is not reattempted until the update interval of ossrh has elapsed or updates are forced
Kivakit has not been built locally - or was built locally, but the release branch not the develop branch.
You attempted to build Mesakit at least once where it failed, because kivakit 1.6.3-SNAPSHOT was not built locally. It then remembered that failure.
com.telenav.kivakit:kivakit-component:jar:1.6.3-SNAPSHOT
is what it cannot find, and it is definitely in the tree. If you have the develop branch checked out and build it (rebuild superpoms for good measure too), mesakit will be fine. It just hasn't been built into your local repo and there are no published -SNAPSHOT
versions.
yes, I did the steps above (the repro case). did you? you have to include this part to reproduce the bug:
"After removing all Telenav artifacts from .m2 repository"
none of your suggestions are relevant because of this.
Stop guessing and try the repro case.
This is looking like a maven bug. I can't seem to reproduce it without --threads 12
After removing all Telenav artifacts from .m2 repository:
fails with: