[
https://issues.apache.org/jira/browse/XMLBEANS-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Marcano updated XMLBEANS-659:
------------------------------------
Description:
Currently, The plugin always run by default, not matter if changes where made.
There is a configuration property named _buildSchemas_ that can be used to
disable it with external flags like a system property.
This behavior isn't much of a problem when there is a single Maven module or it
as multi-module project and the one generating the schema is one leaf of the
dependency tree. Recently I have to add schema generation to one of the roots
of the dependency tree and always regenerating the schema mean the entire
large multi-module project needs to be recompiled. I am disabling it with
system properties, but sometimes it is easy to forget.
I plan to submit a patch to add this support. My idea is to add logic, to hash
all inputs of the plugin, like the configuration entries, the compiler version,
the schema filenames and modification times and store a file as a flag to
check if any input has changed from previous builds and then run the compiler
only when necessary.
The _buildSchemas_ configuration could be extended to accept a new value like
_incremental_ without changing the default `true`. So users can opt-in to the
new behavior, or the default can be changed if agreed.
was:
Currently, The plugin always run by default, not matter if changes where made.
There is a configuration property named _buildSchemas_ that can be used to
disable it with external flags like a system property.
This behavior isn't much of a problem when there is a single Maven module or it
as multi-module project and the one generating the schema is one leaf of the
dependency tree. Recently I have to add schema generation to one of the roots
of the dependency tree and always regenerating the schema mean the entire
large multi-module project needs to be recompiled. I am disabling it with
system properties, but sometimes it is easy to forget.
I plan to submit a patch to add this support. My idea is to add logic, to hash
all inputs of the plugin, like the configuration entries, the compiler version,
the schema filenames and modification times and store a file as a flag to
check if any input has changed from previous builds and then run the compiler
only when necessary.
The _buildSchemas_ configuration could be extended to accept a new value like
_incremental_ without changing the default `yes`. So users can opt-in to the
new behavior, or the default can be changed if agreed.
> Make Maven plugin regenerate schemas only when input changes (incremental
> build)
> --------------------------------------------------------------------------------
>
> Key: XMLBEANS-659
> URL: https://issues.apache.org/jira/browse/XMLBEANS-659
> Project: XMLBeans
> Issue Type: Bug
> Components: Tools
> Affects Versions: Version 5.3.0
> Reporter: Robert Marcano
> Priority: Minor
> Fix For: TBD
>
>
> Currently, The plugin always run by default, not matter if changes where
> made. There is a configuration property named _buildSchemas_ that can be used
> to disable it with external flags like a system property.
> This behavior isn't much of a problem when there is a single Maven module or
> it as multi-module project and the one generating the schema is one leaf of
> the dependency tree. Recently I have to add schema generation to one of the
> roots of the dependency tree and always regenerating the schema mean the
> entire large multi-module project needs to be recompiled. I am disabling it
> with system properties, but sometimes it is easy to forget.
> I plan to submit a patch to add this support. My idea is to add logic, to
> hash all inputs of the plugin, like the configuration entries, the compiler
> version, the schema filenames and modification times and store a file as a
> flag to check if any input has changed from previous builds and then run the
> compiler only when necessary.
> The _buildSchemas_ configuration could be extended to accept a new value like
> _incremental_ without changing the default `true`. So users can opt-in to the
> new behavior, or the default can be changed if agreed.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]