[
https://issues.apache.org/jira/browse/LUCENE-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Rowe updated LUCENE-5217:
-------------------------------
Attachment: LUCENE-5217.patch
Patch that templatizes dependencies in all POM templates, and fills them out
using a new Ant task.
In the {{<dependencyManagement>}} section in the grandparent POM produced using
this patch, all dependencies' versions are specified, as are exclusions for all
transitive compile-scope dependencies.
So this patch directly makes the Maven setup the same as the Ant setup: all
transitive dependencies are excluded, and all dependencies and their versions
are pulled from the Ant/Ivy config.
This is a work in progress: I've only tested the {{get-maven-poms}} task so
far, and I haven't yet run the Maven build or tried to
{{generate-maven-artifacts}}, so it's not ready yet. I think it's most of the
way there though.
The strategy is to put all modules' {{classpath}}-s and {{test.classpath}}-s
into a single properties file using vanilla Ant, and then feed that into a new
custom Ant task that also reads all the {{ivy.xml}} files, the centralized ivy
versions file, and the external dependencies' {{ivy.xml}} files in the Ivy
cache, then output a filters file that is used when copy'ing the POM templates
to {{maven-build/}}, so that the appropriate spots are filled in with the right
stuff.
It's kludgy, in that properties files are used to communicate some information,
rather than directly, but I can't see a way to do it all in memory.
Don't be scared by the size of the patch: the majority is just removing the
hard-coded dependencies in the POM templates.
> disable transitive dependencies in maven config
> -----------------------------------------------
>
> Key: LUCENE-5217
> URL: https://issues.apache.org/jira/browse/LUCENE-5217
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-5217.patch
>
>
> Our ivy configuration does this: each dependency is specified and so we know
> what will happen. Unfortunately the maven setup is not configured the same
> way.
> Instead the maven setup is configured to download the internet: and it
> excludes certain things specifically.
> This is really hard to configure and maintain: we added a
> 'validate-maven-dependencies' that tries to fail on any extra jars, but all
> it really does is run a license check after maven "runs". It wouldnt find
> unnecessary dependencies being dragged in if something else in lucene was
> using them and thus they had a license file.
> Since maven supports wildcard exclusions: MNG-3832, we can disable this
> transitive shit completely.
> We should do this, so its configuration is the exact parallel of ivy.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]