bkryza / bash-swagger-codegen

Bash client code Swagger codegen
Apache License 2.0
6 stars 2 forks source link

How to setup swagger-codegen-cli.jar dependency ? #1

Open chussenot opened 7 years ago

chussenot commented 7 years ago
# chussenot @ macbook-air in ~/bash-swagger-codegen on git:master x [14:09:01]
$ mvn assembly:assembly -DdescriptorId=jar-with-dependencies
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for io.swagger:bash-swagger-codegen:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 81, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bash-swagger-codegen 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.2-beta-5:assembly (default-cli) > package @ bash-swagger-codegen >>>
[WARNING] The POM for io.swagger:swagger-codegen-cli:jar:2.2.2-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.430 s
[INFO] Finished at: 2017-02-10T14:09:22+01:00
[INFO] Final Memory: 8M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project bash-swagger-codegen: Could not resolve dependencies for project io.swagger:bash-swagger-codegen:jar:1.0.0: Could not find artifact io.swagger:swagger-codegen-cli:jar:2.2.2-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
bkryza commented 7 years ago

@chussenot

This repository is supposed to be build using:

mvn assembly:assembly -DdescriptorId=jar-with-dependencies

However, as of last month this repository is deprecated as it has been integrated and is being now updated in the main swagger-codegen project: https://github.com/swagger-api/swagger-codegen

To use it try:

git clone https://github.com/swagger-api/swagger-codegen

cd swagger-codegen

mvn package

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l bash -o generated/bash/petstore -c modules/swagger-codegen/src/test/resources/2_0/bash-config.json

cd generated/bash/petstore

chmod u+x petstore-cli

./petstore-cli -h

Sorry, I forgot to update the README here...