Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Duplicate external dependencies #89

Closed
ilya-klyuchnikov opened this Issue Feb 1, 2012 · 3 comments

Comments

Projects
None yet
2 participants

The example of this behavior is available at this project.

The generated .classpath containes duplicates:

<classpathentry path="/Users/ilya/.ivy2/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar" kind="lib"></classpathentry>

<classpathentry kind="lib" path="/Users/ilya/.ivy2/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar" sourcepath="/Users/ilya/.ivy2/cache/javax.servlet/servlet-api/srcs/servlet-api-2.5-sources.jar"></classpathentry>

It seems that in this case the root cause is that this dependency is marked as provided:

organization := "com.example"

name := "scalatra-sbt-prototype"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.9.1"

seq(webSettings :_*)

libraryDependencies ++= Seq(
  "org.scalatra" %% "scalatra" % "2.0.3",
  "org.scalatra" %% "scalatra-scalate" % "2.0.3",
  "org.scalatra" %% "scalatra-specs2" % "2.0.3" % "test",
  "ch.qos.logback" % "logback-classic" % "1.0.0" % "runtime",
  "org.eclipse.jetty" % "jetty-webapp" % "7.5.4.v20111024" % "container",
  "javax.servlet" % "servlet-api" % "2.5" % "provided"
)

resolvers += "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"

Contributor

hseeberger commented Feb 1, 2012

Thanks a lot for reporting and the excellent example!

Contributor

hseeberger commented Feb 3, 2012

The reason for this bug is that the servlet-api dependency has no source attachment in compile but has one in test configuration. Very weird Ivy magic!

@hseeberger hseeberger closed this in 57e7500 Feb 3, 2012

Contributor

hseeberger commented Feb 3, 2012

Fixed in 2.0.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment