Skip to content

Latest commit

 

History

History
129 lines (88 loc) · 5.24 KB

developers.md

File metadata and controls

129 lines (88 loc) · 5.24 KB

Guide for JetUML Developers

Contents

Building the Application in Eclipse

Committing Code

  • 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.

Packaging the Application

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.

Windows

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

Mac

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

Linux

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 

Runtime image

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.

Releasing the Application

In the JetUML project, releases map one-to-one with milestones.

  1. Create a new issue titled "Release X" where X is the number of the release;
  2. Make sure all other issues for the milestone are closed;
  3. Run all the unit tests;
  4. Increment the version number in JetUML.java;
  5. Update the copyrights using the copyright tool (see below);
  6. Create a new release on GitHub;
  7. Write the release notes;
  8. Release the application on GitHub;
  9. Create a thin jar that only includes the source code (excluding tests) and the license;
  10. Package the application as above for the three different platforms;
  11. Upload the binaries to the release page;
  12. Close the milestone;
  13. Tweet about the new release.

Copyright Notice

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.

See Also