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

Re: maven-repo-helper questions



Andrew Schurman <arcticwaters@gmail.com> writes:

> Hey Felix,

hello Andrew,

many thanks for the very helpful input, and a happy new year
(actually a bit late for hat ;-))!

> On Sun, 2015-12-27 at 19:59 +0100, Felix Natter wrote:
>> (adapted from
>> http://anonscm.debian.org/cgit/debian-med/picard-
>> tools.git/tree/debian/rules)
>> installs the poms correctly, but not the jars (probably since it
>> doesn't
>> know where they are ;-)).
>
> This project uses the javahelper to install jars. The jars appear to be
> specified in *.jlibs. Lets see if we can get you a more specific build
> helper.
>
>> I think I should remove the *.install files (for each binary package)
>> because this is taken care of by mh_installjar?
>
> That's one way to do it. See below.
>
>> Source jars are
>> generally not installed (probably not needed)?
>
> Correct. Source jars are generally used for debugging and we only need
> the runtime jars. Also, the debian control file generally lists where
> the source is anyways.
>
>> How about using the poms from maven.org? They look like this:
>>   https://github.com/fnatter/insubstantial-
>> debian/blob/master/debian/pom-libflamingo.xml
>
> Is this the project that you're trying to package? It looks like it
> uses gradle as the build system. Take a look at libspring-java
> and libgpars-groovy-java. Both use the gradle helper, but use slightly
> different methods of packaging: libspring-java uses mh_installjar,
> mh_installpoms while libgpars-groovy-java specifies jars in its *.poms
> file. I haven't packaged a gradle project before, but I think I like
> the style of libgpars-groovy-java more.
>
> Use
>
> grep-dctrl -FBuild-Depends gradle-debian-helper -sPackage /var/lib/apt/lists/*Sources
>
> if you want to check out other projects that use gradle-debian-helper.
>
>> 
>> Can you point me to a package which does this or tell me how to
>> install
>> multiple jars?
>
> Are you trying to install multiple jars per deb file? If the helper
> packages don't do what you want, there are usually hooks that you can
> use to manually run maven-repo-helper commands. You can run a variation
> of the above command to give you projects that use various the helper
> projects.

I am now using gradle-debian-helper and maven-repo-helper with multiple
arguments in debian/*.poms files as used by libgpars-groovy-java [1].
This works great (a big thank you to Emmanuel!)! Except one thing:

I am using a debian/*.poms for each of the 7 non-doc binary packages
(adapted from [1]), one example [2]:

debian/pom-libflamingo.xml --java-lib --has-package-version \
  --artifact=flamingo/build/libs/flamingo-*.jar

This works fine (versioned and non-versioned jars are installed to
/usr/share/java/ and /usr/share/maven-repo), but the unusual case of
multiple binary packages
(i.e. --artifact=pkg/build/libs/pkg-*.jar instead of
--artifact=build/libs/singlepkg-*.jar) generates lintians:

Now running lintian...
W: insubstantial source: dep5-copyright-license-name-not-unique (paragraph at line 626)
W: insubstantial source: missing-license-paragraph-in-dep5-copyright bsd-3-clause (paragraph at line 622)
(these two are most probably FPs, see #788252)

E: substance-flamingo: non-standard-toplevel-dir substance-flamingo/
W: substance-flamingo: file-in-unusual-dir substance-flamingo/build/libs/substance-flamingo-7.3-javadoc.jar
W: substance-flamingo: file-in-unusual-dir substance-flamingo/build/libs/substance-flamingo-7.3-lite.jar
W: substance-flamingo: file-in-unusual-dir substance-flamingo/build/libs/substance-flamingo-7.3-sources.jar
E: liblaf-widget-java: non-standard-toplevel-dir laf-widget/
W: liblaf-widget-java: file-in-unusual-dir laf-widget/build/libs/laf-widget-7.3-javadoc.jar
W: liblaf-widget-java: file-in-unusual-dir laf-widget/build/libs/laf-widget-7.3-sources.jar
E: libflamingo-java: non-standard-toplevel-dir flamingo/
W: libflamingo-java: file-in-unusual-dir flamingo/build/libs/flamingo-7.3-javadoc.jar
W: libflamingo-java: file-in-unusual-dir flamingo/build/libs/flamingo-7.3-sources.jar
E: substance: non-standard-toplevel-dir substance/
W: substance: file-in-unusual-dir substance/build/libs/substance-7.3-javadoc.jar
W: substance: file-in-unusual-dir substance/build/libs/substance-7.3-lite.jar
W: substance: file-in-unusual-dir substance/build/libs/substance-7.3-sources.jar
W: substance: file-in-unusual-dir substance/build/libs/substance-7.3-tools.jar
E: libtrident-java: non-standard-toplevel-dir trident/
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3-base.jar
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3-javadoc.jar
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3-sources.jar
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3-swing.jar
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3-swt.jar
W: libtrident-java: file-in-unusual-dir trident/build/libs/trident-7.3.jar
E: substance-swingx: non-standard-toplevel-dir substance-swingx/
W: substance-swingx: file-in-unusual-dir substance-swingx/build/libs/substance-swingx-7.3-javadoc.jar
W: substance-swingx: file-in-unusual-dir substance-swingx/build/libs/substance-swingx-7.3-sources.jar
E: liblaf-plugin-java: non-standard-toplevel-dir laf-plugin/
W: liblaf-plugin-java: file-in-unusual-dir laf-plugin/build/libs/laf-plugin-7.3-javadoc.jar
W: liblaf-plugin-java: file-in-unusual-dir laf-plugin/build/libs/laf-plugin-7.3-sources.jar
Finished running lintian.

Is that something that is not handled by maven-repo-helper or am I doing
something wrong? I guess lintian scans the debian/* files and looks for
such paths, but then libgpars-groovy-java's
--artifact=build/libs/gpars-*.jar shouldn't have worked either ;-)

The complete package is here:
  https://github.com/fnatter/insubstantial-debian

[1] http://anonscm.debian.org/cgit/pkg-java/libgpars-groovy-java.git

[2] https://github.com/fnatter/insubstantial-debian/blob/master/debian/libflamingo-java.poms

Many Thanks and Best Regards,
-- 
Felix Natter


Reply to: