From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1Ema5E-0000n0-Fv for garchives@archives.gentoo.org; Wed, 14 Dec 2005 17:06:28 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id jBEH5NGc028809; Wed, 14 Dec 2005 17:05:23 GMT Received: from banta-im.com (roy-rogers.nfic.com [208.231.230.100]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id jBEH5MDu031989 for ; Wed, 14 Dec 2005 17:05:22 GMT Received: from by banta-im.com (8.9.3/8.9.3) with ESMTP id MAA06044 for ; Wed, 14 Dec 2005 12:05:21 -0500 (EST) Subject: [gentoo-java] ideas for packages which use maven to build From: Joshua Nichols To: gentoo-java@lists.gentoo.org Content-Type: text/plain Date: Wed, 14 Dec 2005 12:05:20 -0500 Message-Id: <1134579920.4739.23.camel@francisco-repilado.nfic.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 7bit X-Archives-Salt: 4edf081f-c200-43bc-b617-4f90785b3ad3 X-Archives-Hash: d2d73c6be43aa6e636e810ecadec4b88 I have been thinking recently, and I think I came up with a viable solution for packaging this that use maven for building. The first problem is that maven will attempt to download jar dependencies from a remote repository. This can be avoided by calling maven with -o, for offline mode. This leads to the question of where, then, to get the jars from. I had first thought at build time, we could populate a local repository with symlinks to jars that we provide from packages. This would work, and could be automated to some extent, but I think it would be tedious to maintain a list of jars that each package needs. So, today I came up with the idea of maintaining a package, like maven- repo or something, that basically installs a local repository populated with every jar from the repository... except they would actually be symlinks to the jars provided by a package. For example: /usr/share/maven-repo/commons-validator/jars/commons-validator-1.0.2.jar --> /usr/share/commons-validator/lib/commons-validator.jar This package would need a good amount of maintenance though, but I still think it would be the simplest way to provide a maven repository for building packages. The next thing would be an eclass to support maven-built packages, like java-maven.eclass perhaps. This would add a dependency of the most up- to-date version of maven-repo (~dev-java/maven-repo), and a wrapper for maven to force offline mode and to use our local repo at /usr/share/maven-repo/, ie: emaven() { maven -Dmaven.repo.local=/usr/share/maven-repo -o "$@" || die "emaven failed" } Additionally, it could do some sanity checks, by parsing the project.xml and: make sure that all of its dependencies are in /usr/share/maven-repo make sure that the symlinks aren't broken, ie the package they point to is installed make sure the packages used in maven-repo are in DEPEND/RDEPEND Once we have this framework in place, then we can also begin getting maven built from source. Regards, Josh -- gentoo-java@gentoo.org mailing list