imgix-java icon indicating copy to clipboard operation
imgix-java copied to clipboard

Put jar in Maven Central

Open stickfigure opened this issue 11 years ago • 25 comments

stickfigure avatar Jun 09 '15 22:06 stickfigure

Alright, I'm running into a few issues getting this published on Maven central. Can you paste in some commands to run? The one that keeps happening looks to be a permissions issue:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project imgix: Unable to commit files

I've triple-checked permissions on our end, and my local client has push capabilities. Any ideas?

kellysutton avatar Jun 10 '15 01:06 kellysutton

The only commands I use to upload a release are mvn release:prepare; mvn release:perform.

My ~/.m2/settings.xml looks like this:

<settings>
    <servers>
        <server>
            <id>ossrh</id>
            <username>my-username</username>
            <password>my-password</password>
        </server>
    </servers>

    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <gpg.passphrase>my-gpg-passphrase</gpg.passphrase>
            </properties>
        </profile>
    </profiles>
</settings>

stickfigure avatar Jun 10 '15 01:06 stickfigure

+1

goldensunliu avatar Jul 21 '15 20:07 goldensunliu

Heard loud and clear. We'll give this another try on our end!

kellysutton avatar Jul 22 '15 22:07 kellysutton

+1 please

yayitswei avatar Jan 24 '16 09:01 yayitswei

Hey @yayitswei, I'm going to get this sorted out this week. :grin:

paulstraw avatar Jan 25 '16 18:01 paulstraw

I'm working on getting this into the Central. I've filed a ticket with OSSRH to get it added on their end so I can actually publish it.

paulstraw avatar Jan 29 '16 23:01 paulstraw

You might consider Bintray jCenter instead of or in addition to Maven Central. We've found it a fair bit easier to work with.

matthurne avatar Feb 11 '16 19:02 matthurne

If you want to pursue publishing to jCenter and switch to Gradle, you might find the build.gradle and README in this project a useful reference: https://github.com/commercehub-oss/dropwizard-mongo

matthurne avatar Feb 11 '16 19:02 matthurne

@paulstraw it looks like that OSSRH ticket went through. Did you ever end up publishing the artifact?

eboto avatar Jul 08 '16 21:07 eboto

@paulstraw and @kellysutton any news on getting this to Maven or JCenter?

forrestbice avatar Sep 02 '16 18:09 forrestbice

Unfortunately not @forrestbice. We've tried publishing to Maven several times with varying degrees of non-success. I'll investigate JCenter.

paulstraw avatar Sep 02 '16 18:09 paulstraw

@paulstraw thanks for the speedy response and for taking another look at this, it'd be awesome to get this in JCenter which is actually preferred over Maven. Let me know if I can be of assistance. Would love to include this in my company's Android project without having to build my own Jar

forrestbice avatar Sep 02 '16 18:09 forrestbice

@paulstraw this looks like a nice guide and in fact it appears you'll only need to follow Step 1 of the How to upload your library to jcenter section: https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en

forrestbice avatar Sep 02 '16 19:09 forrestbice

Very cool @forrestbice, I'll take a look at that shortly! Appreciate the help 👌

paulstraw avatar Sep 02 '16 19:09 paulstraw

Awesome! And actually I jumped the gun on my advice. The tutorial outlines a 7 step process and you can simply skip steps 2 and 3 if you don't plan to upload to Maven and only plan to upload to JCenter which seems fine; Android Studio default repository is now JCenter instead of Maven

forrestbice avatar Sep 02 '16 19:09 forrestbice

screen-shot-2016-09-02-15-16-28

Progress, I think? Though unfortunately that notification doesn't give any next steps. I'm hoping they'll email me?

paulstraw avatar Sep 02 '16 22:09 paulstraw

@paulstraw which step of the guide I liked to are you on?

forrestbice avatar Sep 03 '16 00:09 forrestbice

@forrestbice That guide is unfortunately a bit dated. I ended up first switching the entire project over to Gradle, then following the directions here: https://github.com/bintray/gradle-bintray-plugin

I believe things are just pending inclusion into the JCenter repository now.

paulstraw avatar Sep 03 '16 00:09 paulstraw

Ah ok cool, looks like I found it here: https://bintray.com/imgix/imgix-java/imgix-java. Please let me know once you think it's been approved. Also if you need a good reference for a library that has been approved Butterknife is a good example https://bintray.com/bintray/jcenter/com.jakewharton%3Abutterknife

forrestbice avatar Sep 03 '16 00:09 forrestbice