Skip to content

Formulae for the use of Umple on Mac-OS with the brew command

License

Notifications You must be signed in to change notification settings

umple/homebrew-umple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

This is the original home of the homebrew formula for Umple

To install it on Mac-OS (or Linux as an alterative to managers like apt) use the brew install umple command on those platforms. It will create a command called 'umple' which invokes the umple compiler Java jar.

Umple has openjdk as a dependency, which results in several GB of other files being installed.

How we made Umple available from Homebrew, the package manager for Macs (and also available on Linux).

Prerequisite :

Create a new formula (https://docs.brew.sh/Formula-Cookbook) :

  • A formula is a package definition written in Ruby.
  • We followed the Formula Cookbook to create a new formula.
    • brew create → creates template brew formula
    • Formulas are installed at: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  • Umple formula:
    • To create the formula one needs a URL to a zip or tarball. I decided to use a link to umple's latest JAR file because other applications in homebrew based in Java did the same.
    • The description needs to be 80 characters or less
    • The Homepage must be a https link
    • The URL is the link to umple's latest JAR file
    • Version tag is optional since homebrew tries to guess the version from the URL
      • In our case, homebrew got our version wrong so I had to add it
    • Sha256 and license are automatically generated
    • Had to add our dependencies (ant, ant-contrib and openjdk)
    • Bottle:unneeded
      • Without this line, an error will occur when installing and umple will not get installed
      • In the PR, homebrew contributors commented to remove the line
      • Bottle do block is auto generated by the brew's CI when the PR is accepted -Install block:
      • Homebrew contributors were very specific on the syntax used to install the application. It is similar for all java based applications available from Homebrew. Originally we were running shell commands through the ruby formula, but that was not accepted.
      • Homebrew packages have specific file structure: Screen Shot 2021-08-19 at 4 48 22 PM
    • The install method moves a file from the original location to the Pathname
    • Test Block:
      • Writes a simple ump file
        • Class X with one attribute
      • Tests the umple compile command
      • Use the assert_predicate to check if the java and class file were created

Testing :

  • Using the command: brew install umple
    • If installation was successful, umple command will work
  • Brew remove umple: will uninstall umple
  • Homebrew Packages Are Installed at: /usr/local/Cellar/
  • Have to run: brew audit --new (for new formula) or brew audit --strict (existing formula)
    • This command will return errors in the formula
  • Follow Cookbook (https://docs.brew.sh/Formula-Cookbook) to push to homebrew-core

Before opening a pull request :

Homebrew has a checklist that needs to be followed before opening a PR:

How to open a homebrew Pull Request: https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request

How to update :

About

Formulae for the use of Umple on Mac-OS with the brew command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages