phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

Model imports are removed in eclipse after generating interface #234

Closed vasile-baluta closed 6 years ago

vasile-baluta commented 6 years ago

Hi!

We have a project where we created a RAML specification and generate interfaces from the RAML specification.

It works fine when run from command line but when imported to Eclipse the imports of model classes are deleted from interface classes after generation or during the generation of interfaces. It is difficult to understand when this happens.

The project is located in github: https://github.com/Ericsson/eiffel-intelligence

Just clone and import it to Eclipse and the issue will be there.

Any help to understand the issue is appreciated since some of us are more effective when working inside Eclipse

BR Vali

stojsavljevic commented 6 years ago

I wasn't able to build your project. Also, my Eclipse complains about maven-compiler-plugin in the project.

I guess that in your case Eclipse runs the build that somehow generates bad interfaces. Can you just mark raml plugin goal as ignored in Eclipse?

vasile-baluta commented 6 years ago

Hi again!

I did not succeeded yet to mark the plugin goal as ignored in Eclipse by modifying pom.xml.

I tried though.

Vali

stojsavljevic commented 6 years ago

Can you mark it as ignored for entire Eclipse by changing lifecycle-mapping-metadata.xml?

vasile-baluta commented 6 years ago

That is not an alternative since we want it to be reflected for all developers.

claytontabone commented 6 years ago

If you wish to ignore the plugin execution for all developers you should be able to use this new plugin configuration standard for Eclipse M2E http://www.eclipse.org/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata

I had a look at your code and all you should need to do is to add <?m2e ignore?> here.

This new syntax is much less verbose than the older org.eclipse.m2e:lifecycle-mapping configuration and has the benefit of adding the m2e configuration right from within the plugin configuration that you're trying to ignore/manage.