Differences between revisions 9 and 10
Revision 9 as of 2012-10-26 23:01:45
Size: 4446
Editor: SteveRowe
Comment: Consolidate Lucene and Solr instructions
Revision 10 as of 2013-01-21 14:59:10
Size: 4582
Editor: SteveRowe
Comment: Mention OS X $HOME <=> '~' problem
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
ant clean stage-maven-artifacts -Dmaven.dist.dir=~/temp -Dm2.repository.id=apache.releases.https -Dm2.repository.url=https://repository.apache.org/service/local/staging/deploy/maven2 ant clean stage-maven-artifacts -Dmaven.dist.dir=/Users/username/temp/lusolrXYmaven -Dm2.repository.id=apache.releases.https -Dm2.repository.url=https://repository.apache.org/service/local/staging/deploy/maven2
Line 11: Line 11:
   * {{{maven.dist.dir}}} is the directory containing the Lucene and/or Solr Maven artifacts.    * {{{maven.dist.dir}}} is the directory containing the Lucene and/or Solr Maven artifacts.  Under OS X, using the '{{{~}}}' alias for {{{$HOME}}} doesn't seem to work - use an absolute path instead.

Publish Lucene/Solr Maven Release Artifacts

See http://www.apache.org/dev/publishing-maven-artifacts.html for more general instructions.

  1. Download the Lucene/Solr Maven artifacts (if you don't already have them) using dev-tools/scripts/crawl.maven.release.dist.sh - they will be placed in lucene/ and solr/ directories in the current directory.

    The Lucene and Solr artifacts may be staged either together in one pass, or separately in two passes. To stage both products' artifacts in one pass, specify as maven.dist.dir the parent directory of lucene/ and solr/; to stage separately, run ant stage-maven-artifacts twice, specifying as maven.dist.dir first either the lucene/ or the solr/ directory, and then the other.

  2. Stage the Lucene and/or Solr artifacts using the stage-maven-artifacts target run from a checked-out lucene/ source directory, e.g.

    ant clean stage-maven-artifacts -Dmaven.dist.dir=/Users/username/temp/lusolrXYmaven -Dm2.repository.id=apache.releases.https -Dm2.repository.url=https://repository.apache.org/service/local/staging/deploy/maven2
    • maven.dist.dir is the directory containing the Lucene and/or Solr Maven artifacts. Under OS X, using the '~' alias for $HOME doesn't seem to work - use an absolute path instead.

    • m2.repository.id is the ID of the ASF Maven staging repository.

    • m2.repository.url is the staging URL for the ASF Maven staging repository.

    You will be prompted to supply your ASF credentials. To skip this prompt, you can store your credentials in settings.xml - see below for details.

  3. Close the staging repository created by stage-maven-artifacts - "closing" a staging repository disallows further artifact staging to the staging repository, and performs some quality checks, including POM and signature validation:

    1. Log into https://repository.apache.org/index.html using your ASF credentials.

    2. Select "Staging Repositories" under "Build Promotion" from the navigation bar on the left.
    3. Select the staging repository containing the Lucene artifacts.
    4. Click on the "Close" button above the repository list, then enter a description when prompted, e.g. "Lucene/Solr 4.1RC0".
  4. To drop a staging repository, if for example a release candidate was staged but will not be released:
    1. Log into https://repository.apache.org/index.html using your ASF credentials.

    2. Select "Staging Repositories" under "Build Promotion" from the navigation bar on the left.
    3. Select the staging repository containing the Lucene artifacts.
    4. Click on the "Drop" button above the repository list, then enter a description when prompted, e.g. "not the final release candidate".
  5. Release the Lucene and/or Solr artifacts:
    1. Log into https://repository.apache.org/index.html using your ASF credentials.

    2. Select "Staging Repositories" under "Build Promotion" from the navigation bar on the left.
    3. Select the staging repository containing the Lucene artifacts.
    4. Click on the "Release" button above the repository list, then enter a description when prompted, e.g. "Lucene/Solr 4.1".

Storing credentials for the staging repository

By default, ant stage-maven-artifacts will prompt you to supply your ASF credentials. However, if you specify -Dm2.credentials.prompt=false, your credentials will be drawn from your ~/.ant/settings.xml or ~/.m2/settings.xml. Note that the staging repository ID value supplied via -Dm2.repository.id=... must match the <server><id>...</id></server> given in your settings.xml.

Make sure the following is in either ~/.ant/settings.xml or ~/.m2/settings.xml (see http://maven.apache.org/settings.html#Servers for details):

<settings>
  <servers>
    <server>
      <id>apache.releases.https</id>
      <username>Your ASF username</username>
      <password>Your ASF password</password>
    </server>
  </servers>
</settings>

<!> Because Maven Ant Tasks, used by the Lucene/Solr build to stage Maven artifacts, can't handle encrypted passwords in settings.xml (as of version 2.1.3, anyway; see MANTTASKS-177), your password must be in plaintext - make sure permissions on this file are set to disallow access by other people, e.g. 600.

PublishMavenArtifacts (last edited 2013-01-21 14:59:10 by SteveRowe)