helidon
helidon copied to clipboard
OpenAPITools generators generate project with dependency on junit
Testing with latest generators (as of Tim's commit 3e0dad4ce3f17511660a59b5f0a0ce61373de275).
When using the client generators, either MP or SE, the generated project pom.xml has a dependency on junit
:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
Generators with the issue:
- [ ] Client MP
- [ ] Client SE
Server generators look to be OK as they depend on junit-jupiter-api
which Helidon does manage the version of.
To reproduce:
openapi-generator-cli generate -g java-helidon-client --library mp -i ../../quickstart-openapi.yaml --additional-properties "helidonVersion=2.5.3"
mvn clean install
. . .
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 49, column 21
I assume an spec.yaml will suffice for reproducing.
Note that this problem was masked with the SE Client when using 3.0.1 because the OCI SDK BOM was managing the junit version:
<dependency>
<groupId>junit</groupId> <!-- com.oracle.oci.sdk:oci-java-sdk:2.37.0, line 566 -->
<artifactId>junit</artifactId> <!-- com.oracle.oci.sdk:oci-java-sdk:2.37.0, line 567 -->
<version>4.13.2</version> <!-- com.oracle.oci.sdk:oci-java-sdk:2.37.0, line 568 -->
</dependency>