Howto for packaging a JAVA application using maven?
Hi all, I noticed that openSUSE does not yet have a cryptomator package, so I wanted to try packaging it. Unfortunately this is some kind of java application with a pom.xml, that seems to be built using maven. The wiki page is very out of date (2010), so I am looking for packages that are built using maven, that I could copy from. Searching for maven of course only spits out the maven packages. Does anyone know a nice package that I could take as reference? Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Hi Johannes, Johannes Kastl <kastl@b1-systems.de> writes:
Hi all,
I noticed that openSUSE does not yet have a cryptomator package, so I wanted to try packaging it.
Unfortunately this is some kind of java application with a pom.xml, that seems to be built using maven.
The wiki page is very out of date (2010), so I am looking for packages that are built using maven, that I could copy from.
Searching for maven of course only spits out the maven packages. Does anyone know a nice package that I could take as reference?
sqlite-jdbc looks quite good: https://build.opensuse.org/package/view_file/Java:packages/sqlite-jdbc/sqlit... You can look for other examples by searching for packages that depend on `xmvn` [1]. Cheers, Dan Footnotes: [1] dnf rq --enablerepo=opensuse-tumbleweed-oss-source --whatdepends xmvn -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Frankenstrasse 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Managing Director/Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
On Nov 22 2022, Dan Čermák wrote:
You can look for other examples by searching for packages that depend on `xmvn` [1].
osc whatdependson openSUSE:Factory xmvn standard x86_64 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
On 22.11.22 at 14:59 Andreas Schwab wrote:
On Nov 22 2022, Dan Čermák wrote:
You can look for other examples by searching for packages that depend on `xmvn` [1].
osc whatdependson openSUSE:Factory xmvn standard x86_64
Thanks Andreas, there are too many osc commands that I use too infrequently to remember. That is a nice one. Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Hi Dan, On 22.11.22 at 14:55 Dan Čermák wrote:
Johannes Kastl <kastl@b1-systems.de> writes:
Searching for maven of course only spits out the maven packages. Does anyone know a nice package that I could take as reference?
sqlite-jdbc looks quite good: https://build.opensuse.org/package/view_file/Java:packages/sqlite-jdbc/sqlit...
Thanks, I'll have a look.
You can look for other examples by searching for packages that depend on `xmvn` [1].
Good to know.
Footnotes: [1] dnf rq --enablerepo=opensuse-tumbleweed-oss-source --whatdepends xmvn
Thanks! Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On 22.11.22 at 14:40 Johannes Kastl wrote:
I noticed that openSUSE does not yet have a cryptomator package, so I wanted to try packaging it.
I got started on this, and it a lot of fun. Like packaging go without vendoring... Anyways, I thought I had at least partially understood how this should work, but am stuck at an error when trying to prepare a parent-pom package for e.g. planet57-buildsupport:
https://build.opensuse.org/package/live_build_log/home:ojkastl_buildservice:...
[ 23s] [INFO maven.req] javapackages-filesystem, java-headless [ 24s] [INFO maven.req] from POM(s): [ 24s] Traceback (most recent call last): [ 24s] File "/usr/lib/rpm/maven.req", line 393, in <module> [ 24s] builder = TagBuilder() [ 24s] File "/usr/lib/rpm/maven.req", line 77, in __init__ [ 24s] self.print_pom_requires(metadata) [ 24s] File "/usr/lib/rpm/maven.req", line 162, in print_pom_requires [ 24s] raise Exception("Unable to generate requires on unresolvable artifacts: {reqs}" [ 24s] Exception: Unable to generate requires on unresolvable artifacts: com.planet57.buildsupport:buildsupport:pom:2 [ 24s] Terminated
Similar issue in sonatype-buildsupport-public-parent:
https://build.opensuse.org/package/live_build_log/home:ojkastl_buildservice:...
Any hints on how to solve this? I already added javapackages-filesystem and java-headless to the BuildRequires, but to no avail. Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On 22.11.22 at 14:40 Johannes Kastl wrote:
I noticed that openSUSE does not yet have a cryptomator package, so I wanted to try packaging it.
And another funny maven error, maybe someone knows it and can help?
https://build.opensuse.org/package/live_build_log/home:ojkastl_buildservice:...
[ 24s] Executing: xmvn --batch-mode --offline -Dmaven.test.skip=true package org.fedoraproject.xmvn:xmvn-mojo:install org.fedoraproject.xmvn:xmvn-mojo:javadoc org.fedoraproject.xmvn:xmvn-mojo:builddep [ 24s] ['xmvn', '--batch-mode', '--offline', '-Dmaven.test.skip=true', 'package', 'org.fedoraproject.xmvn:xmvn-mojo:install', 'org.fedoraproject.xmvn:xmvn-mojo:javadoc', 'org.fedoraproject.xmvn:xmvn-mojo:builddep'] [ 26s] [INFO] Scanning for projects... [ 26s] [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id linux-x86_64 @ line 36, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id linux-aarch64 @ line 68, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id macosx-x86_64 @ line 116, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id macosx-aarch64 @ line 148, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id windows-x86_64 @ line 180, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id windows-x86 @ line 212, column 17 [ 26s] @ [ 26s] [ERROR] The build could not read 1 project -> [Help 1] [ 26s] [ERROR] [ 26s] [ERROR] The project org.openjfx:javafx:20-ea+9 (/home/abuild/rpmbuild/BUILD/pom.xml) has 6 errors [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id linux-x86_64 @ line 36, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id linux-aarch64 @ line 68, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id macosx-x86_64 @ line 116, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id macosx-aarch64 @ line 148, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id windows-x86_64 @ line 180, column 17 [ 26s] [ERROR] 'profiles.profile.id' must be unique but found duplicate profile with id windows-x86 @ line 212, column 17 [ 26s] [ERROR] [ 26s] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ 26s] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ 26s] [ERROR] [ 26s] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ 26s] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ 26s] error: Bad exit status from /var/tmp/rpm-tmp.U3fXQm (%build)
Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (3)
-
Andreas Schwab
-
Dan Čermák
-
Johannes Kastl