I trying to integrate Flex with Grails through BlazeDS BUT i am stuck with the very first step i.e installing BlazeDS plugin ... it fails everytime i try to install. Following is the complete stacktrace
Resolving plugin JAR dependencies ...
:: problems summary ::
:::: WARNINGS
module not found: com.adobe.flex#flex-messaging-opt;4.0.0.14931.1
==== grailsHome: tried
D:\Platforms\Grails\grails-1.3.7\lib/flex-messaging-opt-4.0.0.14931.1.xml
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
D:\Platforms\Grails\grails-1.3.7\lib/flex-messaging-opt-4.0.0.14931.1.jar
==== grailsHome: tried
D:\Platforms\Grails\grails-1.3.7\dist/flex-messaging-opt-4.0.0.14931.1.xml
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
D:\Platforms\Grails\grails-1.3.7\dist/flex-messaging-opt-4.0.0.14931.1.jar
==== grailsHome: tried
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
D:\Platforms\Grails\grails-1.3.7/plugins/grails-flex-messaging-opt-4.0.0.14931.1.jar
==== grailsCentral: tried
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://svn.codehaus.org/grails-plugins/grails-flex-messaging-opt/tags/RELEASE_4_0_0_14931_1/grails-flex-messaging-opt-4.0.0.14931.1.jar
==== grailsCore: tried
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-flex-messaging-opt/tags/RELEASE_4_0_0_14931_1/grails-flex-messaging-opt-4.0.0.14931.1.jar
==== mavenCentral: tried
http://repo1.maven.org/maven2/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://repo1.maven.org/maven2/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== ebrRelease: tried
http://repository.springsource.com/maven/bundles/release/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://repository.springsource.com/maven/bundles/release/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== ebrExternal: tried
http://repository.springsource.com/maven/bundles/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://repository.springsource.com/maven/bundles/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== http://maven.springframework.org/external: tried
http://maven.springframework.org/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://maven.springframework.org/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== http://maven.springframework.org/milestone: tried
http://maven.springframework.org/milestone/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://maven.springframework.org/milestone/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== ebrRelease: tried
http://repository.springsource.com/maven/bundles/release/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://repository.springsource.com/maven/bundles/release/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== ebrExternal: tried
http://repository.springsource.com/maven/bundles/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://repository.springsource.com/maven/bundles/external/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== http://maven.sinusgear.com/maven_repo: tried
http://maven.sinusgear.com/maven_repo/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.pom
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
http://maven.sinusgear.com/maven_repo/com/adobe/flex/flex-messaging-opt/4.0.0.14931.1/flex-messaging-opt-4.0.0.14931.1.jar
==== grailsPlugins: tried
-- artifact com.adobe.flex#flex-messaging-opt;4.0.0.14931.1!flex-messaging-opt.jar:
D:\Work\Personal\Grails\todolist/lib/flex-messaging-opt-4.0.0.14931.1.jar
C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\blazeds-2.0/lib/flex-messaging-opt-4.0.0.14931.1.jar
C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\hibernate-1.3.7/lib/flex-messaging-opt-4.0.0.14931.1.jar
C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\spring-security-acl-1.1/lib/flex-messaging-opt-4.0.0.14931.1.jar
C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\spring-security-core-1.2.1/lib/flex-messaging-opt-4.0.0.14931.1.jar
C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\tomcat-1.3.7/lib/flex-messaging-opt-4.0.0.14931.1.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: com.adobe.flex#flex-messaging-opt;4.0.0.14931.1: not found
::::::::::::::::::::::::::::::::::::::::::::::
[delete] Deleting directory C:\Users\Akeel\.grails\1.3.7\projects\todolist\plugins\spring-security-core-1.2.1
Failed to install plugin [blazeds-2.0]. Plugin has missing JAR dependencies.
I would really appreciate if someone could help me resolving this issue. Thanks
I have faced same problem recently on grails 1.3.7. By somehow this problem was reproduced only in Windows but not in Ubuntu. So i just copy ivy cache from Ubuntu to Windows and now it's ok. I don't know can I place this jars on the internet, so anyway you can manually download them from some maven or ivy repository.
Add the following line to the repositories section of your BuildConfig.groovy file:
mavenRepo "https://src.springsource.org/svn/spring-flex/tags/spring-flex-1.5.0.RELEASE/local-repo/"
Adapted from this other SO question.
It is Windows' problem. It looks like a corrupt ivy cache. Just delete ivy-cache folder in .grails. For Windows 7, it's: C:\Users[USER NAME].grails\ivy-cache.
It will be regenerated when you use grails command. Hope it helps.
Related
I have an SBT project with following resolvers definition:
resolvers += Resolver.mavenLocal
resolvers += Resolver.url("my-release", url("https://myrepo.net/artifactory/libs-release"))
resolvers += Resolver.url("my-snapshot", url("https://myrepo.net/artifactory/libs-snapshot-local"))
(I changed my company's repo URLs).
SBT 0.13.9 was able to resolve my company's artifacts from the specified repositories (including maven local), but when I try to upgrade to 1.1.2, it seems to only resolve the artifacts that are already downloaded to local ivy cache. New artifacts are not found. Here's a part of the output from running sbt update command:
[warn] module not found: com.mycompany.artifact#my-artifact;1.2.3
[warn] ==== local: tried
[warn] ==== public: tried
[warn] ==== local-preloaded-ivy: tried
[warn] ==== local-preloaded: tried
[warn] ==== Maven2 Local: tried
[warn] ==== my-release: tried
[warn] ==== my-snapshot: tried
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.mycompany.artifact#my-artifact;1.2.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
So it seems to check my repos, but still fails to find the artifact.
What I can do as a workaround is to rollback to SBT 0.13, build a project at least once (0.13 will add the missing artifact to ivy cache), and then change the version back to 1.1.2.
UPDATE: It looks that for maven repositories you need to use at instead of Resolver.url:
resolvers += "my-release" at "https://myrepo.net/artifactory/libs-release"
resolvers += "my-snapshot" at "https://myrepo.net/artifactory/libs-snapshot-local"
This way it works properly.
It looks that for maven repositories you need to use at instead of Resolver.url:
resolvers += "my-release" at "https://myrepo.net/artifactory/libs-release"
resolvers += "my-snapshot" at "https://myrepo.net/artifactory/libs-snapshot-local"
This way it works properly.
I am trying to publish an sbt plugin to a local file repo. In the plugin's build.sbt I have:
publishTo := Some(Resolver.file("localtrix", file("/Users/jast/repo/localtrix")))
I run the publish task and it gets published fine to
/Users/jast/repo/localtrix/org/me/sbt-plugin_2.12_1.0/1.2.3
In another project, I want to resolve this plugin. in project/plugins.sbt I have:
resolvers += Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))
addSbtPlugin("org.me" % "sbt-plugin" % "1.2.3")
I try to run sbt in the this project and I get:
[info] Updating ProjectRef(uri("file:/Users/jast/playspace/untitled38/project/"), "untitled38-build")...
[warn] module not found: org.me#sbt-plugin;1.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/org.me/sbt-plugin/scala_2.12/sbt_1.0/1.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.me/sbt-plugin/scala_2.12/sbt_1.0/1.2.3/ivys/ivy.xml/2017.2+4-3037ba82+20180314-1919/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/jast/.ivy2/local/org.me/sbt-plugin/scala_2.12/sbt_1.0/1.2.3/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/me/sbt-plugin_2.12_1.0/1.2.3/sbt-plugin-1.2.3.pom
[warn] ==== local-preloaded-ivy: tried
[warn] /Users/jast/.sbt/preloaded/org.me/sbt-plugin/scala_2.12/sbt_1.0/1.2.3/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////Users/jast/.sbt/preloaded/org/me/sbt-plugin_2.12_1.0/1.2.3/sbt-plugin-1.2.3.pom
[warn] ==== localtrix: tried
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.me#sbt-plugin;1.2.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
So how can I publish to a local repo it in a way that also gets resolved correctly?
Note: publishLocal and resolving from .ivy2/local works, but I want to be able to publish to a repo that I can copy to another machine without messing with that directory.
sbt plugins by default are published ivy-style, so you when you refer to your local repository, use Resolver.ivyStylePatterns. To publish:
publishTo := Some(Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))(Resolver.ivyStylePatterns))
And to resolve:
resolvers += Resolver.file("localtrix", file("/Users/jast/repo/localtrix"))(Resolver.ivyStylePatterns)
addSbtPlugin("org.me" % "sbt-plugin" % "1.2.3")
Alternatively you can set publishMavenStyle := true for the plugin, but I see that you already figured that out.
You missed scala version in name. And you have also strange suffix in plugin name _1.0 in your published artifact, so just fixing scala version could be not enough.
This should work.
addSbtPlugin("org.me" % "sbt-plugin_2.12_1.0" % "1.2.3")
If you find out where came this suffix _1.0 from, fix on scala version should help:
addSbtPlugin("org.me" %% "sbt-plugin" % "1.2.3")
Update after comment
Ok, thanks, I did not know that for plugins it works differently.
But try to define resolver differently for resolvers (works for me):
resolvers += "localtrix" at "file:///Users/jast/repo/localtrix"
addSbtPlugin("org.me" % "sbt-plugin" % "1.2.3")
I am converting our mixed build environment into an sbt based ecosystem. And I am at a bit of a road block with this issue.
I have deployed a library to a remote repository via sftp but when I try to load it as a dependency I have an issue.
In build.sbt I have:
resolvers += {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.sftp("MY REPO", "aHost", "/repoBase/") as ("aUser", privateKeyFile)
}
update in interactive shows:
[info] Resolving com.test.it.out#myLib_2.11;1.0 ...
[warn] module not found: com.test.it.out#myLib_2.11;1.0
[warn] ==== local: tried
[warn] /home/bday/.ivy2/local/com.test.it.out#myLib_2.11/1.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com.test.it.out#myLib_2.11/1.0/jsshfs_2.11-1.0.pom
[warn] ==== MY REPO: tried
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
It never lists any path information for MY REPO.
I have tried multiple ways to configure the resolver, even users/hosts that should fail and the results don't change.
show resolvers
[info] List(SftpRepository(MY REPO,SshConnection(Some(KeyFileAuthentication(aUser,/home/aUser/.ssh/id_rsa,None)),Some(aHost),None),Patterns(ivyPatterns=List(), artifactPatterns=List(/repoBase/[organisation]/module(_[sbtVersion])/[revision]/[artifact]-revision.[ext]), isMavenCompatible=true, descriptorOptional=false, skipConsistencyCheck=false)))
I did see someone had the same issue and said switching from SSH to SFTP fixed it, in 12.?. I am using 13.7
I have come to the end of the internet on this one, please extends it a bit.
Thanks!
I had the similar issue, it was not listing any urls that it tried. I added the same Pattern that I was using while publishing, and it fixed the problem. Also, I have put my resolver as the first one in the order.
resolvers in ThisBuild := (Resolver.sftp("MY Repo", "example.com", 22, "sbt-repos/releases")(Patterns("[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[type]s/[artifact](-[classifier]).[ext]"))) +: resolvers.value
I am using 0.13.9. I searched a lot for this one and finally figured it out after so many trials. Hope this will help somebody.
val sftpRes = {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.sftp("REPO", "gitHost", "/path/to/data/")(Resolver.ivyStylePatterns) as ("user", privateKeyFile)
}
publishMavenStyle := false
publishTo := Some(sftpRes)
Using SBT 1.2.4
In the end this is what I got to work. I tried Resolver.mavenStylePatterns, but in that case as with others SBT never really tries to find files on the resolver.
Using Ivy patterns on the publish and resolve worked for me.
I have the following definition in my build.sbt:
libraryDependencies += "com.bubblefoundry" %% "something" % "0.1-SNAPSHOT"
resolvers += {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.ssh("Bubble Foundry", "bubblefoundry.com", "/usr/local/repository/") as ("peter", privateKeyFile) withPermissions("0644")
}
When sbt tries to resolve the dependency, it fails:
[info] Resolving com.bubblefoundry#something_2.10;0.1-SNAPSHOT ...
[warn] module not found: com.bubblefoundry#something_2.10;0.1-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/peter/.ivy2/local/com.bubblefoundry/something_2.10/0.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== Bubble Foundry: tried
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com.bubblefoundry/something_2.10/0.1-SNAPSHOT/something_2.10-0.1-SNAPSHOT.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.bubblefoundry#something_2.10;0.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
It appears like it didn't even connect to the server to look for the dependency. Why is that? Am I doing something wrong?
The dependency has been published (using the same resolver definition) to /usr/local/repository/com/bubblefoundry/...
After updating to sbt 0.13, I can use my private repo by adding the following line to build.sbt
resolvers += Resolver.ssh("Company Maven Repo", "git#github.com:company/company-repo.git", "/raw/master")
A dialog pops up asking for my github username and password
It's a bug!
For example I am using github to host a private/internal maven repo accessed via SSH. I can pull artifacts without any difficultly when using Maven/POM files as you'd expect.
But can't get SBT (0.12.2) to work. Most frustratingly it just says
== REPO_NAME: tried
Even if I specify invalid authentication or give a bad ssh url it does the same i.e. there is no error reporting.
Spent a few hours researching and trying combinations to no avail. Therefore I suggest SSH repos don't work properly.
I found a solution: switch from ssh to sftp:
resolvers += {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.sftp("Bubble Foundry", "bubblefoundry.com", "/usr/local/repository/") as ("peter", privateKeyFile)
}
I am creating a Scala project with sbt 0.11.2 and sbt-idea and I am getting UNRESOLVED DEPENDENCIES on the gen-idea task.
I've just installed sbt (downloaded jar and made script as instructed in the wiki), followed the sbt-idea setup here, made an empty directory for my project, and run sbt and then run the gen-idea task.
It can't find the dependency because it only uses the built-in repos. How do I tell sbt to check another repo?
When I place the build.sbt file in the plugins dir and run sbt it starts resolving things, one of which is Resolving com.github.mpeltonen#sbt-idea;0.11.0 ...
Later in the process it downloads it successfully:
[info] downloading http://mpeltonen.github.com/maven/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.jar ...
[info] [SUCCESSFUL ] com.github.mpeltonen#sbt-idea;0.11.0!sbt-idea.jar (592ms)
When I run the gen-idea task, things look good at first...
> gen-idea
[info] Trying to create an Idea module default-b91f2c
It moves on to creating .idea directories and such, which seem to be created just fine. It then starts resolving things again (scala tools, sbt, commens-*, etc)
Eventually it tries to resolve sbt-idea:
[warn] module not found: com.github.mpeltonen#sbt-idea;0.11.0
[warn] ==== local: tried
[warn] /home/scaladev/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.9.1/sbt_0.11.2/0.11.0/ivys/ivy.xml
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/com.github.mpeltonen/sbt-idea/0.11.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn] http://scala-tools.org/repo-releases/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[warn] ==== Scala-Tools Maven2 Snapshots Repository: tried
[warn] http://scala-tools.org/repo-snapshots/com/github/mpeltonen/sbt-idea_2.9.1_0.11.2/0.11.0/sbt-idea-0.11.0.pom
[info] Resolving commons-io#commons-io;2.0.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.mpeltonen#sbt-idea;0.11.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.github.mpeltonen:sbt-idea:0.11.0 (sbtVersion=0.11.2, scalaVersion=2.9.1)
[warn]
I understand that it wouldn't find it at those locations, but I don't understand why it didn't try the github repo, as it did when configuring the plugin. I was expecting to see a line looking something like this:
[warn] ==== sbt-idea-repo: tried
gen-idea plugin for sbt 0.11.2 has not yet been published but 0.11.1-SNAPSHOT version should work as expected :
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.1-SNAPSHOT")
This is documented in the sbt-idea README file here. Specifically:
Add the following lines to ~/.sbt/plugins/build.sbt or PROJECT_DIR/project/plugins.sbt
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "0.11.0")
NOTE: If you experience problems with sbt 0.11 installation, see this.