'No marketplace entries found to handle swagger-codegen-maven-plugin
Is there a way to resolve/suppress the error "No marketplace entries found to handle swagger-codegen-maven-plugin:3.0.23:generate in Eclipse." when importing projects into Eclipse?
swagger-codegen in my pom.xml is shown below,
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.23</version>
<executions>
<execution>
<id>generate-swagger-model</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
....
</configuration>
</execution>
</executions>
</plugin>
and there is an error saying "Plugin execution is not covered by lifecycle configuration", as shown below.

I looked at this question and reply How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds, but I dont have parent-child pom files, its a standalone project. Also tried the other solution, putting the plugin inside pluginManagement and the swagger-codegen stopped working, meaning, it stopped generating java files.
The errors are not causing any build issues, or impacting any development. But curious on how to resolve/suppress these from happening!
Solution 1:[1]
I ran into the same problem. It seems the swagger-codegen-maven-plugin is not associated with the generate goal.
I checked the global Eclipse maven lifecycle mapping settings (Preferences -> Maven -> Lifecycle Mappings) to recognize that the mapping file location points to a file which did not exist.
So at the specified location I created a new global mapping file with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<goals>
<goal>generate</goal>
</goals>
<versionRange>[0.0,)</versionRange>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
Then after a Maven update the swagger-codegen plugin finally started working.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jsteltze |

