-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make pom.xml reproducible #150
base: master
Are you sure you want to change the base?
Conversation
From my understanding is that how JavaFX is currently packaged in this project what is the problem. Sadly my Java experience is limited, but i did find https://stackoverflow.com/a/70809214 if this is something that is interesting. Then the jar could be architecture independent from my understanding. |
@@ -166,7 +167,7 @@ | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to leave it as is. If you want shorter name please rename it after build using your-OS packaging tools.
<version>[3.2.5,)</version> | ||
</requireMavenVersion> | ||
<requireJavaVersion> | ||
<version>[1.8,)</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimal runtime is '11', not '1.8' per line 53 <maven.compiler.release>11</maven.compiler.release>
Maybe it's possible to set it as variable like '${maven.compiler.release}' instead of '1.8'?
@@ -268,7 +294,7 @@ | |||
<headerType>gui</headerType> | |||
<icon>appicon.ico</icon> | |||
<outfile>target/${project.name}.exe</outfile> | |||
<jar>target/${project.artifactId}-${project.version}-${maven.build.timestamp}.jar</jar> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave it as is
@@ -51,6 +51,7 @@ | |||
<maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format> | |||
<javafx.version>19.0.2.1</javafx.version> | |||
<maven.compiler.release>11</maven.compiler.release> | |||
<project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine. In future maybe it's better to use git commits? Like article says:
"instead of explicitely writing a timestamp in their pom.xml, some people tend to prefer using last Git commit timestamp, like ${git.commit.time} from git-commit-id-maven-plugin."
Anyway, it's fine to leave as is if you think it's needed
Thank you for contributing!
Yeah.. same. Well, it is what it is :(
I don't know everything either :) Main idea of this stackoverflow post 'Don't try to create a single jar for your application.' as I see it. So a workaround for Linux is making some kind of
|
@soupglasses please check this once you have a minute. Wanna know your thoughts. Thanks! |
Will do :) |
Following packaging ns-usbloader to NixOS I did some work on making maven generate reproducible jar files following the advice on https://maven.apache.org/guides/mini/guide-reproducible-builds.html
I have also added maven enforcer to ensure that all maven plugins used are properly defined in the pom.xml file.
Only major issue was that i was unable to find a good practice for was how to include javafx without making it architecture dependent. There are also a long set of warnings about its inability to build.
Verify reproducible artifact log