Install Groovy on FreeBSD

FreeBSD carries Groovy in its package collection as lang/groovy, built for the release. This is the FreeBSD page of the install overview.

Install the package

Install a JDK and Groovy together; the package dependency already names a JDK, and the explicit one makes the choice yours:

sudo pkg install groovy openjdk21

pkg info -d groovy lists the dependencies that came with it, which is how you see the JDK the package was built against.

Build the port

The port compiles the same software from source and lets a build option change:

cd /usr/ports/lang/groovy
sudo make install clean

A port build takes minutes and needs the ports tree (portsnap fetch extract or git clone of the ports repository). The package is the faster route for a course.

Check the version

groovy --version prints the version line, with the JDK the command found. The FreeBSD package follows its own release, so the number may be older than 5.0.8. This container is Alpine Linux and has no pkg, so the commands were not run here.

Related

Автор статьи: Arthur Isaev