EMI Maven build optimization

This page contains suggestions to improve the peformance of EMI ETICS maven builds.

Share the local maven repository

Using the the same local maven repository for all maven-based packages improves the ETICS build performance.

A project-level property has been defined for the build-wide maven repository location:

mavenRepositoryDir:    /tmp/m2-repository

To take advantage of it, change your build command to:

mvn -Dmaven.repo.local=${mavenRepositoryDir} 

Run maven in non-interactive mode

Running maven in batch mode makes the etics log much more readable.

Just add the -B to your maven command, like in:

mvn -B

Leverage the CERN maven repository

The CERN nexus maven repository is configured to proxy the following repositories:

  • maven central
  • switch
  • UNICORE
  • shibboleth

To take advantage of it you can download the following settings.xml file:

https://github.com/italiangrid/etics-maven-conf/blob/master/settings.xml

And place it in your code or ETICS configuration, or you can add a build time dependency to emi.misc.maven-common. This component provides the configuration in the following location:

/usr/share/emi-maven-common/settings.xml ...

Then you can take advantage of it by changing your maven build command to:

mvn -s /usr/share/emi-maven-common/settings.xml ...

You can also leverage the ${emi.misc.maven-common.settingsLocation} property in your ETICS configuration to point to the configuration location, like in:

mvn -s ${emi.misc.maven-common.settingsLocation} ...

Note that the above configuration sets maven in batch mode and configures the local maven repository to the shared dir, so if you use the configuration you do not need to provide any other parameter described above.

Once we know that this configuration works well for all the maven-based components we could make it the default maven configuration on the ETICS worker nodes, so that no changes in maven build commands are needed.

-- AndreaCeccanti - 19-Dec-2011

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2011-12-19 - AndreaCeccantiExCern
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EMI All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback