{"id":27689524,"url":"https://github.com/microprofile/microprofile-samples","last_synced_at":"2026-01-09T23:06:02.730Z","repository":{"id":66212059,"uuid":"63673958","full_name":"microprofile/microprofile-samples","owner":"microprofile","description":"Micro Profile Samples","archived":false,"fork":false,"pushed_at":"2023-07-19T21:20:24.000Z","size":107,"stargazers_count":118,"open_issues_count":9,"forks_count":61,"subscribers_count":54,"default_branch":"main","last_synced_at":"2025-04-25T10:15:47.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microprofile.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-07-19T08:03:22.000Z","updated_at":"2025-01-30T20:28:37.000Z","dependencies_parsed_at":"2025-04-25T10:15:49.205Z","dependency_job_id":null,"html_url":"https://github.com/microprofile/microprofile-samples","commit_stats":null,"previous_names":["microprofile/microprofile-samples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microprofile","download_url":"https://codeload.github.com/microprofile/microprofile-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250796358,"owners_count":21488712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-25T10:15:49.657Z","updated_at":"2026-01-09T23:06:02.701Z","avatar_url":"https://github.com/microprofile.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"//\n// Copyright (c) 2017-2017 Contributors to the Eclipse Foundation\n//\n// See the NOTICE file(s) distributed with this work for additional\n// information regarding copyright ownership.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nimage:https://badges.gitter.im/eclipse/microprofile-samples.svg[link=\"https://gitter.im/eclipse/microprofile-samples\"]\n\n# MicroProfile - Samples\n\n## Purpose of these samples\n\nGive different examples using the MicroProfile :\n\n* **Canonical** Simplest sample using JAX-RS 2.0 / CDI 1.2 / JSON-P 1.0\n* **Swagger** Adding Swagger to the canonical sample\n\n## Building\n\nClone the git repository:\n\n* `git clone https://github.com/eclipse/microprofile-samples.git`\n\nTo build these examples you can just :\n\n* `mvn clean install` does not run any test\n* `mvn clean install -Plicense,skipTests` checks the licenses and does not run any test\n\n## Formatting Code\n\nTo format / re-format code call :\n\n* `mvn clean compile -PformatCode` formats the source code and does not run any test\n\n## Testing\n\nThese examples use Arquillian Tests. By default, Arquillian uses WildFly embedded, but other forms of containers can also be plugged in.\n\n* `mvn clean test -Pwildfly-swarm`  tests against a WildFly Swarm\n* `mvn clean test -Parquillian-wildfly-managed`  tests against an embedded WildFly\n* `mvn clean test -Parquillian-wildfly-remote` tests against a running WildFly\n* `mvn clean test -Parquillian-tomee-managed`  tests against an embedded Apache TomEE\n* `mvn clean test -Parquillian-tomee-remote` tests against a remote Apache TomEE\n\n## Running\n\nYou can package a WAR file and deploy it on your application server. Once deployed and up and running, just go to `http://localhost:\u003cportNumber\u003e/msTopCDs` to invoke the microservice. You should get a list of random \"Top Rated CDs\" in JSON format, such as :\n\n    [\n        {\n            id: 1101\n        },\n        {\n            id: 1147\n        },\n        {\n            id: 1112\n        },\n        {\n            id: 1132\n        },\n        {\n            id: 1168\n        }\n     ]\n\nBut you can also use other forms of packaging to execute this services\n\n### WildFly Swarm\n\nPackage the samples with WildFly Swarm using the following Maven command :\n\n* `mvn clean package -Pwildfly-swarm`\n\nThis will create an executable JAR under the `target` directory. Just execute it with `java -jar target/microprofile-sample-canonical-swarm.jar` and invoke the microservice at http://localhost:8081/msTopCDs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroprofile%2Fmicroprofile-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicroprofile%2Fmicroprofile-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroprofile%2Fmicroprofile-samples/lists"}