{"id":15014088,"url":"https://github.com/cpollet/postman-maven-plugin","last_synced_at":"2025-04-09T19:23:06.543Z","repository":{"id":57737058,"uuid":"135756235","full_name":"cpollet/postman-maven-plugin","owner":"cpollet","description":"A maven plugin to export JAX-RS annotated classes and methods to Postman collection","archived":false,"fork":false,"pushed_at":"2023-12-15T14:54:57.000Z","size":122,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T21:21:57.677Z","etag":null,"topics":["maven-plugin","postman","postman-collection"],"latest_commit_sha":null,"homepage":"","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/cpollet.png","metadata":{"files":{"readme":"README.md","changelog":"changes.xml","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-06-01T19:33:18.000Z","updated_at":"2022-10-21T19:37:00.000Z","dependencies_parsed_at":"2024-11-16T21:04:21.226Z","dependency_job_id":null,"html_url":"https://github.com/cpollet/postman-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpollet%2Fpostman-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpollet%2Fpostman-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpollet%2Fpostman-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpollet%2Fpostman-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpollet","download_url":"https://codeload.github.com/cpollet/postman-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095810,"owners_count":21046913,"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":["maven-plugin","postman","postman-collection"],"created_at":"2024-09-24T19:45:10.447Z","updated_at":"2025-04-09T19:23:06.520Z","avatar_url":"https://github.com/cpollet.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/cpollet/postman-maven-plugin.svg?branch=master)](https://travis-ci.org/cpollet/postman-maven-plugin)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=net.cpollet.maven.plugins%3Apostman-maven-plugin\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=net.cpollet.maven.plugins%3Apostman-maven-plugin)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.cpollet.maven.plugins/postman-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.cpollet.maven.plugins/postman-maven-plugin)\n\n# Postman Maven Plugin\nA maven plugin to export [JAX-RS](https://github.com/jax-rs) annotated classes and methods to [Postman collection](https://www.getpostman.com/collection).\n\n# Usage\nRequirements\n* Java 8+\n* Maven 3.5.0+\n\n## CLI\nIn you ```~/.m2/settings.xml``` file, add the following:\n```\n\u003cpluginGroups\u003e\n  \u003cpluginGroup\u003enet.cpollet.maven.plugins\u003c/pluginGroup\u003e\n\u003c/pluginGroups\u003e\n```\n\nThen, to generates a file ```${project.artifactId}-${project.version}.json``` containing the postman collection in the ```target``` folder:\n```\n$ mvn postman:generate -Dpostman.packagesToScan=net.cpollet \\\n                       -Dpostman.baseUrl=http://localhost \\\n                       -Dpostman.basicAuth.username=username \\\n                       -Dpostman.basicAuth.password=password\n```\nYou can execute this command from the ```jaxrs``` folder for instance.\n\n* ```postman.baseUrl``` mandatory. A valid URL that will be used as the base URL for all discovered endpoints;\n* ```postman.packagesToScan``` optional. If not set, the plugin will scan all packages;\n* ```postman.basicAuth.*``` optional.\n\n## pom.xml\nThe CLI equivalent XML configuration is:\n```\n\u003cplugin\u003e\n    \u003cgroupId\u003enet.cpollet.maven.plugins\u003c/groupId\u003e\n    \u003cartifactId\u003epostman-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e...\u003c/version\u003e\n    \u003cconfiguration\u003e\n        \u003cpackagesToScan\u003e \u003c!-- optional --\u003e\n            \u003cvalue\u003enet.cpollet\u003c/value\u003e\n            \u003c!-- ... --\u003e\n        \u003c/packagesToScan\u003e\n        \u003cenvironments\u003e\n            \u003cenvironment\u003e\n                \u003cname\u003edefault\u003c/name\u003e\n                \u003cbaseUrl\u003ehttp://localhost\u003c/baseUrl\u003e\n                \u003cbasicAuth\u003e \u003c!-- optional --\u003e\n                    \u003cusername\u003eusername\u003c/username\u003e\n                    \u003cpassword\u003epassword\u003c/password\u003e\n                \u003c/basicAuth\u003e\n            \u003cenvironment\u003e\n            \u003c!-- ... --\u003e\n        \u003cenvironments\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e \u003c!-- optional --\u003e\n        \u003cexecution\u003e\n            \u003cid\u003egenerate-postman\u003c/id\u003e\n            \u003cphase\u003epackage\u003c/package\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003egenerate\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\nThe ```\u003cexecution\u003e``` section is optional, as the plugin binds it's ```generate``` goal to the ```package``` phase. \n\n# Build\n```\n$ mvn clean install\n```\n\nTu run the integration tests, use the ```run-its``` profile. Make sure you have the ```newman-assert``` and ```rodolpheche/wiremock``` docker images:\n```\n$ cd newman-assert \u0026\u0026 build.sh \u0026\u0026 cd ..\n$ docker pull rodolpheche/wiremock\n```\nThen:\n```\n$ mvn clean install -Prun-its \n```\n\n# Release \u0026 Deploy\nWhen ```gpg: signing failed: Inappropriate ioctl for device```, executing ```export GPG_TTY=$(tty)``` might help.\n\n## Validating before tagging\nTo validate the checks sonatype executes before tagging, update the ```pom.xml``` to remove the ```-SNAPSHOT```. Then, execute\n```\n$ mvn clean deploy -Prelease\n```\n\n## Actual release\n```\n$ mvn clean release:clean release:prepare\n$ mvn release:perform\n```\nRelease from web UI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpollet%2Fpostman-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpollet%2Fpostman-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpollet%2Fpostman-maven-plugin/lists"}