This page describes how to set up Apache Maven. Follow the official documentation if you are a Community Edition developer, an Enterprise Edition developer or have a project on the Magnolia Forge. Follow the instructions below if you work for Magnolia International. In either case, encrypt your password.
- If you already have a settings.xml file
- Password encryption
- Community Edition, Enterprise Edition and Forge users
- 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)
Community Edition, Enterprise Edition and Forge users
If you are a Community Edition user, an Enterprise Edition user or host your project on the Magnolia Forge, follow the Maven initialization instructions in official documentation.
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.
- http://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/ 1
- http://nexus.magnolia-cms.com/content/repositories/magnolia.public.snapshots/ 1
- http://nexus.magnolia-cms.com/content/repositories/magnolia.forge.releases/ 1
- http://nexus.magnolia-cms.com/content/repositories/magnolia.forge.snapshots/ 1
- http://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases/ 2
- http://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.snapshots/ 2
- http://nexus.magnolia-cms.com/content/repositories/thirdparty.customized/ 3
- http://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:
- 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.