Swagger - не может создать собственный генератор - PullRequest
0 голосов
/ 27 апреля 2020

Я скачал чванство:

git clone https://github.com/swagger-api/swagger-codegen
cd swagger-codegen
mvn clean package

После этого я создал свой собственный генератор:

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar meta \
  -o out/generators/my-codegen -n my-codegen -p com.my.company.codegen

(https://openapi-generator.tech/docs/customization/)

Но когда я скомпилирую, ? получаю ошибку:

mvn package
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for io.swagger:my-codegen-swagger-codegen:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 65, column 21
[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] ---------------< io.swagger:my-codegen-swagger-codegen >----------------
[INFO] Building my-codegen-swagger-codegen 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for io.swagger:swagger-codegen:jar:2.4.14-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.320 s
[INFO] Finished at: 2020-04-27T22:55:23+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project my-codegen-swagger-codegen: Could not resolve dependencies for project io.swagger:my-codegen-swagger-codegen:jar:1.0.0: Could not find artifact io.swagger:swagger-codegen:jar:2.4.14-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

В пом. xml Я нашел:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <swagger-codegen-version>2.4.14-SNAPSHOT</swagger-codegen-version>
    <maven-plugin-version>1.0.0</maven-plugin-version>
    <junit-version>4.8.1</junit-version>
</properties>
...