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
Release Process #283
Comments
Yes, you are right, there is a huge problem with the same project being required to be built on several machines, and yes, it comes from the concept of the JDK itself, which the javafx-maven-plugin has to fight against. The documentation lists that problem as "drawback":
For the release-part I often tend to create all JARs with non-SNAPSHOT versions first, and having a "bundle-project", where all created JARs are declared as dependencies. I've thought about the whole process too, even tried to think about re-implementing the whole bundler-process from scratch. Might be worth it, but I fear to just add an additional layer of "yet another build-tool", and I have still the system-architecture problem, because of the packaged binaries (on 64bit installations, there is no 32bit binary included). There is even an existing bug reported about the 32bit and 64bit-problem: Your requested feature about the javapackager providing a clean way for producing all outcomes on the same platform even got his own bug, but got rejected: I fear that the situation is even more difficult than being solvable with this plugin. |
About the bundler-project: https://github.com/javafx-maven-plugin/javafx-maven-plugin/tree/master/src/it/16-multi-module-project |
If I understood correctly, you want the generated files being part of the artifacts, right? This would mean that the user will have to use a separate The risk to generate something not working as artifact is very high. |
I'm not sure if I understand all your points. And I'm not sure you need a custom packaging-type for this. E.g. the Maven Super POM is configured to generate secondary JAR artifacts for sources and javadoc when you set performRelease=true using goals of the Maven Source Plugin and Maven Javadoc Plugin. Basically we would need a zip of target/jfx/app and a zip of src/main/deploy, I think. If they are generated by an additional goal rather than by build-jar, you could put the execution in a Maven profile which is active when performRelease=true. Or you could add a property to build-jar which one can enable/ disable if performRelease=true/false. But build-jar does already a lot of stuff, maybe it would be good not to pack more into this goal. |
For the second goal you would then call on every supported platform something like: The goal would download these artifacts unzip them to a tmp directory set them as source for app and deploy and the rest should be the same as for build-native. Of course we have to find a better name than buid-native-2 ;-) |
The test-jar goal of Maven JAR Plugin does something similar, I think, for test jar. And the copy goal of the Maven Dependency Plugin can download artifacts without a Maven project as well, AFAIK. |
As mentioned before, you can split the creation of the jar-files and the creation of the installers/native launchers, just by creating a "app-bundler" project, where you just can reuse all your already released jar-files. As there is no clear RELEASE-strategy introduced with Creating a "package" like you proposed won't be possible, as all these files are stored inside the JDK-jars, and are not part of this maven-plugin. I know, that my answers are frustrating, but take it from my perspective: this maven-plugin only gives a "more or less simple" maven-wrapper, to avoid using the For a more specific release-development-cycle supporting it might be interesting to tinker a NEW maven-plugin which is specialized into creating INSTALLERS. |
I'm not confident an "app-bundler" project will make things much easier. Also the new maven-plugin approach is not very feasable, as for this the execution of Bundlers is required, which the JavaFX Maven Plugin takes care of. I think I will try to put something together when I find some time as it might be easier to talk about some actual code. It looks like there are some misunderstandings. One of the requirements is to have a "build-jar" which doesn't require a Maven project to be present. A Maven project is not something the javapackager requires but just a design decision of the "build-native" goal. I don't want to change that. Just add an extra goal which doesn't require a Maven project to be present and might be easier to use in a release process than the "build-native" goal. Also I don't plan to include anything JDK specific (not sure about the packager.jar, though. Is it platform independent?). |
The I did understand your idea, and the javafx-maven-plugin was created with no If this "CI-server"-feature is required, it means that the plugin needs to be completely rewritten, maybe even requires to replace the javapackager itself. |
This is a discussion about the release process and how the JavaFX Maven Plugin could support it.
I don't have the full picture about native installers yet, but since you're planning some bigger changes (https://twitter.com/FibreFoX/status/820335033143664640) I think it would be good to take also the following ideas into consideration.
When you perform a release (usually with the Maven Release Plugin or the Maven JGit-Flow Plugin) typically the following steps are processed in one order or another:
The trouble with the javapackager, AFAIK, is that you cannot generate all release artifacts for all platforms in one run (on one platform).
So you have to run the build on every supported platform again, either manually or using a CI server with dedicated slave agents, each running a different OS.
I think for each platform this would currently require to:
But even if you would do all this, your native installers wouldn't include the release articats but some re-generated ones (think e.g. about a multi module application project here). This is generally not what one wants as the artifacts can then differ in content (depending on the active Maven Profiles ; error-prone), timestamps, MD5 sums etc.
So maybe the JavaFX Maven Plugin could provide two additional goals:
Please note that for server side applications, EAR and WAR files also usually get deployed to the Maven Repository Manager. To deploy a ZIP file including the app directory content wouldn't be so much different.
What is different are the OS specific source ZIPs, which leads us to the next proposed goal:
In fact, I think, no Maven project should be required at all for this goal. You wouldn't have to clone the source repositories on every platform and switch to the proper tag. You wouldn't have to generate all the artifacts and the app directory again.
What do you think?
The text was updated successfully, but these errors were encountered: