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:
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
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:
maven -Dmaven.repo.local=/usr/share/maven-repo -o "$@" || die "emaven
Additionally, it could do some sanity checks, by parsing the project.xml
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
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.
firstname.lastname@example.org mailing list