jsonschema-generator
jsonschema-generator copied to clipboard
JSON Schema Maven plugin triggers Maven Project Builder endless
Using this plugin has the follwing issue:
Eclipse repeats the Refresh->Rebuild cycle approx. every 10 seconds (by calling Maven Project Builder, triggered by the JSON Schema Maven plugin in the background), even if no files are changed or open—only the project itself is open.
JSON Schema Maven plugin should not poll a Refresh->Rebuild-cycle to the Eclipse project, instead the plugin should be called only at build time.
Reproducer:
- Import the Maven project into Eclipse
- go to pom.xml->right click->Maven->Update Project
- go to Eclipse Preferences->General->Workspace-> enable
Refresh using native hooks or polling - go to Tab Progress
- wait approx. 5-15 seconds
then you will see that a refresh and a rebuild happens:
- wait another 5-15 seconds, it happens again and again
As a hint, using
https://github.com/codehaus-plexus/plexus-build-api
for resources updates has many benefits:
- You can detect if a file has actually changed its input (e.g. one obviously only want to rerun the generation if the json schema changes)
- You can use https://github.com/codehaus-plexus/plexus-build-api/blob/6a689601dc601da745b47b869ccb80e3d183ed8d/src/main/java/org/codehaus/plexus/build/BuildContext.java#L71-L85 to write the results then it will prevent overwrite the results if nothing has changed.