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.
- If you already have a settings.xml file
- Password encryption
- Magnolia International developers
- You have your own Maven repository
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.
<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.
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
~/.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
~/.m2/settings-defaults.properties 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:
Encrypt your password with Maven. This will output an encrypted version of your password in the terminal.
~/.m2/settings-defaults.propertiesfile with the following contents:
You need to have both the Master Maven password (in
/.m2/settings-security.xml) and the
/.m2/settings-defaults.properties) 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 maven.nexus 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. (Maven tips)
You have your own Maven repository
If you have your own Maven repository, these are the repositories you can mirror.
- https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/ 1
- https://nexus.magnolia-cms.com/content/repositories/magnolia.public.snapshots/ 1
- https://nexus.magnolia-cms.com/content/repositories/magnolia.forge.releases/ 1
- https://nexus.magnolia-cms.com/content/repositories/magnolia.forge.snapshots/ 1
- https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases/ 2
- https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.snapshots/ 2
- https://nexus.magnolia-cms.com/content/repositories/thirdparty.customized/ 3
- https://nexus.magnolia-cms.com/content/repositories/thirdparty.licensed/ 4
- These repositories will eventually be synched to the Maven Central Repository so watch for changes to this page.
- You need a Magnolia account to access these repositories. Please get a "robots" account with us.
- 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.
- 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.