- Building the Application
- Committing Code
- Packaging the Application
- Releasing the Application
- See Also
-
To build JetUML in Eclipse, it is necessary to define a user library for JavaFX.
-
The application should then run in Eclipse as a normal Run configuration.
- All committed code must respect all the JetUML style guidelines. These are available as a [../style/Style.xml](style file) for the Checkstyle Eclipse Plug-in. Before committing code for JetUML, make sure to install the plug-in, activate it, and check for any warning.
- All commits must be associated with an issues using an issue tag as the first token in the commit comment (e.g.,
#394
). - All JUnit tests must pass.
Starting with Release 3.0 JetUML needs to be packaged as a self-contained application for Windows, Mac, and Linux. This is done with the jpackage tool distributed with OpenJDK.
Run this from the git repo root (where FXMODS
points to the JavaFX mods directory)
jpackage --module-path %FXMODS%;bin\jetuml --add-modules jetuml --module jetuml/ca.mcgill.cs.jetuml.JetUML --app-version 3.0 --icon docs\JetUML.ico --win-shortcut --win-dir-chooser
Run this from the git repo root (where PATH_TO_FX_MODS
points to the JavaFX mods directory)
$JAVA_HOME/bin/jpackage -n JetUML --module-path $PATH_TO_FX_MODS:bin/jetuml --add-modules jetuml --module jetuml/ca.mcgill.cs.jetuml.JetUML --app-version 3.0 --module jetuml/ca.mcgill.cs.jetuml.JetUML --type pkg --icon docs/JetUML.icns
After compiling the project, run this from the git repo root (where FXMODS points to the JavaFX mods directory)
jpackage --module-path %FXMODS%:bin/jetuml --add-modules jetuml --module jetuml/ca.mcgill.cs.jetuml.JetUML --app-version 3.0 --icon docs/JetUML.ico
To build JetUML from the command line, after downloading the necessary JUnit 5 dependencies and placing them into a junit
folder at the root of the git repo, run the following:
rm -rf bin
mkdir bin
cp -r icons/** bin/jetuml/
find . -name "*.java" > files.txt
javac -cp test:src -p %FXMODS%:junit --add-modules javafx.controls,javafx.swing -d bin/jetuml @files.txt
cd src/
cp --parent `find -name "*.css"` ../bin/jetuml
cp --parent `find -name "*.properties"` ../bin/jetuml
cd ../test/
cp --parent `find -name "*.properties"` ../bin/jetuml cd ..
To test that the files were correctly compiled, run the following:
java -p %FXMODS%:bin/jetuml --add-modules javafx.controls,javafx.swing,jetuml ca.mcgill.cs.jetuml.JetUML
Normally it is not necessary to create a run-time image separately from the one created through the jpackage tool. However, if for any reason one is needed, here is how to create it:
-
To build a run-time image, use the command
jlink --module-path %FXMODS%;bin\jetuml --add-modules=jetuml --output image
from the root of the git repo. -
To run the image, do
image\bin\java -m jetuml/ca.mcgill.cs.jetuml.UMLEditor
. -
Don't forget to move or delete the runtime image from the git repo.
In the JetUML project, releases map one-to-one with milestones.
- Create a new issue titled "Release X" where X is the number of the release;
- Make sure all other issues for the milestone are closed;
- Run all the unit tests;
- Increment the version number in
JetUML.java
; - Update the copyrights using the copyright tool (see below);
- Create a new release on GitHub;
- Write the release notes;
- Release the application on GitHub;
- Create a thin jar that only includes the source code (excluding tests) and the license;
- Package the application as above for the three different platforms;
- Upload the binaries to the release page;
- Close the milestone;
- Tweet about the new release.
To be used in the Eclipse copyright tool.
JetUML - A desktop application for fast UML diagramming.
Copyright (C) ${date} by McGill University.
See: https://github.com/prmr/JetUML
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses.