[jira] [Comment Edited] (LUCENE-5217) disable transitive dependencies in maven config
[ https://issues.apache.org/jira/browse/LUCENE-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13810005#comment-13810005 ] Steve Rowe edited comment on LUCENE-5217 at 10/31/13 7:47 AM: -- Patch, hopefully complete. In addition to all tests passing in the Maven build after {{ant get-maven-poms}}, {{generate-maven-artifacts}} and {{precommit}} both pass. I'm running {{ant validate-maven-dependencies}} and {{ant nightly-smoke}} now, and if no problems surface, I'll commit to trunk. I plan on letting it soak for a few days before backporting to branch_4x. was (Author: steve_rowe): Patch, hopefully complete. In addition to all tests passing in the Maven build after {{ant get-maven-poms}}, {{generate-maven-artifacts}}and {{precommit}} all pass. I'm running {{ant validate-maven-dependencies}} {{ant nightly-smoke}} now, and if no problems surface, I'll commit to trunk. I plan on letting it soak for a few days before backporting to branch_4x. > 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 >Assignee: Steve Rowe > Attachments: LUCENE-5217.patch, LUCENE-5217.patch, 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (LUCENE-5217) disable transitive dependencies in maven config
[ https://issues.apache.org/jira/browse/LUCENE-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13771062#comment-13771062 ] Steve Rowe edited comment on LUCENE-5217 at 9/18/13 6:33 PM: - I can't get the wildcard-exclusion-disables-transitive-dependencies thing to work - I tried with Maven 3.0.3, 3.0.5 and 3.1.0 (on OS X 10.8.4), all behave the same. I tested a single Solr module and looked at a single dependency's transitive dependency: solrj module, zookeeper dependency, and zookeeper's transitive dependency netty. Here's the zookeeper dependency config from solrj's POM: {noformat} org.apache.zookeeper zookeeper javax.jms jms com.sun.jmx jmxri com.sun.jdmk jmxtools log4j log4j org.jboss.netty netty org.slf4j slf4j-log4j12 jline jline {noformat} Without making any changes, here's the output from running {{mvn -X -DskipTests install}} under {{maven-build/solr/solrj/src/java/}}: {noformat} [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ solr-solrj --- [...] [DEBUG] org.apache.solr:solr-solrj:jar:5.0-SNAPSHOT (selected for null) [DEBUG] org.apache.zookeeper:zookeeper:jar:3.4.5:compile (selected for compile) [DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (applying version: 1.6.6) [DEBUG] org.slf4j:slf4j-api:jar:1.6.6:compile (selected for compile) [DEBUG] commons-io:commons-io:jar:2.1:compile (selected for compile) [DEBUG] org.noggit:noggit:jar:0.5:compile (selected for compile) [DEBUG] org.apache.httpcomponents:httpclient:jar:4.2.3:compile (selected for compile) [DEBUG] org.apache.httpcomponents:httpcore:jar:4.2.2:compile (selected for compile) [DEBUG] commons-logging:commons-logging:jar:1.1.1:compile (selected for compile) [DEBUG] commons-codec:commons-codec:jar:1.6:compile (applying version: 1.7) [DEBUG] commons-codec:commons-codec:jar:1.7:compile (selected for compile) [DEBUG] org.apache.httpcomponents:httpmime:jar:4.2.3:compile (selected for compile) [DEBUG] org.codehaus.woodstox:wstx-asl:jar:3.2.7:runtime (selected for runtime) [DEBUG] stax:stax-api:jar:1.0.1:runtime (selected for runtime) [DEBUG] org.slf4j:jcl-over-slf4j:jar:1.6.6:compile (selected for compile) [DEBUG] org.slf4j:jul-to-slf4j:jar:1.6.6:compile (selected for compile) [DEBUG] org.slf4j:slf4j-api:jar:1.6.6:compile (selected for compile) [DEBUG] org.slf4j:slf4j-log4j12:jar:1.6.6:compile (selected for compile) [DEBUG] log4j:log4j:jar:1.2.17:compile (applying version: 1.2.16) [DEBUG] log4j:log4j:jar:1.2.16:compile (selected for compile) [DEBUG] log4j:log4j:jar:1.2.16:compile (selected for compile) [DEBUG] junit:junit:jar:4.10:test (selected for test) {noformat} You can see above that zookeeper's only transitive dependency is slf4j-api. I get the same output (and behavior) when I remove netty from my local Maven repository: {noformat} rm -rf ~/.m2/repository/org/jboss/netty {noformat} Even when netty isn't in my local repository, Maven doesn't try to download it. However, when I change the solrj POM to use the wildcard exclusions: {noformat} org.apache.zookeeper zookeeper * * {noformat} I get the following output from running {{mvn -X -DskipTests install}} under {{maven-build/solr/solrj/src/java/}}: {noformat} [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ solr-solrj --- [...] [DEBUG] org.apache.solr:solr-solrj:jar:5.0-SNAPSHOT (selected for null) [DEBUG] org.apache.zookeeper:zookeeper:jar:3.4.5:compile (selected for compile) [DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (applying version: 1.6.6) [DEBUG] org.slf4j:slf4j-api:jar:1.6.6:compile (selected for compile) [DEBUG] org.slf4j:slf4j-log4j12:jar:1.6.1:compile (applying version: 1.6.6) [DEBUG] org.slf4j:slf4j-log4j12:jar:1.6.6:compile (selected for compile) [DEBUG] log4j:log4j:jar:1.2.17:compile (applying version: 1.2.16) [DEBUG] log4j:log4j:jar:1.2.16:compile (selected for compile) [DEBUG] log4j:log4j:jar:1.2.15:compile (applying version: 1.2.16) [DEBUG] log4j:log4j:jar:1.2.16:compile (selected for compile) [DEBUG] jline:jline:jar:0.9.94:compile (applying version: 0.9.1) [DEBUG] jline:jline:jar:0.9.1:compile (selected for compile) [DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for http://maven.restlet.org Downloading: http://maven.restlet.org/org/jboss/netty/netty/3.2.2.Final/netty-3.2.2.Final.pom [DEBUG] Writing tracking file /Users/sarowe/.m2/repository/org/jboss/netty/netty/3.2.2.Final/netty-3.2.2.Final.pom.lastUpdated [DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for http://repo.maven.apache.org/maven2 Downloading: http://repo.maven.apache.org/maven2/org/jboss/netty/ne