I have an artefact (com.test#verifier;1.1), that I deploy on a repository called libs-release-local. This repo has as Virtual Repository Association, amongst others one called libs-release (this is from what I understood a default one given by Artifactory).
In my project I have in the ivy-settings.xml the following
<resolvers>
<chain name="main">
<url name="artifactory" m2compatible="false">
<artifact
pattern="${ivy.artifactory.server}/${ivy.repo}/${ivy.default.artifact.pattern}" />
<ivy
pattern="${ivy.artifactory.server}/${ivy.repo}/${ivy.default.ivy.pattern}" />
</url>
<ibiblio name="public" m2compatible="true"
root="http://artifactory:9090/artifactory/libs-release" />
</chain>
When fetching the artefact, it fails though with
[ivy:retrieve] module not found: com.test#verifier;1.1
[ivy:retrieve] ==== artifactory: tried
[ivy:retrieve] http://artifactory:9090/artifactory/unstable/com.test/verifier/1.1/ivys/ivy-1.1.xml
[ivy:retrieve] -- artifact com.test#verifier;1.1!verifier.jar:
[ivy:retrieve] http://artifactory:9090/artifactory/unstable/com.test/verifier/1.1/jars/verifier-1.1.jar
[ivy:retrieve] ==== public: tried
[ivy:retrieve] http://artifactory:9090/artifactory/libs-release/com/test/verifier/1.1/verifier-1.1.pom
[ivy:retrieve] -- artifact com.test#verifier;1.1!verifier.jar:
[ivy:retrieve] http://artifactory:9090/artifactory/libs-release/com/test/verifier/1.1/verifier-1.1.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: com.test#verifier;1.1: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
Apparently my assumption is false, when I deploy to libs-release-local, it is also accessible via libs-release.
What do I need to do, that with the given ivy-settings, I do receive the dependency ?
Based on the provided request trace, the issue is with include/exclude patterns configured for the libs-release repository:
2017-05-30T09:33:57.915+02:00 Adding no aggregated repositories - requested artifact is rejected by the include exclude patterns of 'libs-release'
You should take a look at the libs-release repository configuration and check which pattern(s) is causing the file download to be rejected.
Related
When setting up a sbt project with a local artifactory / maven proxy I see the following message:
In order to specify that all resolvers added in the sbt project should
be ignored in favor of those configured in the repositories
configuration, add the following configuration option to the sbt
launcher script:
-Dsbt.override.build.repos=true
Add the following to your build.sbt file:
resolvers +=
"Artifactory" at "http://url/artifactory/virtualRepository/"
But what I would like to achieve is a behaviour similar to maven i.e. not manually overriding resolvers in the SBT file, but rather via the configuration.
Is this possible as well? If yes how?
Desired behaviour
the project should compile fine without local artifactory proxy
when available / configured in repositories the local one should be used as the source / cache for quicker access
currently, I only get unresolved dependencies for sbt plugins:
::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scalariform#sbt-scalariform;1.6.0: not found
[warn] :: org.scoverage#sbt-scoverage;1.5.0: not found
[warn] :: org.scalastyle#scalastyle-sbt-plugin;0.8.0: not found
[warn] :: net.virtual-void#sbt-dependency-graph;0.8.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
With warnings of
[warn] module not found: org.scalariform#sbt-scalariform;1.6.0
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/org.scalariform/sbt-scalariform/scala_2.10/sbt_0.13/1.6.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scalariform/sbt-scalariform/scala_2.10/sbt_0.13/1.6.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] d:\users\heilerg\.ivy2\local\org.scalariform\sbt-scalariform\scala_2.10\sbt_0.13\1.6.0\ivys\ivy.xml
[warn] ==== my-ivy-proxy-releases: tried
[warn] http://url/artifactory/virtualRepositoryScala/org.scalariform/sbt-scalariform/scala_2.10/sbt_0.13/1.6.0/ivys/ivy.xml
[warn] ==== my-maven-proxy-releases: tried
[warn] http://url/artifactory/virtualRepositoryScala/org/scalariform/sbt-scalariform_2.10_0.13/1.6.0/sbt-scalariform-1.6.0.pom
[warn] ==== Artima Maven Repository: tried
[warn] http://repo.artima.com/releases/org/scalariform/sbt-scalariform_2.10_0.13/1.6.0/sbt-scalariform-1.6.0.pom
[info] Resolving org.scoverage#sbt-scoverage;1.5.0 ...
and SBT logs will show
[ERROR] (o.a.r.RemoteRepoBase:766) - IO error while trying to download resource 'repo1:org/scalariform/sbt-scalariform_2.10_0.13/1.6.0/sbt-scalariform-1.6.0.pom': org.artifactory.api.repo.exception.maven.BadPomException: The target deployment path 'org/scalariform/sbt-scalariform_2.10_0.13/1.6.0/sbt-scalariform-1.6.0.pom' does not match the POM's expected path prefix 'org/scalariform/sbt-scalariform/1.6.0'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.
Somewhere people mention to use the following option in Artifactory to "suppress POM consistency checks", but in the current version of artifactory I can not finde such an option.
edit
I can see only these options
As answered in the comment, a common workaround is "Suppress POM Consistency Checks" - Advanced Settings.
If that is not desirable, another method might be to re-publish the plugin with a valid POM. I've written POM consistency for sbt plugins to show that can be done.
// set some unique postfix
ThisBuild / version := "0.15.0-Pets1"
lazy val root = (project in file("."))
.enablePlugins(SbtPlugin)
.settings(
name := "sbt-assembly",
....
publishMavenStyle := true,
// add this
pomConsistency2021DraftSettings,
)
// Add the following
lazy val pomConsistency2021Draft = settingKey[Boolean]("experimental")
/**
* this is an unofficial experiment to re-publish plugins with better Maven compatibility
*/
def pomConsistency2021DraftSettings: Seq[Setting[_]] = Seq(
pomConsistency2021Draft := Set("true", "1")(sys.env.get("POM_CONSISTENCY").getOrElse("false")),
moduleName := {
if (pomConsistency2021Draft.value)
sbtPluginModuleName2021Draft(moduleName.value,
(pluginCrossBuild / sbtBinaryVersion).value)
else moduleName.value
},
projectID := {
if (pomConsistency2021Draft.value) sbtPluginExtra2021Draft(projectID.value)
else projectID.value
},
)
def sbtPluginModuleName2021Draft(n: String, sbtV: String): String =
s"""${n}_sbt${if (sbtV == "1.0") "1" else if (sbtV == "2.0") "2" else sbtV}"""
def sbtPluginExtra2021Draft(m: ModuleID): ModuleID =
m.withExtraAttributes(Map.empty)
.withCrossVersion(CrossVersion.binary)
I created a reproducible example about a problem I'm experiencing with SBT plugin resolution:
https://github.com/NicolasRouquette/sbt.problem.example
This example has two SBT projects:
test.plugin a simple SBT plugin
test.app a simple SBT project that uses the test.plugin
There is also a local Maven repository to which the test.plugin is published with a POM file that includes properties like this:
<properties>
<git.branch>master</git.branch>
<git.commit>fe2dc11d6fbb85c5ce0e83b031bbd425997bbd59</git.commit>
<git.tags></git.tags>
</properties>
<properties>
<scalaVersion>2.10</scalaVersion>
<sbtVersion>0.13</sbtVersion>
<extraDependencyAttributes xml:space="preserve">+e:sbtVersion:###:+0.13:###:+module:###:+sbt-license plugin:###:+e:scalaVersion:###:+2.10:###:+organisation:###:+com.banno:###:+branch:###:+##:NULL:##:###:+revision:###:+0.1.5:###:
+e:sbtVersion:###:+0.13:###:+module:###:+sbt-license-report:###:+e:scalaVersion:###:+2.10:###:+organisation:###:+com.typesafe.sbt:###:+branch:###:+##:NULL:##:###:+revision:###:+1.0.0:###:
+e:sbtVersion:###:+0.13:###:+module:###:+sbt-git:###:+e:scalaVersion:###:+2.10:###:+organisation:###:+com.typesafe.sbt:###:+branch:###:+##:NULL:##:###:+revision:###:+0.8.5:###:
+e:sbtVersion:###:+0.13:###:+module:###:+aether-deploy:###:+e:scalaVersion:###:+2.10:###:+organisation:###:+no.arktekk.sbt:###:+branch:###:+##:NULL:##:###:+revision:###:+0.16:###:
</extraDependencyAttributes>
</properties>
I can't run SBT on test.app because SBT fails to resolve the test.plugin:
addSbtPlugin("org.test" % "test-plugin" % "1.0")
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.test#test-plugin;1.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.test:test-plugin:1.0 (sbtVersion=0.13, scalaVersion=2.10)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.test:test-plugin:1.0 (sbtVersion=0.13, scalaVersion=2.10) (/opt/local/imce/users/nfr/github.imce/example/test.app/project/plugins.sbt#L6-7)
[warn] +- default:test-app-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10)
sbt.ResolveException: unresolved dependency: org.test#test-plugin;1.0: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:294)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:155)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:132)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
...
Based on trying to understand what's going on with the debugger, I get the impression that:
resolving plugins happens very early when running SBT; which means that it involves a lot of SBT/Ivy machinery
I don't quite understand how the SBT/Ivy machinery resolves SBT plugins published to a Maven repository (though I've seen some kind of Maven/Ivy conversion somewhere)
it seems that the Maven POM properties are not analyzed to retrieve the sbtVersion (e.g. 0.13) and scalaBinaryVersion (e.g. 2.10) of an artifact
Can someone confirm/correct my analysis?
Is there a way to make this maven-published plugin dependency lookup work?
Thanks for the repro project.
First issue is that you have two <properties> element. sbt will use both the URL layout and the content of the POM to resolve the plugin. Here's how to merge <properties> element. Not sure if there's more elegant way:
makePom := {
val old = makePom.value
val pom = xml.XML.loadFile(old)
val additionalProperties =
(<git.branch>{git.gitCurrentBranch.value}</git.branch>
<git.commit>{git.gitHeadCommit.value.getOrElse("N/A")+(if (git.gitUncommittedChanges.value) "-SNAPSHOT" else "")}</git.commit>
<git.tags>{git.gitCurrentTags.value}</git.tags>)
val newPom = pom.copy(child = pom.child.toSeq map {
case elem: xml.Elem if elem.label == "properties" =>
elem.copy(child = elem.child ++ additionalProperties)
case x => x
})
xml.XML.save(old.toString, newPom, enc = "UTF-8", xmlDecl = true)
old
}
Next, you should've seen something like this when you tried to resolve the plugin:
[warn] ==== Local Test: tried
[warn] file:/xxx/sbt.problem.example/test.app/project/../local.repo/org/test/test-plugin_2.10_0.13/1.0/test-plugin-1.0.pom
See that test.app/project/../local.repo/ would become test.app/local.repo. Instead of ".." here's what you can do in test.app/project/plugins.sbt:
resolvers += new MavenCache("Local Test", baseDirectory.value.getParentFile.getParentFile / "local.repo")
addSbtPlugin("org.test" % "test-plugin" % "1.0")
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.
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.
I have defined several additional resolvers, which are displayed by resolvers:
[clearspan]> show resolvers
[info] List(bt: http://maven.[redacted].com/artifactory/repo/, Local Maven Repository: file:///home/dan/.m2/repository, Oracle: http://download.java.net/maven/2, localMaven: file:///home/dan/.m2/repository)
However, when I run update, it only tries Maven Central. Any idea why?
> update
[info] Updating {file:/home/dan/l/clearspan/}cs-trading-processor...
[warn] [NOT FOUND ] javax.resource#connector;1.0!connector.jar (44ms)
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/javax/resource/connector/1.0/connector-1.0.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: javax.resource#connector;1.0!connector.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn] [NOT FOUND ] javax.resource#connector;1.0!connector.jar (44ms)
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/javax/resource/connector/1.0/connector-1.0.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: javax.resource#connector;1.0!connector.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] {file:/home/dan/l/[redacted]/}[redacted]/*:update: sbt.ResolveException: download failed: javax.resource#connector;1.0!connector.jar
[error] Total time: 2 s, completed Sep 7, 2011 4:51:11 PM
According to the documentation Library dependencies section Resolvers:
Not all packages live on the same server; sbt uses the standard Maven2
repository by default. If your dependency isn’t on one of the default
repositories, you’ll have to add a resolver to help Ivy find it.
You can do it using resolvers setting:
resolvers += name at location
You did it and it didn't work.
In Overriding default resolvers you can read:
resolvers does not contain the default resolvers; only additional ones
added by your build definition.
sbt combines resolvers with some default repositories to form
externalResolvers.
Therefore, to change or remove the default resolvers, you would need
to override externalResolvers instead of resolvers.
In your answer you said using externalResolvers helped, but I doubt that (sorry).
I think the issue was where you defined the new resolvers. It appears that the resolvers come from the top-level project while you may have been using multi-project build and the resolvers setting didn't get picked up.
I think a solution is to define the resolvers setting for the build in general using in ThisBuild or in [projectName] for a given project with projectName replaced with the proper project name the value of the setting should be set to.
I should have been setting externalResolvers instead.