After many hours of toil and banging my head against the desk trying to figure out why "gradle install" didn't publish my jar to the .m2 folder, it turns out the killing the gradle daemon solved my problem.
ps -ef | grep gradle
should show you the gradle daemon process.
Maybe this gist file will have enough terms in it to cause it to be found in your own google search. Here are a few of the things that I used to search google that unfortunately didn't have any search results..
publishMavenJavaPublicationToMavenLocal "Task has not declared any outputs"