Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.
/ sample-jaxrs-cfd Public archive

Sample jax-rs to demonstrate a simple java maven circleci configuration

Notifications You must be signed in to change notification settings

dsayling/sample-jaxrs-cfd

Repository files navigation

Sample Java App - JAX RestEasy Server

CircleCI Build Status Software License

Description

The sample Jave app built with Jakarta RESTful Web Services is designed to demonstrate a typical Java and Maven CI workflow may look on CircleCI.

You can see the CI pipelines for this application running live on CircleCI.

In this sample config, we have a single workflow build-and-test which will install our required maven packages, and then run tests with mvn test.

Getting Started

If you would like to copy the config.yml and adapt it to your project, be sure to read the comments in the config file to ensure it works for your project. For more details, see the CircleCI configuration reference.

Addtional Sample Configuration Files

Inside the .circleci directory, you will find an extended directory that extends the configuration beyond the default .circleci/config.yml. These configuration files are tested with every pull request to this sample app, so they stay up to date and verified working.

Heroku Deploy

The .circleci/extended/heroku-deploy.yml configuration file extends the default config by adding a job to deploy to heroku via a git push. For more information on how to configure this for your own project, visit the CircleCI docs for more details

Pylint

TODO The .circleci/extended/aws-ecr.yml configuration file extends the default config by adding a sample job.

About This App

This sample application is a Jakarta RESTful Web Service written in Java, and utilizes the Jersey framework which allows us build and run the service from an OpenAPI/Swagger specification.

Continuous Food Delivery

When you start up the service, you can open this page in your browser to view the openapi specification. This framework does not serve the swagger UI.

Front-End

CFD(Continuous Food Delivery) is a sample application that relies on a separate UI framework. If you would like to run this project locally with a complete UI, you can use a valid CFD front-end, such as one of the following sample projects:

Language GitHub Description
Javascript (Vue.js) Link A Javascript Front-End for CFD

Run and Test Locally

If you would like to try this application out locally, you can find runtime instructions below.

Requirements

Java 8

Run Local Server

To run the server on a Docker container, please execute the following from the root directory:

# building the image
docker build -t sample-jaxrs .

# starting up a container
docker run -p 8080:8080 sample-jaxrs

If not using docker, to run the server, please execute the following from the root directory:

mvn clean package jetty:run

Tests

To launch the integration tests, use mvn:

mvn test

Additional Resources

License

This repository is licensed under the MIT license. The license can be found here.

About

Sample jax-rs to demonstrate a simple java maven circleci configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •