-
Notifications
You must be signed in to change notification settings - Fork 9
Set up binary distribution mechanism #24
Comments
How will this work for a noob install? Can a git clone or some other simple process pull the jar down as part of the process? Im open to any ideas, including containers etc, so long as the process is automated. |
For a user who is planning to modify the code, we can assume they have the tools needed: Java, Maven, etc. They would clone this repo and run For a user just looking to run the server, it would depend on their environment. Ideally, we would provide a native installer and distribute through a platform store (Windows, Mac, Debian etc.) so they could just install it. That needs some work to set up though (developer accounts, signing keys etc.). In the meantime, if we assume users have an environment able to run Java (i.e. they have a JRE installed), we can upload a simple archive for them to download. I'd suggest a .zip and/or .tgz archive containing an installation directory with We can also post an image to Docker Hub for users who have Linux/Docker installed but not a JRE. The image would handle pulling all pre-requisites including Java. This would be easier for users already having Docker as they could just Travis can build all of these artifacts and publish them automatically based on tagging the repo for a release. You need to be a collaborator on the project to set that up though. I can do that on my fork and then you can copy it over, or if you want to add me here I can set it up directly. |
I used the download and unzip method in my freeboard project. It caused constant problems for windows as there are so many versions, and so many incompatibilities between them. Basic stuff like java location and env behaviour, firewalls and viruscheckers. Plus the muggle user problems of unzipping it C:\my boat's really cool app\ directory. Even on the RPi, with a script, its amazing how users can do it wrong. |
Found https://rtyley.github.io/bfg-repo-cleaner/, which should be able to clean up the bin files. |
Yeah, Windows poses a bunch of challenges. But I think those also apply to the current approach of cloning a git repo and just need very defensive implementation and good diags. There are ways to rewrite history (ninjad I see) but they are disruptive to people who have forks. We could clean current binaries but would not want to keep committing them. |
I suggest we start here by separating the assembly steps from the server code. I'll create a PR that adds some sub-modules that handle the assembly and allows the libraries to be pushed via deploy. |
The biggest advantage of the git clone method was distributing updates. After a fix or whatever the user just does mvn package assumes mvn is installed. |
I have set up a new project (signalk-java) which solves this problem. Still needs more testing etc, but appears to offer all the required features without storing any binaries. |
The signalk-java project seems to work well. By default a mvn install will build the And no stored binaries! |
Maven's
deploy
phase can be used to publish the built binary, both for developmentSNAPSHOT
releases and for production ones. You can deploy to Maven central or to Bintray; both give free accounts to OSS projects (IIRC). We should do this anyway to publish non-executable artifacts like the jar from -core.GitHub also provide a way to distribute files so the binary could be uploaded to there.
One the tests pass, this can be automated with Travis so that it happens automatically on each push to master.
The text was updated successfully, but these errors were encountered: