Versions Compared

Key

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

...

Code Block
languagexml
<settingsSecurity>
  <master>ENCRYPTEDPASSWORD<<master>ENCRYPTEDMASTERPASSWORD</master>
</settingsSecurity>
  • encrypt your password for `apache` login
Code Block
languagebash
touchcp /usr/share/maven/conf/settings.xml ~/.m2/settings.xml && mvn --encrypt-password
  • Paste the below with your apache username and encrypted password for use in  apache password updated under `<servers>`tag, this will used to publish to apache snapshot and staging in `~/.m2/settings.xml`.
Code Block
languagexml
<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
                          https://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>APACHE_USERNAME<<username>APACHEUSERNAME</username>
      <password>{COQLCE6DU6GtcS5P=}<<password>APACHEPASSWORDENCRYPTED</password>
    </server>
    <!-- To stage a release of some part of Maven -->
    <server>
      <id>apache.releases.https</id>
      <username>APACHE_USERNAME<<username>APACHEUSERNAME</username>
      <password>{COQLCE6DU6GtcS5P=}<<password>APACHEPASSWORDENCRYPTED</password>
    </server>
  </servers>
</settings>

Install Maven on Ubuntu

Code Block
languagebash
sudo apt-get install -y maven


Using Package in Staging Repository

...