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

Re: Migration from ant to maven



Hi,

Am 25.09.19 um 17:47 schrieb Ole Streicher:
> Hi,
> 
> I just got involved in packaging a Java package (jsamp) that used ant in
> the past and "now" (since a few years) moved to maven. Up to now, the
> old build.xml is kept locally in the Debian package as a patch and the
> package is built with it. This is ofcourse not optimal, and so I would
> like to migrate the Debian build to maven.
> 
> However, I must say that I don't fully understand the documentation on
> the Wiki here. I have read https://wiki.debian.org/Java/Packaging/Maven,
> however a lot of things are still unclear:

Perhaps we can use this conversation to improve the Wiki article about
Maven packaging?

> * how do I start?

Take a look at your pom.xml file and find out what build-dependencies
are required to build jsamp. The are listed between the <dependencies>
paragraphs. Most of them should have been packaged already, then you
could run mh_make inside of jsamp's root directory.

> * which files to I really need? libtwelvemonkeys-java.poms, maven.rules,
>   maven.ignoreRules and maven.properties are mentioned, do I need all?

You only need the *.poms file which should be named after the binary
package libjsamp-java. You only need the other files if you want to
override artefactID, groupID or versions.

> * what should I put into the build dependencies?

If mh_make runs successfully, debian/control will be automatically
populated. Otherwise you can deduce the build dependencies from your
pom.xml file.


> * The ".poms" file: is this tobe named after the source or the binary
>   package? And, if binary: which?

libjsamp-java

> * shall I replace the dependencies with maven.rules?

Only if you want to override certain values. If artifactId and groupID
are identical in Debian then you don't need maven.rules because the
version will be automatically rewritten to debian, so that you and other
reverse-dependencies don't have to worry about future updates.

> 
> * Can I obtain these information from the build.xml that is still
>   maintained debian-locally?

Only if the dependencies are still the same.

> * How do I include tests?

The tests run by default but you can skip them by adding
maven.test.skip=true to debian/maven.properties.

> Maybe someone could have a look into the package and give me a hint
> where to start? I have absolutely no experience with maven yet.


Good luck

Regards,

Markus

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: