Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to my local maven repo. #34

Open
yogurtearl opened this issue Jun 30, 2014 · 6 comments
Open

Publish to my local maven repo. #34

yogurtearl opened this issue Jun 30, 2014 · 6 comments

Comments

@yogurtearl
Copy link

Is there a way to publish to my local maven repo?

@alopix
Copy link

alopix commented Jul 18, 2014

yes. set the RELEASE_REPOSITORY_URL and/or SNAPSHOT_REPOSITORY_URL to the corresponding local maven url, e.g.

RELEASE_REPOSITORY_URL=http://localhost:8080/repository/internal/
SNAPSHOT_REPOSITORY_URL=http://localhost:8080/repository/snapshots/

@yogurtearl
Copy link
Author

I am not running a repo server.
I was wondering about publishing to this: ~/.m2/repository/

@johnjohndoe
Copy link
Contributor

You could use the android-maven-plugin:

// root build.gradle
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.2'
        classpath 'com.github.dcendents:android-maven-plugin:1.0'
    }
}
// library build.gradle
apply plugin: 'android-maven'
version = "1.0.0"
group = "com.example"
archivesBaseName = "awesome-library"

@caseykulm
Copy link

As part of this, you get access to the gradle maven plugin, and one of it's tasks https://docs.gradle.org/current/userguide/maven_plugin.html#N139B5 is install so

$ ./gradlew install

should do it

@caseykulm
Copy link

caseykulm commented Aug 22, 2016

Not sure why yet, but install seems to not pull in all transitive dependencies. The generated pom file is incomplete

@AlexanderLS
Copy link

AlexanderLS commented Jul 19, 2018

@yogurtearl @alopix @johnjohndoe @caseykulm You can publish to your local maven repo with https://github.com/Vorlonsoft/GradleMavenPush. Please read README.md before use it.

6. Build and Deploy/Install

You can now build and deploy on JCenter, Maven Central or Corporate staging/snapshot servers:

$ gradle deployOnServerRepository

Build and install on local Maven (~/.m2/repository/):

$ gradle installOnLocalRepository

Build and deploy on local Maven (~/.m2/repository/):

$ gradle deployOnLocalRepository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants