More edits to the publishing to maven repo section
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1384932 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a718cf3b8
commit
cc2cb6061c
|
@ -153,34 +153,71 @@ mvn clean compile
|
|||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section xml:id="build.gotchas"><title>Build Gotchas</title>
|
||||
<para>If you see <code>Unable to find resource 'VM_global_library.vm'</code>, ignore it.
|
||||
Its not an error. It is <link xlink:href="http://jira.codehaus.org/browse/MSITE-286">officially ugly</link> though.
|
||||
</para>
|
||||
</section>
|
||||
</section> <!-- build -->
|
||||
<section xml:id="mvn_repo">
|
||||
<title>Adding an HBase release to Apache's Maven Repository</title>
|
||||
<para>Follow the instructions at
|
||||
<link xlink:href="http://www.apache.org/dev/publishing-maven-artifacts.html">Publishing Maven Artifacts</link>.
|
||||
The 'trick' to making it all work is answering the questions put to you by the mvn release plugin properly,
|
||||
making sure it is using the actual branch AND before doing the <command>mvn release:perform</command> step,
|
||||
VERY IMPORTANT, check and if necessary hand edit the release.properties file that was put under <varname>${HBASE_HOME}</varname>
|
||||
by the previous step, <command>release:perform</command>. You need to edit it to make it point at
|
||||
right locations in SVN.
|
||||
<link xlink:href="http://www.apache.org/dev/publishing-maven-artifacts.html">Publishing Maven Artifacts</link> after
|
||||
reading the below.
|
||||
</para>
|
||||
<para>Use maven 3.0.x.
|
||||
<para>You must use maven 3.0.x.
|
||||
</para>
|
||||
<para>Let me list out the commands I used first. The sections that follow dig in more
|
||||
on what is going on. In this example, we are releasing the 0.92.2 jar to the apache
|
||||
maven repository.
|
||||
<programlisting>
|
||||
853 svn copy -m "Publishing 0.92.2 to mvn" https://svn.apache.org/repos/asf/hbase/tags/0.92.2 https://svn.apache.org/repos/asf/hbase/tags/0.92.2mvn
|
||||
857 svn checkout https://svn.apache.org/repos/asf/hbase/tags/0.92.2mvn
|
||||
858 cd 0.92.2mvn/
|
||||
860 vi pom.xml
|
||||
861 svn commit -m "Add SNAPSHOT to the version" pom.xml
|
||||
862 ~/bin/mvn/bin/mvn release:clean
|
||||
863 ~/bin/mvn/bin/mvn release:perform
|
||||
865 ~/bin/mvn/bin/mvn release:prepare
|
||||
866 # Answer questions and then ^C to kill the build
|
||||
867 vi release.properties
|
||||
# Change the references to trunk svn to be 0.92.2mvn
|
||||
# Then restart the release:prepare -- it won't ask questions
|
||||
# because the properties file exists.
|
||||
868 ~/bin/mvn/bin/mvn release:prepare
|
||||
869 ~/bin/mvn/bin/mvn release:perform -Papache-release
|
||||
# When done copying up to apache staging repository,
|
||||
# browse to repository.apache.org, login and finish
|
||||
# the release as according to the above
|
||||
# "Publishing Maven Artifacts.
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>At the <command>mvn release:perform</command> step, before starting, if you are for example
|
||||
releasing hbase 0.92.0, you need to make sure the pom.xml version is 0.92.0-SNAPSHOT. This needs
|
||||
releasing hbase 0.92.2, you need to make sure the pom.xml version is 0.92.2-SNAPSHOT. This needs
|
||||
to be checked in. Since we do the maven release after actual release, I've been doing this
|
||||
checkin into a particular tag rather than into the actual release tag. So, say we released
|
||||
hbase 0.92.0 and now we want to do the release to the maven repository, in svn, the 0.92.0
|
||||
release will be tagged 0.92.0. Making the maven release, copy the 0.92.0 tag to 0.92.0mvn.
|
||||
checkin into a particular tag that is a copy of the release rather than into the actual release tag.
|
||||
So, say we released hbase 0.92.2 and now we want to do the release to the maven repository, in svn, the 0.92.2
|
||||
release will be tagged 0.92.2. Making the maven release, copy the 0.92.2 tag to 0.92.2mvn.
|
||||
Check out this tag and change the version therein and commit.
|
||||
</para>
|
||||
<para>
|
||||
Currently, the mvn release wants to go against trunk. I haven't figured how to tell it to do otherwise
|
||||
so I do the below hack. The hack comprises answering the questions put to you by the mvn release plugin properly,
|
||||
then immediately control-C'ing the build. You'll notice a release.properties in your build dir. Review it.
|
||||
Make sure it is using the proper branch -- it tends to use trunk rather than the 0.92.2mvn or whatever
|
||||
that you want it to use -- so hand edit the release.properties file that was put under <varname>${HBASE_HOME}</varname>
|
||||
by the <command>release:perform</command> invocation. When done, resstart the
|
||||
<command>release:perform</command> invocation.
|
||||
</para>
|
||||
<para>Here is how I'd answer the questions at <command>release:prepare</command> time:
|
||||
<programlisting>What is the release version for "HBase"? (org.apache.hbase:hbase) 0.92.2: :
|
||||
What is SCM release tag or label for "HBase"? (org.apache.hbase:hbase) hbase-0.92.2: : 0.92.2mvn
|
||||
What is the new development version for "HBase"? (org.apache.hbase:hbase) 0.92.3-SNAPSHOT: :
|
||||
[INFO] Transforming 'HBase'...</programlisting>
|
||||
</para>
|
||||
<para>When you run <command>release:perform</command>, pass <command>-Papache-release</command>
|
||||
else it will not 'sign' the artifacts it uploads.
|
||||
</para>
|
||||
<para>Here is how I'd answer the questions at <command>release:prepare</command> time:
|
||||
<programlisting>What is the release version for "HBase"? (org.apache.hbase:hbase) 0.92.0: :
|
||||
What is SCM release tag or label for "HBase"? (org.apache.hbase:hbase) hbase-0.92.0: : 0.92.0mvn
|
||||
What is the new development version for "HBase"? (org.apache.hbase:hbase) 0.92.1-SNAPSHOT: :
|
||||
[INFO] Transforming 'HBase'...</programlisting>
|
||||
</para>
|
||||
<para>A strange issue I ran into was the one where the upload into the apache
|
||||
repository was being sprayed across multiple apache machines making it so I could
|
||||
|
@ -225,7 +262,6 @@ What is the new development version for "HBase"? (org.apache.hbase:hbase) 0.92.1
|
|||
</programlisting>
|
||||
</para>
|
||||
|
||||
|
||||
<para>If you see run into the below, its because you need to edit version in the pom.xml and add
|
||||
<code>-SNAPSHOT</code> to the version (and commit).
|
||||
<programlisting>[INFO] Scanning for projects...
|
||||
|
@ -248,13 +284,6 @@ What is the new development version for "HBase"? (org.apache.hbase:hbase) 0.92.1
|
|||
[INFO] -----------------------------------------------------------------------</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="build.gotchas"><title>Build Gotchas</title>
|
||||
<para>If you see <code>Unable to find resource 'VM_global_library.vm'</code>, ignore it.
|
||||
Its not an error. It is <link xlink:href="http://jira.codehaus.org/browse/MSITE-286">officially ugly</link> though.
|
||||
</para>
|
||||
</section>
|
||||
</section> <!-- build -->
|
||||
<section xml:id="hbase.org">
|
||||
<title>Updating hbase.apache.org</title>
|
||||
<section xml:id="hbase.org.site.contributing">
|
||||
|
|
Loading…
Reference in New Issue