The REST API of our application is using Swagger for documentation. During build we spin up our application, extract the Swagger JSON document, and feed it into the Swagger Codegen Maven Plugin to generate an API client. This plugin spits out a complete Maven project (and Gradle for that matter), including Java files that represent this API client, even Java files with unit tests. Great!
So, now I have a generated project, that's not part of my current Maven build. (Could it be?) I've used generated code plenty, but I struggle to fully comprehend what the best pattern is for this generated project. I would like this project to be published to our Artifactory (its artifact) and to Git (its source code). All preferably from the same build. For the publish to Git I'm afraid to get into the vendor branch pattern, which I've never done well at. I'm anyway not even sure if I'd want to publish to Git on every build, and every commit of my application, or maybe publish to Git based on a source JAR (is that even a thing?), so yeah, I could use some pointers, if anyone has any some good ideas or examples to look at.