Maven goal from example does not work
See original GitHub issueHi guys,
I am using the example from the maven plugin page which looks like:
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>3.3.4</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/generatedtest/openapi.yaml</inputSpec>
<output>${project.build.directory}/generated-sources</output>
<generatorName>java</generatorName>
</configuration>
</execution>
</executions>
</plugin>
But running the plugin throws:
Failed to execute goal org.openapitools:openapi-generator-maven-plugin:3.3.4:generate (default-cli) on project jax-rs-2.1-openapi: The parameters 'inputSpec' for goal org.openapitools:openapi-generator-maven-plugin:3.3.4:generate are missing or invalid -> [Help 1]
What´s wrong with the example? I just can’t fix it. Also tried the petstore generator - same result. Seems to be related to the plugin. The workaround would be to use node.js with npm as maven plugin and call the node.js generator. But that´s ugly i think.
Kind regards.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to fix this no goals have been specified for this build on ...
I found this worked for me. In the "Edit Configuration" dialogue window, select spring-boot:run for the "Command Line", click Apply and OK. then ......
Read more >IntelliJ IDEA - Troubleshooting common Maven issues
If you encounter problems working with your Maven project you can check to see if the following solutions and workarounds can help you...
Read more >Maven Goals and Phases - Baeldung
Each phase is a sequence of goals, and each goal is responsible for a specific task. When we run a phase, all goals...
Read more >Introduction to the Build Lifecycle - Apache Maven
It may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of...
Read more >Building applications with Maven - Quarkus
You should not run production application in dev mode. ... By default, the Maven plugin picks up compiler flags to pass to javac...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this needs to be documented more prominently or the plugin should give a different error message. This was very confusing to me and cost me way too much time before I found this issue. 😦
I do not even really understand why it would work as part of the compile phase and not when called directly.
Just leaving a comment here to say I also fell into this trap and spent quite a while trying to figure out what was wrong. My experience with other generator plugins lead me to believe I could call the plugin directly, as opposed to having to run a compile.
This also helps me control better when I want to execute the generator, as its not common I want to run a generator on every build. My solution is to simply leave it as a commented part of the POM until I want to regenerate.