How do I force the sbt plugin to exclude its dependency?

After banging my head about https://github.com/google/guice/issues/846 for over an hour, I realized that I have a Guice library provided by two different banks: guice -4.0-beta5.jar and sisu -guice-3.1.3-no_aop.jar.

Gaahh ...

The second is incompatible with Guava 18 and, if loaded, throws errors when using Guava.

I am creating an SBT plugin that has no dependencies, exception for added implication sbtPlugin := true

.

Dependency tree (my plugin com.github.pauldraper.playclosure:sbt-plugin

):

> what-depends-on org.sonatype.sisu sisu-guice 3.1.3
[info] org.sonatype.sisu:sisu-guice:3.1.3
[info]   +-org.eclipse.sisu:org.eclipse.sisu.plexus:0.0.0.M5
[info]     +-org.apache.maven:maven-core:3.2.2
[info]     | +-org.vafer:jdeb:1.3
[info]     |   +-com.typesafe.sbt:sbt-native-packager:0.7.4
[info]     |     +-com.typesafe.play:sbt-plugin:2.3.7
[info]     |       +-com.github.pauldraper.playclosure:sbt-plugin:0.0-SNAPSHOT
[info]     |       | +-default:project_2.10:0.1-SNAPSHOT [S]
[info]     |       | 
[info]     |       +-default:project_2.10:0.1-SNAPSHOT [S]
[info]     |       
[info]     +-org.apache.maven:maven-plugin-api:3.2.2
[info]       +-org.apache.maven:maven-core:3.2.2
[info]       | +-org.vafer:jdeb:1.3
[info]       |   +-com.typesafe.sbt:sbt-native-packager:0.7.4
[info]       |     +-com.typesafe.play:sbt-plugin:2.3.7
[info]       |       +-com.github.pauldraper.playclosure:sbt-plugin:0.0-SNAPSHOT
[info]       |       | +-default:project_2.10:0.1-SNAPSHOT [S]
[info]       |       | 
[info]       |       +-default:project_2.10:0.1-SNAPSHOT [S]
[info]       |       
[info]       +-org.vafer:jdeb:1.3
[info]         +-com.typesafe.sbt:sbt-native-packager:0.7.4
[info]           +-com.typesafe.play:sbt-plugin:2.3.7
[info]             +-com.github.pauldraper.playclosure:sbt-plugin:0.0-SNAPSHOT
[info]             | +-default:project_2.10:0.1-SNAPSHOT [S]
[info]             | 
[info]             +-default:project_2.10:0.1-SNAPSHOT [S]
[info]             

      

So this horrible dependency transitively goes through sbt-plugin

.

Ideally, I would not require a plugin with exceptions from end users.

How can I use my plugin to exclude this dependency and not create this problem?

+3


source to share





All Articles