Java programs are packaged in a JAR files. To build a project to a Java file, you need to have installed Java 11+ (java --version
) and Maven 3+ (mvn --version
)
The easiest and quickest way of installing Java and Maven is using SDKMAN project.
curl -s "https://get.sdkman.io" | bash
sdk install java
Maven is a package manager for Java projects.
sdk install maven
To build a project run:
mvn clean install --DskipTests --file pom.xml
Output JAR file will appear in target
directory.
java -jar target/simplelocalize-cli-2.0.4.jar
You can pass arguments to CLI by adding them to the end of the command:
java -jar target/simplelocalize-cli-2.0.4.jar download
To run project tests, you can simply skip --DskipTests
flag.
mvn clean install --file pom.xml
The best way to build binary files is to run a Github Action build.yaml workflow
- Fork the repository
- In forked repo, head to 'Actions' tab and enable Github Actions
- Make a commit to invoke a new build action
- Wait for successful build and download executables
Build might take some time, usually it takes less than ~20 minutes.