| Your Rating: |
![]() ![]() ![]() ![]()
|
Results: |
![]() ![]() ![]() ![]()
|
3 | rates |
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.
Maven is used to build Magnolia CMS. For more information 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/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.
Create a
~/.m2/settings-defaults.propertiesfile with the following contents:
You need to have both the Master Maven password (in /.m2/settings-security.xml) and themagnolia.nexus.password(in/.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 configure Maven to use our Nexus instance for all its requests, including those to the Maven Central Repository. Our Nexus instance hosts all our repositories and proxies many others.
- Follow the password encryption instructions above. You need a
~/.m2/settings-default.propertiesfile containing themagnolia.nexus.passwordkey before proceeding. Execute this command:
Ask Grégory Joseph for the name of the template (it contains private information) until https://issues.sonatype.org/browse/NXCM-2324 is resolved.
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
Remarks:
- 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!
Troubleshooting
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.

3 Comments
Hide/Show CommentsAug 11, 2010
triplex
In maven-settings-template-enterprise.xml please change the following:
<server>
<id>magnolia.nexus.enterprise</id>
</server>
<repository>
<id>magnolia.nexus.enterprise</id>
<url>http://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases</url>
Aug 11, 2010
Grégory Joseph
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.
Aug 13, 2010
Grégory Joseph
There was a typo in the previous version of the enterprise settings template, please update !