Giter Site home page Giter Site logo

Comments (6)

wordnik-ci avatar wordnik-ci commented on May 2, 2024

If you want to use the snapshot version of swagger, you'll need to add the sonatype snapshot repo to your resolvers

"Angelo K. Huang" [email protected] wrote:

  1. First, under swagger-play2, execute
    $ play publish-local
  2. add appDependencies to my play2's project/Build.scala
    "swagger-play2" %% "swagger-play2" % "1.1-SNAPSHOT"
  3. add resolvers to my play2's project/Build.scala
    resolvers += Resolver.url("local-ivy", new URL("file://" + Path.userHome.absolutePath + "/.ivy2/local"))(Resolver.ivyStylePatterns),
    resolvers += Resolver.url("local-ivy-cache", new URL("file://" + Path.userHome.absolutePath + "/.ivy2/cache"))(Resolver.ivyStylePatterns),
    resolvers += Resolver.url("local-ivy-cache-mvn", new URL("file://" + Path.userHome.absolutePath + "/.ivy2/cache"))(Resolver.mavenStylePatterns),
    resolvers += (Resolver.file("Local Maven Repository", file(Path.userHome.absolutePath+"/.m2/repository"))(Resolver.ivyStylePatterns))

When I run
$ git push heroku master

I got the errors for missing dependency for swagger-play2.

[warn] module not found: swagger-play2#swagger-play2_2.9.1;1.1-SNAPSHOT
[warn] ==== local: tried
[warn] /tmp/build_1sxx8y8pc37jg/.sbt_home/.ivy2/local/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/swagger-play2_2.9.1-1.1-SNAPSHOT.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn] http://repo.typesafe.com/typesafe/snapshots/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/swagger-play2_2.9.1-1.1-SNAPSHOT.pom
[warn] ==== webjars: tried
[warn] http://webjars.github.com/m2/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/swagger-play2_2.9.1-1.1-SNAPSHOT.pom
[warn] ==== Mave2: tried
[warn] http://repo1.maven.org/maven2/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/swagger-play2_2.9.1-1.1-SNAPSHOT.pom
[warn] ==== local-ivy: tried
[warn] file:/tmp/build_1sxx8y8pc37jg/.sbt_home/.ivy2/local/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-ivy-cache: tried
[warn] file:/tmp/build_1sxx8y8pc37jg/.sbt_home/.ivy2/cache/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== local-ivy-cache-mvn: tried
[warn] ==== Local Maven Repository: tried
[warn] /tmp/build_1sxx8y8pc37jg/.sbt_home/.m2/repository/swagger-play2/swagger-play2_2.9.1/1.1-SNAPSHOT/ivys/ivy.xml


Reply to this email directly or view it on GitHub:
#35

from swagger-core.

angeloh avatar angeloh commented on May 2, 2024

I tried adding it to Build.scala. But it is still not able to resolve.

val appDependencies = Seq(
  // Add your project dependencies here,
  "com.github.twitter" % "bootstrap" % "2.0.2",
  "postgresql" % "postgresql" % "9.1-901-1.jdbc4",
  "com.googlecode.libphonenumber" % "libphonenumber" % "4.1",
  "com.restfb" % "restfb" % "1.6.9",
  "swagger-play2" %% "swagger-play2" % "1.1-SNAPSHOT"
)

val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
  // Add your own project settings here
  resolvers += "webjars" at "http://webjars.github.com/m2",
  resolvers += "Mave2" at "http://repo1.maven.org/maven2",
  resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
)

from swagger-core.

fehguy avatar fehguy commented on May 2, 2024

OK i see the issue. The Play2 module is not in a maven repo--per the instructions here:

https://github.com/wordnik/swagger-core/tree/master/samples/scala-play2

You need to publish it locally. So I think you will have to pull the lib and include it in your github project. I'm looking at getting it uploaded to our public maven repo.

from swagger-core.

fehguy avatar fehguy commented on May 2, 2024

I have a work around for now--I've published the artifacts into our github pages repo:

https://github.com/wordnik/wordnik.github.com/tree/master/repository

You can add a resolver to read this repo (which is public) and you should be able to pull your artifacts down:

Resolver.url("swagger-core-github-repo", url("http://wordnik.github.com/repository"))(Resolver.ivyStylePatterns),

It takes a bit for the files to show up in the CDN so it should be available in about 30 minutes. Please report back!

Tony

from swagger-core.

angeloh avatar angeloh commented on May 2, 2024

Thanks. It works for me.

One thing that is different than what described here.
https://github.com/wordnik/swagger-core/blob/master/samples/java-play2/project/Build.scala

I have to change group id to "com.wordnik".

"com.wordnik" %% "swagger-play2" % "1.1-SNAPSHOT"

Please modify the above example and the module's readme.
https://github.com/wordnik/swagger-core/tree/master/modules/swagger-play2

from swagger-core.

fehguy avatar fehguy commented on May 2, 2024

Thanks, just updated the Build.scala and readme.

from swagger-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.