Giter Club home page Giter Club logo

freshli-agent-java's Introduction

Freshli Agent: Java

This application is used by the freshli CLI to detect and process manifest files from the Java ecosystem.

Building

With Docker

Make sure you have a recent version of Docker installed, and then run the following.

docker build -t freshli-agent-java . 

Without Docker

Using bin/build.rb

Assuming you have a recent version of Ruby installed, and you're able to install RubyGems with being logged in as root, then you can use the bin/build.rb script to build the application.

โš ๏ธ Note for Windows Users Ruby version 3.1 might not work, because of compatibility issues with one of the libraries that is used by the Cucumber/Aruba testing tool. All Ruby 3.0 versions are suspected to work. Testing has been done with the version of ruby that can be installed via winget install RubyInstallerTeam.RubyWithDevKit.3.0. Please create an issue if you see errors when running the build or the tests using the scripts in the bin directory or when running bundle exec cucumber.

On macOS or Linux:

bin/build.rb

On Windows:

ruby .\bin\build.rb

Using Gradle

Make sure you have JDK version 17 or later installed and have your JAVA_HOME environment varibale set appropriately.

Run the following command to create a complete deployable distribution for the project.

On macOS or Linux:

./gradlew installDist

On Windows:

.\gradlew.bat installDist

This will create build/install/freshli-agent-java. Within that folder, the bin directory contains wrappers for running the application. Adding the full path to that bin directory to the PATH environment variable will enable you to run freshli-agent-java from any directory.

Running

With Docker

Assuming the Docker container has been built following the instructions above, the following command will run the application

docker run freshli-agent-java --help

Without Docker

Running with Gradle

It's possible to instruct Gradle to run the command for you.

On macOS and Linux:

./gradle run --args="--help"

On Windows:

`.\gradlew.bat run --args="--help"

Running from Distribution Directory

You can run the program from the distribution that's created by the installDist Gradle task.

On macOS and Linux:

./build/install/freshli-agent-java/bin/freshli-agent-java.bat --help

On Windows:

.\build\install\freshli-agent-java\bin\freshli-agent-java --help

Running Tests

Dependencies

The cyclonedx CLI command needs to be in your PATH for the tests to pass. You'll need to download the version of the command that matches your platform, and rename it to cyclonedx before placing its directory in the PATH environment variable.

Using bin/test.rb

You can run both the application's unit and integration tests that are written in Kotlin and the application's acceptance tests that are written using Cucumber and Aruba by running:

On macOS and Linux:

bin/test.rb

On Windows:

ruby .\bin\test.rb

Running Directly

The application's unit tests can be run with:

On macOS and Linux:

./gradlew test

On Windows:

.\gradlew.bat test

And the application's acceptance tests can be run with:

bundle exec cucumber

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.