Scala Play project fails build after adding swagger-play2 dependency - sbt cannot find play?

pathikrit

I created a sandbox play project for testing. It was building and passing the tests on Travis CI. I added dependency on swagger-play2 and it started failing the tests with error message:

sbt.ResolveException: download failed: com.typesafe.play#play_2.10;2.2.1!play_2.10.jar(src)

Steps to reproduce:

  1. Create default play scala project
  2. Build passes before adding swagger
  3. Adding swagger to build.sbt
  4. Build now fails :(
  5. Remove swagger dependency
  6. Build now passes again!

It seems strange adding dependency on swagger would trigger this build failure. What am I doing wrong? Feel free to send a pull request on the github project if you want to test your fixes ((Travis should auto build your pull request).

Complete GitHub project history: https://github.com/pathikrit/play-test/commits/master

Complete Travis-CI build history: https://travis-ci.org/pathikrit/play-test/builds

Commit that triggers build failure: https://github.com/pathikrit/play-test/commit/d8ad88083b56dd0269eaefc30025a42f54f0dba5

pathikrit

I now have a script to setup the dependencies:

PLAY_VERSION=2.2.1
wget http://downloads.typesafe.com/play/${PLAY_VERSION}/play-${PLAY_VERSION}.zip
      unzip play-${PLAY_VERSION}.zip -d ${HOME}
      # Manually populate the play directory with missing jars - TODO: remove this hack (see http://stackoverflow.com/questions/21361621/)
      SCALA_VERSION=2.10
      MAVEN_PLAY=http://repo.typesafe.com/typesafe/maven-releases/com/typesafe/play/play_${SCALA_VERSION}/${PLAY_VERSION}/play_${SCALA_VERSION}-${PLAY_VERSION}
      LOCAL_REPO=${HOME}/play-${PLAY_VERSION}/repository/local/com.typesafe.play/play_${SCALA_VERSION}/${PLAY_VERSION}
      mkdir ${LOCAL_REPO}/srcs/ ${LOCAL_REPO}/poms/
      wget ${MAVEN_PLAY}.pom --output-document ${LOCAL_REPO}/poms/play_${SCALA_VERSION}.pom
      wget ${MAVEN_PLAY}-sources.jar --output-document ${LOCAL_REPO}/srcs/play_${SCALA_VERSION}-sources.jar
      wget ${MAVEN_PLAY}-test-sources.jar --output-document ${LOCAL_REPO}/srcs/play_${SCALA_VERSION}-test-sources.jar

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Scala Play project fails build after adding swagger-play2 dependency - sbt cannot find play?

From Dev

Scala Play framework dependency in clean sbt project

From Dev

Scala Play framework dependency in clean sbt project

From Dev

In my play project, I cannot find project/build.scala

From Dev

Cannot start sbt for Scala Play! project (sbt.ResolveException: unresolved dependency)

From Dev

Getting Swagger to work in Play2 Scala

From Dev

How to add SecureSocial to Play 2.x project with build.sbt (not Build.scala)

From Dev

How to find out which dependency includes wrong version of Play/Scala in sbt

From Dev

Play Scala SBT not showing dependency in Reference Library in Eclipse

From Dev

Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

From Dev

Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

From Dev

Serializing a Scala List to JSON in Play2

From Dev

Scala - play2 config get section

From Dev

Integrating Keycloak into Play2 project

From Dev

Cannot broadcast to all clients in play2

From Dev

Adding artifact to play project using SBT - Native Packager Plugin

From Dev

Adding Play JSON Library to sbt

From Dev

Changes to build.sbt to enable ScalaTest tests to run with Scala Play

From Dev

Scala Play messages file to inline or reuse the version in build.sbt

From Dev

Changes to build.sbt to enable ScalaTest tests to run with Scala Play

From Dev

How to create a Play 2.2 Scala application as an SBT sub-project

From Dev

SBT Won´t update .classpath in a Play Scala project

From Dev

Play framework/ SBT : compile/build project with two sets of dependencies respectively

From Dev

Run Play project from sbt

From Dev

Play2 & ReactiveMongo testing issue: db connection right after test fails

From Dev

Invalid project name after IntelliJ update in Java Play SBT

From Dev

Dependency Injection (DI) in Scala with Play

From Dev

Scala Dependency Injection in Play Framework

From Dev

Add a local dependency to a Play project

Related Related

  1. 1

    Scala Play project fails build after adding swagger-play2 dependency - sbt cannot find play?

  2. 2

    Scala Play framework dependency in clean sbt project

  3. 3

    Scala Play framework dependency in clean sbt project

  4. 4

    In my play project, I cannot find project/build.scala

  5. 5

    Cannot start sbt for Scala Play! project (sbt.ResolveException: unresolved dependency)

  6. 6

    Getting Swagger to work in Play2 Scala

  7. 7

    How to add SecureSocial to Play 2.x project with build.sbt (not Build.scala)

  8. 8

    How to find out which dependency includes wrong version of Play/Scala in sbt

  9. 9

    Play Scala SBT not showing dependency in Reference Library in Eclipse

  10. 10

    Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

  11. 11

    Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

  12. 12

    Serializing a Scala List to JSON in Play2

  13. 13

    Scala - play2 config get section

  14. 14

    Integrating Keycloak into Play2 project

  15. 15

    Cannot broadcast to all clients in play2

  16. 16

    Adding artifact to play project using SBT - Native Packager Plugin

  17. 17

    Adding Play JSON Library to sbt

  18. 18

    Changes to build.sbt to enable ScalaTest tests to run with Scala Play

  19. 19

    Scala Play messages file to inline or reuse the version in build.sbt

  20. 20

    Changes to build.sbt to enable ScalaTest tests to run with Scala Play

  21. 21

    How to create a Play 2.2 Scala application as an SBT sub-project

  22. 22

    SBT Won´t update .classpath in a Play Scala project

  23. 23

    Play framework/ SBT : compile/build project with two sets of dependencies respectively

  24. 24

    Run Play project from sbt

  25. 25

    Play2 & ReactiveMongo testing issue: db connection right after test fails

  26. 26

    Invalid project name after IntelliJ update in Java Play SBT

  27. 27

    Dependency Injection (DI) in Scala with Play

  28. 28

    Scala Dependency Injection in Play Framework

  29. 29

    Add a local dependency to a Play project

HotTag

Archive