Question

I have a Nexus server running on a remote server and I'd like to link the local repository for the android support libraries to Nexus. How can I do this?

Was it helpful?

Solution

You should just use the Maven Android SDK Deployer to push all artifacts from the SDK including the support library and other artifacts from the Maven repo within the SDK to Nexus.

In Maven the local "repository" is not really that. It is simply a cache. Never treat it as a permanent storage for anything. It should be fine to be deleted any time and should be just repopulated from the repo manager.

OTHER TIPS

On your server where Nexus is running, copy the android-sdk folder there. Make sure you keep it up to date.

In this folder, you will find: android-sdk\extras\android\m2repository

This is where the Maven artefacts are found for your Android SDK installation.

Now, on Nexus, add a new "Hosted" repository, and under the configuration tab for that hosted repository, enter the "Override Local Storage" location. Something like:

file:/c:/android-sdk/extras/android/m2repository

You should also set the Deployment Policy for this Hosted repository to Read Only.

You can also add this new hosted repository to your Public Repositories group in Nexus, and therefore access the Android dependencies via http://yournexusserver:8081/nexus/content/groups/public/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top