-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsonschema-maven-plugin: add deleteExistingSchemas
#501
Comments
Hi @nimo23, Is the Maven However, if there is no other way, I'm open to pull requests to include the extra parameter. |
Having someting like
will not be cleaned by maven
No need to pick the exact files to delete. It is enough just to delete all the content (with subfolders) in the specified folder (in this example: |
Hi @nimo23, How about assigning a dedicated directory for the generated schema files, that can then be targeted by the Or use something like the following to get rid of this particular directory's contents too? <plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources/schemas</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin> |
Sure. This works. However, this needs to be set up by the user. Normally, the user expects that previously generated files from |
I don't quite agree with that expectation. It boils down to the folder selection, whether the old schema files get discarded or not. |
Yes, but imagine that the consuming client side framework has a folder within |
Yes, I understand that occasionally the need for clearing the target arises. E.g., when you cannot just put the generated files in the mirrored My opinion still holds though. Even the compiler plugin does not delete old compiled files itself. That's what the |
Would it be possible for the plugin to call this |
Please add an an option for jsonschema-maven-plugin:
deleteExistingSchemas: true|false
:If true, existing schemas within the defined
SchemaFilePath
are deleted before new ones are generated.Example:
Currently it seems that only existing files are overwritten and already generated schemas remain untouched (even if
classNames
orpackageNames
have been changed).The text was updated successfully, but these errors were encountered: