Set pricenode mainClassName explicitly

Problem: after the upgrade from 6.6.1 to 7.3, the usual invocation of,
e.g. `./bisq-pricenode 2 2` started failing as reported by @emzy at [1].

    bisq@ubuntu-4gb-fsn1-1:~$ /bisq/bisq/bisq-pricenode 2
    Error: Could not find or load main class 2
    Caused by: java.lang.ClassNotFoundException: 2

Solution: for unknown reasons, the bisq-pricenode script worked as
expected under 6.6.1, i.e. contained the fq main class name in its
scripted invocation of `java -jar ...`, but under 7.3, this main class
name was missing. Through trial and error, it turns out that setting
`mainClassName` explicitly in the :pricenode subproject configuration
solves this problem and makes the start script work as expected.
Presumably, this problem arose in conjunction with the major version
upgrade of the spring boot Gradle plugin that was necessary when
upgrading to Gradle 7.3, but this has not been verified.

[1]: https://github.com/bisq-network/bisq/pull/5824#issuecomment-968276686
This commit is contained in:
Chris Beams 2021-11-15 13:44:44 +01:00
parent 0ea056c6d2
commit cb7b0e8da4
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -573,6 +573,8 @@ configure(project(':monitor')) {
configure(project(':pricenode')) {
apply plugin: "org.springframework.boot"
mainClassName = 'bisq.price.Main'
version = file("src/main/resources/version.txt").text.trim()
jar.manifest.attributes(