Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleUpload to SVN
# Checkout the SVN folder containing the KEYS file
svn co https://dist.apache.org/repos/dist/dev/incubator/streampipes 


# Export the key in ascii format and append it to the file
( gpg --list-sigs $USER@apache.org
  gpg --export --armor $USER@apache.org ) >> KEYS

# Commit to SVN
svn ci -m "Added gpg key for $USER"

...

Code Block
languagebash
titleUpload to release SVN
svn co https://dist.apache.org/repos/dist/release/incubator/streampipes 

# ... Same as above

( gpg --list-sigs $USER@apache.org
  gpg --export --armor $USER@apache.org ) >> KEYS

# Commit to SVN
svn ci -m "Added gpg key for $USER"

...

Code Block
languagebash
titlePublish key to a public key server
# Use the key id to publish it to a public key server:

gpg --send-key 8C75C738C33372AE198FD10CC238A8CAAC055FD2


Update KEYS file

If this is your first time as a RM, you need to add your GPG key to the KEYS file in the distribution directories:



Preparing the system for being able to release

...

Code Block
languagexml
titleApache Repo Settings
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <!-- Apache Repo Settings -->
    <server>
        <id>apache.snapshots.https</id>
        <username>{user-id}</username>
        <password>{user-pass}</password>
    </server>
    <server>
        <id>apache.releases.https</id>
        <username>{user-id}</username>
        <password>{user-pass}</password>
    </server>
  </servers>
</settings>


Warning

For security reasons, please refrain from adding your password in plain text here!
Maven provides a secure way to input passwords through encryption.
To understand how this works, refer to the information box below.


Expand
titleSecure password handling in maven
  1. Run mvn --encrypt-master-password
    Maven will ask you to prompt a master password that is used to encrypt all passwords handled/used by Maven.
    Once done, it prints the encrypted master password. Please copy the entire password (including braces!!).

  2. Create a settings-security.xml
    Create the file ${user.home}/.m2/settings-security.xml with the following content:

    <settingsSecurity>
    <master>[your-password-with-braces]</master>
    </settingsSecurity>

  3. Encrypt your Apache password
    Run mvn --encrypt-password
    Enter your password
    Copy the returned password (again including braces) and add it to the settings.xml as displayed above



This tells maven to use above credentials as soon as a repository with the id apache.snapshots.https or apache.releases.https is being used. For a release all you need is the releases repo, but it is good to have the other in place as it enables you to also deploy SNAPSHOTs from your system. There repos are defined in the apache parent pom and is identical for all Apache projects.

...

Code Block
languagexml
titleMaven GPG Settings
<profile>
  <id>apache-release</id>
  <properties>
    <gpg.keyname>5C60D6B9</gpg.keyname><!-- Your GPG Keyname here -->
    <!-- Use an agent: Prevents being asked for the password during the build -->
    <gpg.useagent>true</gpg.useagent>
    <gpg.passphrase>topsecret-password</gpg.passphrase>
  </properties>
</profile>


Warning

Please don't provide the passphrase here as plain text.
Instead encrypt it via Maven as shown above.