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

Already on GitHub? Sign in to your account

#370: prepare build for uploading artifacts to maven central #56

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants

Hi,

one of your 'Fun-Projects' was to provide Voldemort artifacts from maven central. I prepared the build.xml, added the maven-ant-task.jar an pom.xml-template to make it should work.

But there is more to do on your side. Your 'Release-Manager' has to create an Account on Sonatype OSS and to create an 'Project-Request' on Sonatype OSS Jira. You can read the following well written documentation: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide

Or you can ask me for some help, if it is possible for me to help. Or if you have any further questions.

This pullrequest relates to:
http://code.google.com/p/project-voldemort/issues/detail?id=370

Cheers,
Jörg

Contributor

afeinberg commented Nov 12, 2011

Thanks, I believe we have a sona type account already for the team. Will try this out and then merge this in.

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.properties
@@ -34,4 +34,5 @@ tomcat.manager.password=tomcat
tomcat.context=/voldemort
## Release
-curr.release=0.90.1
+#curr.release=0.90.1
+curr.release=0.0.1-test
@afeinberg

afeinberg Dec 7, 2011

Contributor

Why are you setting it to 0.0.1-test?

@jbellmann

jbellmann Dec 9, 2011

I tried an upload with my own account, to the staging area. But does not work. Was an test.

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.xml
@@ -18,12 +30,12 @@
<!-- set the build number based on environment variable, otherwise blank -->
<property environment="env" description="System environment variables (including those set by Hudson)"/>
<condition property="curr.release.snapshot" value="${curr.release}-snapshot-${env.BUILD_NUMBER}" else="${curr.release}">
- <and>
- <isset property="env.BUILD_NUMBER" />
- <not>
- <equals arg1="" arg2="${env.BUILD_NUMBER}" trim="yes"/>
- </not>
- </and>
+ <and>
+ <isset property="env.BUILD_NUMBER" />
+ <not>
@afeinberg

afeinberg Dec 7, 2011

Contributor

Can you explain why this is done?

@jbellmann

jbellmann Dec 9, 2011

Are there any differences? Seems to me only the whitespace makes a different here. Maybe a result of 'autoformat' in the editor?

@jbellmann

jbellmann Dec 9, 2011

Same below on old line 119. Just indents 'fixed'.

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.xml
- <exclude name="${dist.dir}/*classes"/>
- <exclude name="${dist.dir}/*.zip"/>
- <exclude name="bin/*"/>
- <exclude name=".git*/**"/>
- </tarfileset>
- </tar>
+ <antcall target="all"/>
+ <zip destfile="${dist.dir}/${name}-@{version}.zip">
+ <zipfileset dir="." prefix="voldemort-@{version}" filemode="755" includes="bin/*"/>
+ <zipfileset dir="." prefix="voldemort-@{version}" includes="**">
+ <exclude name="${dist.dir}/*classes"/>
+ <exclude name="bin/*"/>
+ <exclude name=".git*/**"/>
+ </zipfileset>
+ </zip>
+ <tar destfile="${dist.dir}/${name}-@{version}.tar.gz" compression="gzip" longfile="gnu">
@afeinberg

afeinberg Dec 7, 2011

Contributor

Can you please fix the indentation here?

@jbellmann

jbellmann Dec 9, 2011

Do you think indentation is wrong? 'sequential' is an opening-element. So 'antcall', 'zip', 'tar' are chilldren and therefore indented. 'sequential' closes on line 362.
What dou you think?

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.xml
@@ -434,10 +459,98 @@
</target>
<target name="undeploy" description="Undeploy application">
- <undeploy url="${tomcat.manager.url}"
- username="${tomcat.manager.username}"
- password="${tomcat.manager.password}"
- path="${tomcat.context}"/>
+ <undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${tomcat.context}" />
@afeinberg

afeinberg Dec 7, 2011

Contributor

Please revert indentation back to the original, so the diff isn't there

@jbellmann

jbellmann Dec 9, 2011

I will try it. Do I have to create an new 'pull-request' when done?

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.xml
@@ -434,10 +459,98 @@
</target>
<target name="undeploy" description="Undeploy application">
- <undeploy url="${tomcat.manager.url}"
- username="${tomcat.manager.username}"
- password="${tomcat.manager.password}"
- path="${tomcat.context}"/>
+ <undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${tomcat.context}" />
+ </target>
+
+
@afeinberg

afeinberg Dec 7, 2011

Contributor

Please remove the spaces

@jbellmann

jbellmann Dec 9, 2011

Same as comment above.

@afeinberg afeinberg commented on the diff Dec 7, 2011

build.xml
+ <arg value="-Durl=${maven-staging-repository-url}" />
+ <arg value="-DrepositoryId=${maven-staging-repository-id}" />
+ <arg value="-DpomFile=${dist.dir}/pom.xml" />
+ <arg value="-Dfile=${dist.dir}/${name}-${curr.release}-all-src.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Pgpg" />
+ </artifact:mvn>
+
+ <!-- sign and deploy the javadoc artifact -->
+ <artifact:mvn>
+ <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
+ <arg value="-Durl=${maven-staging-repository-url}" />
+ <arg value="-DrepositoryId=${maven-staging-repository-id}" />
+ <arg value="-DpomFile=${dist.dir}/pom.xml" />
+ <arg value="-Dfile=${dist.dir}/${name}-${curr.release}-all-docs.jar" />
+ <arg value="-Dclassifier=javadoc" />
@afeinberg

afeinberg Dec 7, 2011

Contributor

How would deployment work, e.g., where would I need to specify my username and password, provide the PGP key?

@jbellmann

jbellmann Dec 9, 2011

Please read:

https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7c.DeploySnapshotsandStageReleaseswithAnt

but I would not configure a 'pgp-profile', so you should be prompted for your passphrase when the artifacts will be signed and uploaded.

then:

ant uploadSnapshots

ant stageReleases

Contributor

afeinberg commented Dec 7, 2011

Hi,

I just added some comments.

I have an account ready for sonatype, would I now need to upload my GPG key in order to sign this, or will this be done at another level?

Thanks,

  • Alex
Contributor

afeinberg commented Dec 7, 2011

Please let me know when you make the stylistic changes, and I'll give this a shot.

Thanks,

  • Alex

@ghost ghost assigned abh1nay Sep 25, 2012

+1
It would be great if Voldemort were in Maven Central

Collaborator

FelixGV commented Mar 16, 2015

Hi,

I believe this probably won't work as we moved away from the ant build towards gradle instead. In any case, we need to clean up dependencies before Maven Central publishing can be achieved. I've started doing that here: #243

After that, we'll only need to figure out how to depend on bdb-je and then we can publish Voldemort artifacts to Maven Central (:

-F

Hi,

in any case, thanks for the work., I'll be around in order to find out when the goal is achieved ;-)

Collaborator

FelixGV commented Apr 15, 2015

FYI: All dependencies besides BDB-JE have been cleaned up. We need to test #247 before we are free from all checked in dependencies... We want to be careful because the BDB-JE upgrade might introduce performance regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment