Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate external dependencies #89

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

Duplicate external dependencies #89

ilya-klyuchnikov opened this issue Feb 1, 2012 · 3 comments
Labels
Milestone

Comments

@ilya-klyuchnikov
Copy link

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/"

@hseeberger
Copy link
Member

Thanks a lot for reporting and the excellent example!

@hseeberger
Copy link
Member

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
Copy link
Member

Fixed in 2.0.0-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants