Is it possible to run maven from a postinst mainscript?
I am working on a debian package for apache karaf:
Karaf has an area, called the "system" default repository, containing
jar files structured like a maven repository.
This repository contains all of the karaf modules, some maven
dependencies needed for karaf boot, and some maven dependencies needed
I'm currently in the process of slimming down the "system" default
repository, by removing all dependencies that are needed post boot. If
needed, karaf can download them from maven central.
I have already removed a dependency that always will be needed, but that
isn't needed for the boot phase, the apache sshd, and that worked fine:
Installing this version worked fine, and had an sshd running just after
karaf start, and pulled the sshd dependency into ~karaf/.m2/repository/
(I checked before install that it wasn't there, and verfied after
install that it now was in place).
But the problems appear when I get to the maven dependencies that are
needed for the boot.
In an ideal world these dependencies would be provided by debian
packages and fetched from /usr/share/maven-repository/.
1. Some of the dependencies aren't available as debian packages
2. Some are packaged in debian, but in a different, and incompatible
version to what karaf needs (e.g. libfelix-framework-java)
So I have to choose a different route.
What I would like to do, is to have the postinst script populate the
missing jars into the system default repository using maven and the
To do this I need to have a pom.xml that is used by the postinst
script. Is there a place where this pom.xml could live? Is there a
convention for where to put support files needed by mainscripts?