[
https://issues.apache.org/jira/browse/SOLR-13452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16843541#comment-16843541
]
Uwe Schindler commented on SOLR-13452:
--------------------------------------
Hi Mark,
I will commit soon some refactoring of forbiddenapis. It looks you copied the
plugin code mostly from Elasticsearch - but you missed to copy the comment
about the "+=" stuff. Actually the configuration is much easier if you but all
signatures into each task and not in the superclock "forbiddenApis" (which is
an extension function, so it can't easily inherit - one of the horrible details
of Gradle). As the signatures differ anyways and we iterate over all tasks,
it's better to define them all in the task. Then you can easily add sigantures.
I also added the exclusion for the hadoop test classes (in
solr/core/build.gradle).
About the servlet-api: The problem is the following: As it's a compileOnly
dependency, it's not exported by the project. So subprojects need to redefine
the compileOnly dependency, if they actually use the classes. As the servlet
API is provided by the servlet container at runtime, in reality it should be
compileOnly, so you are right and every module that uses the classes has to use
compileOnly.
The problem in forbiddenApis is that the signatures need to be parsed and this
does not work if the classes are not in compile classpath... Therere are 2 ways
to solve this:
- tell fobidden to ignore unknown sigantures files (I think Lucene's Maven
build does this)
- only add servlet-api.txt, if the servlet-api is on the classpath. I added
some "idea" - which does not yet work - to the code (commented out). It worked
partially last thursday, but you changed the code so I was not able to followup.
The forbidden code has other problems:
- system out checking is still missing
- commons-io checks are also missing. I will add them with the correct version
number like in Ant's build in the same way like I plan to do the servlet-api
detection (look into dependencies / classpath and use correct version)
Please don't touch forbidden yet, I'd like to fix this, but it was a changing
target...
Uwe
> Update the lucene-solr build from Ivy+Ant+Maven (shadow build) to Gradle.
> -------------------------------------------------------------------------
>
> Key: SOLR-13452
> URL: https://issues.apache.org/jira/browse/SOLR-13452
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Build
> Reporter: Mark Miller
> Priority: Major
>
> I took some things from the great work that Dat did in
> [https://github.com/apache/lucene-solr/tree/jira/gradle] and took the ball a
> little further.
>
> When working with gradle in sub modules directly, I recommend
> [https://github.com/dougborg/gdub]
> This gradle branch uses the following plugin for version locking, version
> configuration and version consistency across modules:
> [https://github.com/palantir/gradle-consistent-versions]
> By default, dependencies are not transitive, but there is a special
> Configuration for adding dependencies on other project internal modules that
> are transitive to their direct external dependencies (their jar libs).
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]