You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steve Rowe (JIRA)" <ji...@apache.org> on 2014/04/23 10:09:16 UTC

[jira] [Commented] (SOLR-6006) SolrJ maven pom file specifying log4j as a dependency

    [ https://issues.apache.org/jira/browse/SOLR-6006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977961#comment-13977961 ] 

Steve Rowe commented on SOLR-6006:
----------------------------------

As of Lucene/Solr 4.7, the POM dependencies are built using a custom Ant task that collects compile-phase and test-phase dependencies from each module's {{ivy.xml}} file - see LUCENE-5217.  

Solrj's {{ivy.xml}} includes a compile-phase dependency on log4j, even though non-test compilation succeeds without it - it's needed only for test-phase compilation; unfortunately, there are no test-phase dependencies defined in that module, so compile- and test- phase dependencies are mixed.  By contrast, modules solr-core, morphlines-core and dataimporthandler declare test dependencies, which are retrieved into per-module {{test-lib/}} directories (as opposed to {{lib/}} for non-test dependencies). 

The fix is to distinguish test-phase dependencies, including log4j, from compile-phase dependencies.  I'll work on a patch.

> SolrJ maven pom file specifying log4j as a dependency
> -----------------------------------------------------
>
>                 Key: SOLR-6006
>                 URL: https://issues.apache.org/jira/browse/SOLR-6006
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.7.2
>            Reporter: Steven Scott
>            Priority: Minor
>
> I'm not sure what version this first appeared in, as we just bumped from 4.5 to 4.7, but log4j is specified as a dependency in the solr-solrj pom.xml, and without the optional flag. I checked out the source to verify that there isn't actually a dependency on log4j (doesn't seem to be), but I wasn't able to decipher the ant build (looks like there's a pom.xml.template that generates the pom with dependencies coming from Ivy?)
> Anyway, this is an issue since now we have to manually <exclude> log4j from every project that depends on SolrJ.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org