swagger-api / swagger-api/swagger-codegen
Maven errors when building client/server codegen from project stubs
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to make a custom client and server codegen and am running into issues with Maven. The base README example:
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar meta \
-o output/myLibrary -n myClientCodegen -p com.my.company.codegen
generates a project that eventually fails to build with mvn package with the following errors (running maven from output/myLibrary):
[ERROR] Failed to execute goal on project myClientCodegen-swagger-codegen: Could not
resolve dependencies for project io.swagger:myClientCodegen-swagger-codegen:jar:1.0.0:
Could not find artifact io.swagger:swagger-codegen:jar:2.1.6-SNAPSHOT -> [Help 1]
This is using the the latest master branch commit. The versions seem to be the same, and I'm not experienced enough with Maven to know what the problem is.
The example PRs in the Wiki are all targeted towards adding functionality to this project itself -- I'd appreciate any additional tips for maintaining a separate, domain-specific codegen project that does not need to be merged into swagger-codegen.
For example, I'd like it to be in a separate directory and only use the swagger-codegen project as a dependency -- would this be the correct form? I understand Maven might be able to accomplish this with <repositories>, but again I've not been able to get this to work.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the base README meta example and the generated project under output/myLibrary, then run mvn package there to reproduce the missing io.swagger:swagger-codegen:2.1.6-SNAPSHOT dependency. Inspect the generated Maven project and the modules/swagger-codegen-cli build to determine how the dependency is expected to be supplied. Done means a separate generated client or server codegen project builds successfully against this repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100