Comments (6)
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:
- First, under swagger-play2, execute
$ play publish-local - add appDependencies to my play2's project/Build.scala
"swagger-play2" %% "swagger-play2" % "1.1-SNAPSHOT" - 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.
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.
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.
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.
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.
Thanks, just updated the Build.scala and readme.
from swagger-core.
Related Issues (20)
- OpenAPI 3.1 broken reference to child class with oneOf reference
- Example missing for @ExternalDocumentation
- `AnnotatedType` is missing javadoc
- Missing array type when using @ArraySchema
- Is there a way to prevent operationIds suffixes?
- Which versions of swagger-core are actively supported? HOT 1
- NPE thrown in AnnotationUtils due to "API backwards compatibility fix" introduced in 2.2.21 HOT 4
- How to always generate yaml/json with the same element order? HOT 2
- swagger-maven-plugin-jakarta is always using the resourceClasses from the first execution HOT 1
- Eclipse project import crashs HOT 3
- Generated but not references ResponseEntity*** type in schema if rest-api-class is using spring's ResponseEntity
- Include fluent methods in Schema to add types and examples
- Cannot define API Key triple at root level
- java.lang.ClassCastException: class jdk.proxy2.$Proxy95 cannot be cast to class jakarta.validation.constraints.Min HOT 1
- Cast to ComposedSchema fails in case of OpenApi 3.1 with oneOf, anyOf, allOf
- RFC: Improved support for JSONSchema route hosting
- @Hidden not working at class level
- BUG Spec generator should ignore org.glassfish.jersey.media.multipart.MultiPart
- If a property has no annotation, but only a getter, it should be read-only.
- Distinguish between no default value specified and a default value `null` specified in the OpenAPI.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-core.