Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta command doesn't work - java.lang.RuntimeException: can't load template codegen/pom.mustache #8784

Closed
hkosova opened this issue Oct 5, 2018 · 1 comment

Comments

@hkosova
Copy link

hkosova commented Oct 5, 2018

Description

Issue #7845 reappeared in v. 3.0.1. The meta command

java -jar swagger-codegen-cli-3.0.1.jar meta -o myCodegenOAS3 -n myCodegenOAS3 -p com.mycompany.swagger

outputs the following error, and the custom generator is not created.

17:44:39.457 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'langs'
17:44:39.457 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'version'
17:44:39.482 [Thread-1] INFO io.swagger.codegen.v3.cli.cmd.Meta - writing to folder [C:\Soft\Development\Swagger\myCodegenOAS3]
17:44:39.547 [Thread-1] ERROR io.swagger.codegen.v3.AbstractGenerator - v2\codegen\pom.mustache (The system cannot find the path specified)
17:44:39.547 [Thread-1] ERROR io.swagger.codegen.v3.AbstractGenerator - can't load template v2\codegen\pom.mustache
Exception in thread "Thread-1" java.lang.RuntimeException: can't load template v2\codegen\pom.mustache
        at io.swagger.codegen.v3.AbstractGenerator.readTemplate(AbstractGenerator.java:51)
        at io.swagger.codegen.v3.cli.cmd.Meta.processFiles(Meta.java:92)
        at io.swagger.codegen.v3.cli.cmd.Meta.lambda$run$0(Meta.java:76)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
        at io.swagger.codegen.v3.cli.cmd.Meta.run(Meta.java:76)
        at java.lang.Thread.run(Unknown Source)
Swagger-codegen version

3.0.1, downloaded from:
https://oss.sonatype.org/content/repositories/releases/io/swagger/codegen/v3/swagger-codegen-cli/3.0.1/swagger-codegen-cli-3.0.1.jar

Java 1.8.0_181 64-bit
Windows 7 64-bit

Swagger declaration file content or url

n/a

Command line used for generation

See above

Steps to reproduce

See above

frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Oct 5, 2018
frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Oct 5, 2018
frantuma added a commit that referenced this issue Oct 5, 2018
frantuma added a commit that referenced this issue Oct 5, 2018
@frantuma
Copy link
Member

frantuma commented Oct 5, 2018

#8786 fixed this in latest 3.0.2-SNAPSHOT available on sonatype. Please reopen ticket if still experiencing issues

@frantuma frantuma closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants