Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #9872 > unrolled thread

adding a pom.xml to package that does not use maven

Started byCarnë Draug <carandraug+dev@gmail.com>
First post2017-08-10 21:00 +0200
Last post2017-08-22 15:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.java


Contents

  adding a pom.xml to package that does not use maven Carnë Draug <carandraug+dev@gmail.com> - 2017-08-10 21:00 +0200
    Re: adding a pom.xml to package that does not use maven Emmanuel Bourg <ebourg@apache.org> - 2017-08-10 23:10 +0200
      Re: adding a pom.xml to package that does not use maven Carnë Draug <carandraug+dev@gmail.com> - 2017-08-11 01:30 +0200
        Re: adding a pom.xml to package that does not use maven 殷啟聰 | Kai-Chung Yan <seamlikok@gmail.com> - 2017-08-22 15:20 +0200

#9872 — adding a pom.xml to package that does not use maven

FromCarnë Draug <carandraug+dev@gmail.com>
Date2017-08-10 21:00 +0200
Subjectadding a pom.xml to package that does not use maven
Message-ID<ud0Qx-1eH-15@gated-at.bofh.it>
Hi

I am packaging a java library and ImageJ plugin that uses maven.  It
is dependent on ij.jar from net.imagej.  In Debian, ij.jar is provided
by the imagej package [1] but there is no pom.xml there even though
there is one on maven central.

What happens is that imagej1 [2] makes use of ant and not maven.  Its
development scheme is a bit unorthodox in that commits are done daily
and may not match any actual release.  So the developers of imagej2
have a kind of fork of it.  They get the actual releases, restructure
it for maven, have commits for each release, and push this new release
to maven central [3].  They call it ImageJA.

So how to address this?  I guess that I should add such pom.xml file
to the existing imagej package.  I could do that with the debian-med
team but could someone give me any pointers?  Or should something else
be done instead?  There is a bunch of ImageJ plugins that use maven
and so would also be dependent on that pom file.

Thank you
Carnë

[1] https://packages.debian.org/source/sid/imagej
[2] https://github.com/imagej/imagej1/
[3] http://imagej.net/ImageJA

[toc] | [next] | [standalone]


#9875

FromEmmanuel Bourg <ebourg@apache.org>
Date2017-08-10 23:10 +0200
Message-ID<ud2Sl-2RM-11@gated-at.bofh.it>
In reply to#9872
On 08/10/2017 08:52 PM, Carnë Draug wrote:

> So how to address this?  I guess that I should add such pom.xml file
> to the existing imagej package.  I could do that with the debian-med
> team but could someone give me any pointers?  Or should something else
> be done instead?  There is a bunch of ImageJ plugins that use maven
> and so would also be dependent on that pom file.

Hi Carnë,

As I understand the pom.xml file isn't in the upstream tarball right? In
this case:
1. download the pom.xml file from Maven Central and put it in the
debian/ directory
2. add maven-repo-helper to the build dependencies
3. in debian/rules, add "--with maven-repo-helper" behind "dh $@"
4. create the debian/libyourlibrary-java.poms files containing a single
line with: debian/pom.xml --java-lib --artifact=path/to/the/jar/built
5. remove the install rule that placed the jar in /usr/share/java

This will install the jar produced by the Ant build into /usr/share/java
and install the Maven artifacts under /usr/share/maven-repo

Emmanuel Bourg

[toc] | [prev] | [next] | [standalone]


#9878

FromCarnë Draug <carandraug+dev@gmail.com>
Date2017-08-11 01:30 +0200
Message-ID<ud53Q-4ev-13@gated-at.bofh.it>
In reply to#9875
On 10 August 2017 at 21:14, Emmanuel Bourg <ebourg@apache.org> wrote:
> On 08/10/2017 08:52 PM, Carnë Draug wrote:
>
>> So how to address this?  I guess that I should add such pom.xml file
>> to the existing imagej package.  I could do that with the debian-med
>> team but could someone give me any pointers?  Or should something else
>> be done instead?  There is a bunch of ImageJ plugins that use maven
>> and so would also be dependent on that pom file.
>
> Hi Carnë,
>
> As I understand the pom.xml file isn't in the upstream tarball right? In
> this case:
> 1. download the pom.xml file from Maven Central and put it in the
> debian/ directory
> 2. add maven-repo-helper to the build dependencies
> 3. in debian/rules, add "--with maven-repo-helper" behind "dh $@"
> 4. create the debian/libyourlibrary-java.poms files containing a single
> line with: debian/pom.xml --java-lib --artifact=path/to/the/jar/built
> 5. remove the install rule that placed the jar in /usr/share/java
>
> This will install the jar produced by the Ant build into /usr/share/java
> and install the Maven artifacts under /usr/share/maven-repo
>
> Emmanuel Bourg

Hi

You understood it right.  The weird part is that the releases on Maven
Central are not made by the same people.

Thank you for the instructions.  I did all the steps 1-4 [1] and seems
to work already.  I also don't know how to do the step 5 or why it
would be necessary?  Am I missing an important point?

Carnë

[1] https://github.com/carandraug/debian-imagej/commit/6ef7c9836d22b

[toc] | [prev] | [next] | [standalone]


#9935

From殷啟聰 | Kai-Chung Yan <seamlikok@gmail.com>
Date2017-08-22 15:20 +0200
Message-ID<uhhg6-2TJ-21@gated-at.bofh.it>
In reply to#9878

[Multipart message — attachments visible in raw view] — view raw

Hello Carnë,

maven-repo-helper will install the Java libraries to `/usr/share/java` for you because of the `--java-lib` option in step 4, so you can remove line 3 of [1].

[1]: https://github.com/carandraug/debian-imagej/blob/cc79425ffb7a365bd2a550473a61a56e11a44014/debian/install

Carnë Draug 於 2017/8/11 上午7:24 寫道:
> On 10 August 2017 at 21:14, Emmanuel Bourg <ebourg@apache.org> wrote:
>> On 08/10/2017 08:52 PM, Carnë Draug wrote:
>>
>>> So how to address this?  I guess that I should add such pom.xml file
>>> to the existing imagej package.  I could do that with the debian-med
>>> team but could someone give me any pointers?  Or should something else
>>> be done instead?  There is a bunch of ImageJ plugins that use maven
>>> and so would also be dependent on that pom file.
>> Hi Carnë,
>>
>> As I understand the pom.xml file isn't in the upstream tarball right? In
>> this case:
>> 1. download the pom.xml file from Maven Central and put it in the
>> debian/ directory
>> 2. add maven-repo-helper to the build dependencies
>> 3. in debian/rules, add "--with maven-repo-helper" behind "dh $@"
>> 4. create the debian/libyourlibrary-java.poms files containing a single
>> line with: debian/pom.xml --java-lib --artifact=path/to/the/jar/built
>> 5. remove the install rule that placed the jar in /usr/share/java
>>
>> This will install the jar produced by the Ant build into /usr/share/java
>> and install the Maven artifacts under /usr/share/maven-repo
>>
>> Emmanuel Bourg
> Hi
>
> You understood it right.  The weird part is that the releases on Maven
> Central are not made by the same people.
>
> Thank you for the instructions.  I did all the steps 1-4 [1] and seems
> to work already.  I also don't know how to do the step 5 or why it
> would be necessary?  Am I missing an important point?
>
> Carnë
>
> [1] https://github.com/carandraug/debian-imagej/commit/6ef7c9836d22b
>


[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.java


csiph-web