HBASE-5511 More doc on maven release process
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1296316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ffc748589
commit
2c37d21a52
14
pom.xml
14
pom.xml
|
@ -324,6 +324,20 @@
|
|||
can be overwritten here. -->
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven-release.version}</version>
|
||||
<configuration>
|
||||
<!--This stops our running tests for each stage of maven release.
|
||||
We may want to disable this because it looks like this might
|
||||
be responsible for our not including test jar in our release
|
||||
to maven repository. Remove in 0.94 and trunk since tests
|
||||
run faster there?
|
||||
-->
|
||||
<arguments>-Dmaven.test.skip</arguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
|
|
|
@ -142,10 +142,70 @@ Access restriction: The method getLong(Object, long) from the type Unsafe is not
|
|||
<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, hand edit the release.properties file that was put under <varname>${HBASE_HOME}</varname>
|
||||
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.
|
||||
</para>
|
||||
<para>Use maven 3.0.x.
|
||||
</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
|
||||
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.
|
||||
Check out this tag and change the version therein and commit.
|
||||
</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.0mvnrelease
|
||||
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
|
||||
not release. See <link xlink:href="https://issues.apache.org/jira/browse/INFRA-4482">INFRA-4482 Why is my upload to mvn spread across multiple repositories?</link>.</para>
|
||||
<para>Here is my <filename>~/.m2/settings.xml</filename>.
|
||||
<programlisting><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
||||
http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
<servers>
|
||||
<!- To publish a snapshot of some part of Maven -->
|
||||
<server>
|
||||
<id>apache.snapshots.https</id>
|
||||
<username>YOUR_APACHE_ID
|
||||
</username>
|
||||
<password>YOUR_APACHE_PASSWORD
|
||||
</password>
|
||||
</server>
|
||||
<!-- To publish a website using Maven -->
|
||||
<!-- To stage a release of some part of Maven -->
|
||||
<server>
|
||||
<id>apache.releases.https</id>
|
||||
<username>YOUR_APACHE_ID
|
||||
</username>
|
||||
<password>YOUR_APACHE_PASSWORD
|
||||
</password>
|
||||
</server>
|
||||
</servers>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>apache-release</id>
|
||||
<properties>
|
||||
<gpg.keyname>YOUR_KEYNAME</gpg.keyname>
|
||||
<!--Keyname is something like this ... 00A5F21E... do gpg --list-keys to find it-->
|
||||
<gpg.passphrase>YOUR_KEY_PASSWORD
|
||||
</gpg.passphrase>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>When you run <command>release:perform</command>, pass <command>-Dapache-release</command>
|
||||
else it will not 'sign' the artifacts it uploads.
|
||||
</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...
|
||||
|
@ -168,6 +228,7 @@ Access restriction: The method getLong(Object, long) from the type Unsafe is not
|
|||
[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.
|
||||
|
|
Loading…
Reference in New Issue