I've been researching and trying to find examples for the above and found the following:
For Android Projects:
Hosting a Private Maven Repo on Amazon S3
These plugin however expects certain Android properties specified and throws errors like Could not find property 'android' on task ':androidJavadocs'.
For Remote repositories over SFTP, there is maven-publish
.
Besides, it seems to be possible to do this in Maven.
Would be great if anyone can point me to an example of how to do this.
I've slightly modified the code from your second link (here) for Java-based projects. The only problematic sections are at the bottom of the file, where the source and javadoc jars are being created since he is directly referencing Android. If you replace the final tasks (line 95 onwards) with the following it should resolve your problem: