[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-buildpackage mvn command tries to use /root/.m2/repository



Le 20/01/2018 à 08:46, Steinar Bang a écrit :

> No, I startet with creating files as in this article
>   https://vincent.bernat.im/en/blog/2016-pragmatic-debian-packaging

Ok, I suggest reading the excellent article from Markus about mh_make,
the Vincent's tutorial is a good introduction but it isn't really suited
to Java based projects.


https://gambaru.de/blog/2017/08/02/pdfsam-how-to-upgrade-a-maven-application-for-debian/


> But the problem I have isn't really related to the structure of the
> rules file, I think.  The problem is that dpkg-buildpackage thinks $HOME
> is "/root" and that user "sb" doesn't have write access to root.

The rules file you posted disables the build target, there is no chance
it could work.


> I will share it on github eventually but I'm still working on my first
> commit. :-)

Note that if you need some help in a more interactive mode you can ping
us on IRC (#debian-java on OFTC).


> Actually I planned to go the other way: first build karaf, and then move
> the files where they should go.

Yes this is a good plan.


> There are 34 org.apache.karaf.*.jar files built from the karaf sources,
> and creating individual .deb packages for all of them seems like a lot of work.

You don't have to do that. Just put all the karaf jar files in a
libkaraf-java package, and put the other files required to run the
server in a karaf package. You can start with the karaf source package
building only two binary packages (karaf and libkaraf-java, the former
depending on the later).

I recommend looking at the jetty9 package for an example. That's the
package closest to the structure of karaf (multi module Maven project
building a daemon, with no systemd unit file yet though).

Emmanuel Bourg


Reply to: