Re: Getting Maven Into Main - What Next?
On Friday May 25 2007, Paul Cager wrote:
> Now that we are making progress with packaging Maven's
..
Hi Paul and all,
Just fyi I am an active Maven and long time Debian/Ubuntu user with
very little packaging know how....
First I want to recommend two resources (both free)
The books
Better Builds with Maven
http://www.mergere.com/m2book_download.jsp
Maven: The Definitive Guide (1.0 Alpha 1)
http://www.sonatype.com/book/index.html
> * Create a local repository for Maven, e.g.
> debian/.m2/repository. For each build-dependency create the
> appropriate directory structure (e.g.
> debian/.m2/repository/plexus/plexus-utils/1.0.2/).
I would actually suggest to start building a debian build server
internal maven repository.
http://maven.apache.org/guides/introduction/introduction-to-repositories.html
Together with a proxy (e.g. proximity .. also documented in the books)
it can be ensured that a build is basically done without going out to
the internet for any artifacts and it is guaranteed that only allowed
internal artifacts are use.
The repository should only contain packages that are in debian. Maven
could actually deploy artifacts to the repo as part of the build
process.
For other builds it would be good if the packages can deploy to the
repo as well. Than any maven build can just declare the right debian
dependency.
> * Copy (or symlink) the build-depends jars from /usr/share/java
> to our repository. This should ensure that maven does not try to
> download any dependencies. (I imagine maven also has an option to
> inhibit downloads; it would be safest to set this, and/or set
> http_proxy).
Use of proxies is a bit documented here
http://maven.apache.org/guides/mini/guide-proxies.html
To run maven in offline mode there is a -o flag.
> * Set "localRepository" to "debian/.m2/repository", and call
> maven's bootstrap shell script. (this process is described in
> http://maven.apache.org/guides/development/guide-building-m2.html)
It might be a good idea to create a "company" pom for Debian that
contains all settings and so on that apply to all Debian packages
that are build with Maven. Otherwise a debian profile in a
settings.xml could achieve similar things.
I am sure the maven team could be of great help. I told Jason at Java
One that the Debian team is packaging Maven and he was astonished and
delighted. He or somebody else might be able to give a good tip here
and there.
I hope this helps a bit.
manfred
--
Manfred Moser
http://www.mosabuam.com
skype: mosabua
http://www.linkedin.com/in/manfredmoser
Reply to: