[Building Sakai] Maven install issue

Matthew Buckett matthew.buckett at oucs.ox.ac.uk
Tue May 5 01:39:32 PDT 2009


2009/5/5 tannaz alinaghi <tannaz_alinaghi at yahoo.com>:
>
> We are using maven 2.0.9 for building Sakai using "maven -D
> maven.test.skip=true install". But every time an error occurs(such as
> "missing artifact" error) and building process stops, after fixing the error
> and re-executing the command, maven tries to re-download all the necessary
> resources that were downloaded before. Since this is a time consuming
> process and we have to run maven in online mode, what can we do in order to
> avoid downloading all the resources again?

Maven should cache all it's downloaded resources in it's local
repository (~.m2/repository under Unix/Linux).

Normally when maven downloads an artifact it downloads the POM file as
well, so that it can discover any project dependencies. If only the
artifact exists in the repository, it will attempt to download the POM
every time maven runs (this is probably what you are seeing). Sakai
uses several artifacts that don't have POMs and so this may well be
what you are seeing (a common example is the JSF API,
jsf/jsf-api/1.1.01/jsf-api-1.1.01.pom). The ways around this are to
build offline as you suggested or add a POM for the artifact to one of
the repositories (local, proxy, other) but this could take a long time
(probably scriptable).

On a related note if you have a very slow network connection you might
consider running a maven proxy such as nexus which can act as a cache
for builds across multiple machines.

http://nexus.sonatype.org/

-- 
  Matthew Buckett


More information about the sakai-dev mailing list