On Tuesday, 14 January 2025 at 17:40:33 +01:00, Petter Reinholdtsen pere@hungry.com wrote:
[Ole Aamot]
When I try to invoke it, I find that the main class app.N5CoreApp won't initialize.
ole@intelligence:~/noark/nikita-noark5-core$ /usr/bin/java -jar /var/nikita-noark5-core/nikita-noark5-core-0.7.jar Error: Unable to initialize main class app.N5CoreApp Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/Environment ole@intelligence:~/noark/nikita-noark5-core$ /usr/bin/java -jar /var/nikita-noark5-core/nikita-noark5-core-0.7.ja
I used the org.codehaus.mojo rpm-maven-plugin to build the RPM file.
This work for me, when I use the enclosed patch. Works for me too. Thanks, Petter!
diff --git a/pom.xml b/pom.xml index 496b52569..f7de1a7a5 100644 --- a/pom.xml +++ b/pom.xml @@ -281,6 +281,19 @@
<build> <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <!-- versjon 3.2.5 er valgt vilkårlig --> + <version>3.2.5</version> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> <plugin> <groupId>org.asciidoctor</groupId> <artifactId>asciidoctor-maven-plugin</artifactId>
I get a file that start as it should with 'java -jar'. Excellent.
Nikita now build as rpm and boots up as a systemd service from the rpm on Fedora Core rawhide with java-21-openjdk.
$ git clone https://www.gitlab.com/ole.aamot/nikita-noark5-core
Apply https://gitlab.com/ole.aamot/nikita-noark5-core/-/commit/0e0150ed08cc9b8ca43b0f87ebde95f1a427731b and run
$ mvn jar $ mvn install $ sudo rpm -Uvh target/rpm/nikita-noark5-core/RPMS/noarch/nikita-noark5-core-0.7-1.noarch.rpm $ sudo rpm -e nikita-noark5-core $ sudo rpm -Uvh target/rpm/nikita-noark5-core/RPMS/noarch/nikita-noark5-core-0.7-1.noarch.rpm $ sudo service nikita-noark5-core start $ sudo service nikita-noark5-core status
I have published RPMS of Nikita for the upcoming Fedora Core 42 OS distribution on
Best, Ole Aamot