swagger-api / swagger-api/swagger-codegen
Java8 build failed with the error
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When building with pom.java8.xml, it failed the command mvn clean package with the error cannot access org.testng.annotations.AfterMethod
Swagger-codegen version
It's the branch 3.0.0
Swagger declaration file content or url
N/A. Source code failed to build.
Command line used for generation
N/A
Steps to reproduce
Java replace pom.xml with the pom.java8.xml and run mvn clean package.
Related issues/PRs
Suggest a fix/enhancement
Looks like testng version above 7.5 is not compatible with Java8 while the project is using 7.7.1. If you still want to support Java8, a compatible testng version should be used.
https://stackoverflow.com/questions/73075884/org-testng-itestlistener-has-been-compiled-by-a-more-recent-version-of-the-java
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 pom.java8.xml and compare its TestNG dependency with the Java 8 compatibility requirement described in the issue. Run mvn clean package after checking the dependency configuration; done means the branch builds successfully under Java 8 without the org.testng.annotations.AfterMethod error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100