Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #10917
Closed
Open
Issue created 3 years ago by Administrator@rootContributor
  • New related issue

  • Report abuse to administrator

  • New related issue

  • Report abuse to administrator

[REQ] [JAVA] maven plugin generates test in generated-test-sources

Closed

[REQ] [JAVA] maven plugin generates test in generated-test-sources

Created by: feech

Is your feature request related to a problem? Please describe.

Maven uses two different folders generated-sources and generated-test-sources. Test related files supose to get into generated-test-source folder. In current implementation all generated files in a single forlder - ${project.build.directory}/generated-sources/openapi by default.

there are problems with the approach:

  • test files go to production artifact
  • production artifact becomes dependencies (it increses dangerous in the light of recent vulnerability in logging library - the more non essential libraries in prod the likely to catch new vulnerability)

I suspect that majority of java developers just disable generating the test files

I wonder if it it possible to make mvn plugin alligned with conventional folder-structure

Describe the solution you'd like

The solution is to introduce additional parameter testOutput which is ${project.build.directory}/generated-test-sources/openapi by default.

Describe alternatives you've considered

there are several workarounds:

  • copy test files after generation with another maven plugin
  • use org.codehouse.mojo:build-helper-maven-plugin to mark the folder with test files as mvn-test-source

both of these ways have different flaws

Additional context

  1. Oh no!

    You are trying to upload something other than an image. Please upload a .png, .jpg, .jpeg, .gif, .bmp, .tiff or .ico.

    Incoming!

    Drop your designs to start your upload.
Tasks
0

No tasks are currently assigned. Use tasks to break down this issue into smaller parts.

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


Please register or sign in to reply
0 Assignees
None
Assign to
Labels
1
Enhancement: Feature
1
Enhancement: Feature
    Assign labels
  • Manage project labels

Milestone
No milestone
None
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
1
1 participant
Administrator
Reference: OpenAPITools/openapi-generator#10917

Menu

Explore Projects Groups Snippets