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

Re: Building maven packages



On 30.12.2016 00:52, Wookey wrote:
> On 2016-12-30 00:11 +0100, Markus Koschany wrote:
>> On 29.12.2016 02:29, Wookey wrote:
> 
>> Don't try to hard to make mh_make happy because it can only give you a
>> rudimentary skeleton debian directory. (For "easy" packages it works
>> much better but more complicated projects won't work as expected). We
>> usually use existing packages, which are quite similar, as templates.
> 
> OK, but to do it without mh_make requires me to get a much better
> understanding of the files it produces:
> maven.cleanIgnoreRules
> maven.ignoreRules
> maven.publishedRules
> maven.rules
> 
> And maven-debian-helper doesn't have a README or any manpages. Where
> are the docs that explain which mh_ commands use which of those files
> and exactly what the lines mean, what the fields are and so on? I can
> stab about in the dark but this stuff works much better if one reads
> the docs and has at least some idea what one is doing, IME.
> 
> Do I not get a control and rules file because I'm getting errors and
> mh_make is not getting to the end? (Yes, I copied some from another
> maven java package, but they may well be wrong)

Indeed mh_make can easily fail and you will not get a proper debian
directory. Hence I suggest to ignore the mh_make questions (press N) if
the dependency is not available in Debian. First of all you should
install all required build-dependencies _before_ mh_make is called.
mh_make is not smart enough to determine the build dependencies
automatically if they are not already installed on your system. Check
the main pom.xml file and any other pom.xml in your project. Everything
between the <dependencies> lines is important. After that when running
mh_make ignore the tests and the javadoc target which simplifies the
whole generation step.

Improving the Debian Java documentation is a long standing goal of us
and I hope to complete this task in this life. For now here are some
simple guidelines:

maven.cleanIgnoreRules: forget about that, I have never used it once

maven.ignoreRules: This file allows you to ignore certain Maven artifacts.

If you take a look at those pom.xml files it starts to make sense: The
file consists of

groupId artifactId version type version classifier scope

org.apache foo * s/.*/debian * *

where the * is a wildcard. Almost always you only need to care about
the groupId the artifactId and the version in maven.ignoreRules and then
this dependency will be ignored by Maven. Thus you don't have to package
it. (Disclaimer: But you might have to patch some files afterwards..)

maven.publishedRules:

hardly used by any packages, shouldn't bother you

maven.rules:

Same syntax as maven.ignoreRules but here you can adjust/fix the version
in the pom.xml file to use the Debian one. 		

[...]
> But mh_make asks me if I want to set the vers to 'debian' everywhere,
> or not. And the default isn't always 'use debian', although it usually
> is.  

Always use debian if you are unsure or ask on the list. Again, it is
easier for us to help you if you provide some links, a Git repository or
else.

[...]

> tarball here: http://wookware.org/files/java-maven-mess.tar.gz

Ok, I will try this one tomorrow.



Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: