Achievements unlockedAlfresco is a BIG piece of software, and building it is not simple. There are several editions (Community, Enterprise, Cloud), several code generation steps, a huge number of external dependencies, etc. Also, a lot of quirks had accumulated in the Ant build over the years, as they do...
- June 2012: Deploying Alfresco artifacts to a Maven Repository
This was a popular request by customers and partners, who were already using Maven or Gradle. Gabriele Columbro had already started the job. We extracted the jars and wars of all past releases and uploaded them to http://artifacts.alfresco.com/
- November 2012: Adding dependency declarations
pom.xmlfiles for these artifacts were empty. With Alfresco 4.1.2, we started writing and providing POM files that defined the dependencies, both between Alfresco artifacts and with 3rd party libraries. This was also the start of the parallel build: the same code was built in both Ant and Maven in our continuous integration, to make sure the POM files were correct.
- July 2013: Separating test classes
A big problem was that the main and test classes were mixed in the same source folders. Mao had find a nice hack to overcome that, by recreating a Maven standard layout on the fly in the target folder! But a complete separation was overdue, and we finally did it for Alfresco 4.2
- December 2013: MyAlfresco built with Maven
This happened under the hood. We had decided that the build of the Cloud version my.alfresco.com would be easier to switch to Maven: it only needs to support one platform, and the artifacts to build are much simpler. At the end of the year, the Maven build was deemed good enough to be put in production.
- February 2014: Separating unit tests from integration tests
This was mostly the work of Gethin James, who was tired of typing
-DskipTests... The default Maven build now fires only unit tests, so there is no need to worry about configuring the database or waiting for hours: Just type
mvn clean install:-)
- June 2014: Alfresco Community 5.0.a is now built with Maven!
Changes on your side
First, the infamous
classifier=config artifacts, which contained the resources of each jar file, have now gone. The resources are contained in the jar, as is standard in most places. If you depend on such artifacts, just remove them from your dependencies.
alfresco-solris simply a war file, which comes with its jar of classes (
classifier=classes). Yes, and another artifact that contains the configuration (
classifier=config), which should be unzipped on top of it if you need to run Solr.
alfresco-mmtis now a standalone executable jar, rather than a small jar with dependencies on third-party libraries, for convenience
A new version of the Maven SDK is on its way, which will support Alfresco 5.0, along with a few added goodies. Thank you Ole Hejlskov for your help with it!
The Enterprise version of Alfresco still requires a bit of work. This will be the last step before we can remove the Ant build completely - including all these annoying committed libraries!