Package Details: portfolio 0.71.2-1

Git Clone URL: https://aur.archlinux.org/portfolio.git (read-only, click to copy)
Package Base: portfolio
Description: Track your portfolio performance (finance)
Upstream URL: https://github.com/portfolio-performance/portfolio
Licenses: EPL
Submitter: Cobra
Maintainer: Cobra
Last Packager: Cobra
Votes: 40
Popularity: 0.49
First Submitted: 2015-11-08 10:45 (UTC)
Last Updated: 2024-10-04 10:35 (UTC)

Dependencies (6)

Required by (0)

Sources (2)

Pinned Comments

Cobra commented on 2023-08-19 13:34 (UTC)

Thanks to Bevan, we now have a simple and elegant (compared to my attempt) workaround that lets the PKGBUILD download and use the most recent version of maven (currently 3.9.4). Should not need any intervention from you. :)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 Next › Last »

Bevan commented on 2020-09-01 19:06 (UTC)

@Cobra: I had the same issue and tracked it down. You can fix it by applying the following patch to this repository:

curl https://pastebin.com/raw/nLfiaVdB | git am

Cobra commented on 2020-09-01 18:13 (UTC) (edited on 2020-09-01 18:15 (UTC) by Cobra)

The build of 0.48 fails for me with the same error message, whatever I try:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) on project portfolio-app: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

I don't have the time to investigate right now. If you face the same problem and have an idea, post it here.

Cobra commented on 2020-07-26 10:47 (UTC)

Building portfolio fails with Java 14. An earlier version (8–13) is now automatically selected by archlinux-java-run during the build process even when Java 14 is set as the default. Thanks to Bevan for the suggestion! Once built, the program runs fine also with Java 14.

Cobra commented on 2020-07-05 13:10 (UTC)

@Bevan You're absolutely right, and since 14 is the current version, that's actually a very likely scenario. archlinux-java-run will allow us to have 14 as the default, and free us from the need to switch to a previous version (and back) just to build portfolio. I'll implement the line

export JAVA_HOME=$(archlinux-java-run --min 8 --max 13 --java-home)

in the next PKGBUILD, together with the modified makedepends shown below.

Thanks a lot for your help!

Bevan commented on 2020-07-04 22:41 (UTC) (edited on 2020-07-04 22:42 (UTC) by Bevan)

@Cobra: Oh, I simply assumed that a JDK is required for building. Leaving out --feature jdk would let archlinux-java-run return JAVA_HOME for any JRE, even if it is not a JDK.

Regarding your tests: The only situation in which it will make a difference is when users have java 14 installed and set as default. Then /usr/lib/jvm/default-runtime will point to java 14 (likely java-14-openjdk) but archlinux-java-run will give you a JAVA_HOME that is somewhere between (including) java 8 and 13.

I think the proposed makedepends change is a valid way to go. It just requires people to use archlinux-java to set a compatible java version before building.

Cobra commented on 2020-07-04 12:10 (UTC) (edited on 2020-07-26 10:46 (UTC) by Cobra)

Building portfolio fails with Java 14. For the build, please select an earlier version (8–13) by archlinux-java. Once built, the program runs fine also with Java 14 (it doesn't matter whether you have installed the jre or the jdk).

Cobra commented on 2020-07-04 11:53 (UTC) (edited on 2020-07-04 11:55 (UTC) by Cobra)

@flortsch & Bevan

I'd like to thank you very much for your thoughts and suggestions. I truly appreciate them! :)

Let's have a look at what we could do. First of all, note that building portfolio does not require a java-environment (jdk), but only the java-runtime (jre). I can confirm flortsch's observation: while the build fails with either jre14 or jdk14, the program itself runs just fine with either of them. Second, I've tested archlinux-java-run on systems with different Java configurations. In each case, archlinux-java-run --min 8 --max 13 --java-home returns the path to which /usr/lib/jvm/default-runtime points. Hence, I currently see no advantage in adding archlinux-java-run as a dependency, but perhaps there are more complicated scenarios where it would make a difference. Bevan, any thoughts?

I thus believe the following lines to be sensible, involving only changes in the makedepends line:

depends=('java-runtime>=8' 'webkit2gtk')
makedepends=('maven' 'java-runtime>=8' 'java-runtime<14' 'gendesk')
export JAVA_HOME=/usr/lib/jvm/default-runtime

I would implement these changes in the PKGBUILD for the next version of portfolio unless you have additional ideas. I'll also add a corresponding pinned comment for everybody else.

Bevan commented on 2020-06-29 19:04 (UTC)

@Cobra: If you want to work around the Java 14 issue without hardcoding a specific JDK version, you can use my archlinux-java-run package for that:

diff --git a/PKGBUILD b/PKGBUILD
index a4a2968..67a1b2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ arch=('i686' 'x86_64')
 url="http://buchen.github.io/portfolio/"
 license=('EPL')
 depends=('java-runtime>=8' 'webkit2gtk')
-makedepends=('maven' 'gendesk')
+makedepends=('maven' 'gendesk' 'java-environment>=8' 'java-environment<14' 'archlinux-java-run')

 _DEST="/usr/share/portfolio"

@@ -31,7 +31,7 @@ prepare() {

 build() {
     export MAVEN_OPTS="-Xmx1g"
-    export JAVA_HOME=/usr/lib/jvm/default-runtime
+    export JAVA_HOME=$(archlinux-java-run --min 8 --max 13 --feature jdk --java-home)
     cd $pkgname-$pkgver
     cd portfolio-app
     mvn clean install -Dgenerate-target-platform=true -Dtycho.disableP2Mirrors -Dmaven.repo.local=$srcdir/.mvn

It's situations like this that I built this package for. But I can understand very well if you do not want to introduce any additional dependencies.

flortsch commented on 2020-06-25 14:42 (UTC) (edited on 2020-06-25 16:29 (UTC) by flortsch)

Yeah, can also confirm that the jdk-openjdk update to Java 14 broke the build, fails for me with the same error message. Building and running with java-13 works though, also for portfolio 0.46.5.

Edit: building with jdk8 and running with jre14 works for me. Maybe we should set a fixed jdk version (e.g., java-environment=8) as makedepends to fix building and make it deterministic, and use java-environment>=8 as normal dependency. Does this make any sense? I am no packaging expert :)

Bevan commented on 2020-06-23 19:41 (UTC)

I encountered the same error as posted by bounty with java 14. It works for me with java 11 though, so I think we don't need to go all the way back to java 8.