Hello all
As mentioned in previous emails, I would like to propose a change in
Maven POM. The proposal is to replace (deprecate) all the following
<build> elements:
* resources
* testResources
* sourceDirectory
* testSourceDirectory
* scriptSourceDirectory
* In maven-compiler-plugin configuration:
o includes
o excludes
o testIncludes
o testExcludes
replaced by a single "one element rules them all":
* sources
The child elements would be <Source> elements practically identical to
the current <Resource> in Maven 3 (so it can be a drop-in replacement),
but with more properties. Each <Source> can have the following:
* directory (same as in Resource, inherited from FileSet)
* includes (same as in Resource, inherited from PatternSet)
* excludes (same as in Resource, inherited from PatternSet)
* scope
* module
* targetVersion
* targetPath (taken from <Resource>)
* filtering (taken from <Resource>)
* enabled
Documentation for above properties can be viewed in this commit (work in
progress, may be squashed at any time):
https://github.com/Geomatys/maven/commit/ac813a5a344d10e4f8f6afeb441f09ed85309017
Above commit is the beginning of a proof of concept. I would like to
open a discussion about whether there is agreement on this approach
before to put too much work in the proof of concept. I think that
something like the above is essential for leveraging Java 9+ features in
an easy-to-use way (doing multi-version JAR files is currently possible
but not easy). We don't need to do exactly like the above, change
proposals are of course welcome. But I think that we need something at
least equivalent in terms of capability to specify multiple sources,
some of them targeting different Java versions and module names.
Martin