Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
To: Gentoo Java <gentoo-java@g.o>
From: Alistair Bush <alistair.bush@...>
Subject: Taking Maven completely Off-Line
Date: Thu, 23 Jul 2009 13:07:12 +1200
<p>&gt;&gt; This is a blantant copy and paste,  but I thought it might be interesting, useful.<br></p><p><br></p><p>The other thing people talk alot about is other build tools that are better than Ant, e.g. Gant, <a href="">Raven</a> (ruby build scripts for Java) or some other one I heard of recently – ah-ha! found it – <a href="">Gosling</a>
(I’m sure I read a recent article about it somewhere, that pointed to a
newer website?) that lets you write your build in Java and then just
wraps Ant! Bizzaro.</p>
<p>Another one is that people are concerned about their build tool
changing itself over time, and so their build is not necessarily stable
and reproducible. I for one love the idea of self upgrading software –
hey, it’s one step closer to the <a href="">end of the world</a> right? <a href="">Well I for one welcome our build tool overlords.</a>
But seriously, I think that the advantage of having the build tool
upgrade itself and getting the latest bug fixes and feature updates,
outweighs the disadvantage of the build breaking one day. So what? –
You take an hour out, or half a day, or even a day, and fix it!</p>
<p>Buut, if you work in a stiff, rigid environment, or work for NASA or
the militar or something, then there’s a way around this as well. This
is also the suggested best practice for dealing with plugins. (O.k., I
remember reading this information somewhere, but it was harder to find
again than i thought.)</p>
<ol><li>Run mvn help:effective-pom -Doutput=effective.pom this produces a list of the plugin versions your project is currently using.</li><li>Open effective.pom and copy the build-&gt;pluginManagement section
into your pom, optionally deleting the configuration and just keeping
the goupid, artifactid and version.</li><li>Make sure your project packages, to test you got the pluginManagement right.</li><li>Rename your local repository to repository.back</li><li>Run mvn dependency:go-offline – this will download all plugins and their dependencies for your project, into a clean repository.</li>
<li>Move the repository into  your project directory.</li><li>Add the project repository to your POM as described above.</li><li>Try running your mvn package with the –offline option and make sure everythings ok.</li><li>
Rename your backup from repository.bak back to repository.</li><li>Commit.</li><li>Done! You should be able to now build the project off of a fresh checkout and an empty repository.</li><li>If you’ve gone this far, you may as well also commit the version of
Maven your using into your source control as well, in a directory such
as /tools/maven.</li></ol>
<p>When <a href="">MDEP-177</a> is addressed, this will be much easier to do.</p>
<p>On another note, as far as running off-line is concerned, the other
really neat-o thing you should definately do if there are more than two
of you on location (or if you’re keen to share snapshots easily), is
setup a local Maven repository cache/proxy/mirror using <a href="">Nexus</a>. IMO, don’t bother trying Artefactory or the other one, Nexus is da’ bomb.</p><br>Copied from <a href=""></a><br>
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
nsplugin on dev-java/gnu-classpath masked
Next by thread:
New Hamcrest ebuilds
Previous by date:
Re: Any ebuilds for JHotDraw and JStock?
Next by date:
Re: Any ebuilds for JHotDraw and JStock?

Updated Mar 06, 2012

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.