feat: make pom.xml reproducible#150
feat: make pom.xml reproducible#150soupglasses wants to merge 1 commit intodevelopersu:masterfrom soupglasses:maven-reproducible
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. |
| </dependency> | ||
| </dependencies> | ||
| <build> | ||
| <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName> |
There was a problem hiding this comment.
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.
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'?
| <headerType>gui</headerType> | ||
| <icon>appicon.ico</icon> | ||
| <outfile>target/${project.name}.exe</outfile> | ||
| <jar>target/${project.artifactId}-${project.version}-${maven.build.timestamp}.jar</jar> |
| <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.
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