Skip to end of metadata
Go to start of metadata

This page describes how to encrypt your Maven password and set up your own local Maven repository. We assume that you have already installed and initialized Maven.

For more information about Maven, see Maven website and the freely available Sonatype books.

If you already have a settings.xml file

If you do development with Maven, you probably already have a settings.xml file. The process below overrides your existing ~/.m2/settings.xml. (It creates a backup so no panic.) You might have to manually merge Magnolia specific settings with your existing settings. If you need help, ask at the forum.

Adding <repository> references in the pom files is not an option at the moment as it will prevent our repositories from synchronizing with the Maven Central Repository.

Password encryption

Your Nexus username and password are stored in the settings.xml file in plain text. Maven supports password encryption, however. If you prefer to encrypt your password, do it first. Use the following scripts in a Unix terminal.

Setting up a master password

Create a ~/.m2/settings-security.xml file which contains your encrypted master password. Maven uses this file for further password encryption.

If you can't use the command above (on Windows, typically), just follow the How to create a master password instructions in the Maven documentation.

Setting up your Magnolia Nexus password

Create a ~/.m2/ file which will be used to interpolate the Maven settings downloaded from our Nexus instance.

If you can't use the commands above, take the following steps:

  1. Encrypt your password with Maven. This will output an encrypted version of your password in the terminal.

  2. Create a ~/.m2/settings-defaults.propertiesfile with the following contents:

    (warning) You need to have both the Master Maven password (in /.m2/settings-security.xml) and the (in /.m2/ before applying the settings below. If you change either, you'll have to re-execute the follow-up commands (i.e change the master: re-generate the password AND the settings.xml, if only the latter, you'll also have to regenerate your settings.xml)

Magnolia International developers

If you work at Magnolia International, you'll find instructions in the intranet. (wink) (Maven tips)

You have your own Maven repository

If you have your own Maven repository, these are the repositories you can mirror.


  1. These repositories will eventually be synched to the Maven Central Repository so watch for changes to this page.
  2. You need a Magnolia account to access these repositories. Please get a "robots" account with us.
  3. This will also possibly, eventually, be synched to the Maven Central Repository - contains a few third party artifact we customized and released ourselves (for example a bugfix release of OpenWFE) - we're working on making this obsolete, i.e use dependencies which are available on the Maven Central Repository.
  4. A few artifacts Magnolia uses which are not available on the Maven Central Repository.

Syncing with the Maven Central Repository

We are currently working on getting our public repositories synched to the Maven Central Repository. This would mean, amongst other things, that unless you need snapshots or enterprise-only artifacts, no settings.xml modifications would be necessary.

There are a few third party dependencies we had to fix or release ourselves because they were not present in the Maven Central Repository when we started using them. For most, we should be able to either upgrade to a newer version present on the Maven Central Repository, or have them uploaded. This might take a little while. When that's resolved, we will hopefully be able to completely synchronize our public repositories with the Maven Central Repository!


You can login on the wiki, but your credentials seem to be rejected by the Nexus template download

Some characters such as the euro "€" symbol in passwords cause issues. Try changing your password and see if that helps. If not, ask Greg. He will verify your permissions.

You can login on the Nexus web interface, your template was generated successfully, but somehow the builds fail with permissions issues

It seems some passwords just don't get encrypted correctly (at least with Maven 2.2.1?). Try replacing the encrypted password in your ~/.m2/settings.xml file by its plain text counterpart. If that doesn't work, see above.


  • None
  1. Aug 11, 2010

    In maven-settings-template-enterprise.xml please change the following:







    1. Aug 11, 2010

      Server id is fixed; repo url should still point to the group - well, that's up to you, but using the group, you get releases, snapshots and 3rd party artifacts (those which are not available on central). As mentioned above, if you have your own Maven proxy, then you should proxy our repositories instead, indeed.

  2. Aug 13, 2010

    There was a typo in the previous version of the enterprise settings template, please update !

    1. May 27, 2013

      If you use your own repository manager and proxy all your request through it, I'd suggest to do that, yeah. If on the other hand you're specifying repos in your local settings.xml, just use Using the template as per could help if you don't have a custom settings.xml. OTOH, the archetype should have produced a module that has the appropriate <repository> item(s) in the generated pom.xml.

  3. Aug 06, 2014

    Please note that nexus should be accessed via https only due to man in the middle attacks.  Http access will shortly be switched off.