Re: [sbt] Downloading Plugin dependency via repo proxy (Artifactory) results in 'Some unresolved dependencies'

1,097 views
Skip to first unread message

Josh Suereth

unread,
Dec 17, 2012, 8:12:57 PM12/17/12
to simple-b...@googlegroups.com

The ivy pattern is missing what to do with the sbt version.   Did you follow the example on http://www.scala-sbt.org/release/docs/Detailed-Topics/Proxy-Repositories.html

That has the correct ivy pattern....

On Dec 17, 2012 8:07 PM, "Michael Franz" <mvf...@gmail.com> wrote:
Hi,

I have found a number of posts that have allowed me to get this far, but I have one problem that I cannot resolve.

I need to have all sbt dependencies (project and plugins) to be loaded through our proxy (Artifactory).  Currently using Artifactory 2.3.2 and SBT 0.12.1.

I was able to set this up by using -Dsbt.boot.properties=sbt.boot.properties when calling the sbt-launch.jar and specify both an ivy-proxy and a maven-proxy.
[repositories]
  local
  ivy-proxy: http://localhost:8081/artifactory/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]

I later added -Dsbt.override.build.repos=true to force the dependencies of any plugins I used to also go through the same proxy.  Currently the only plugin I am using is my project/plugins.sbt is 
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
For some reason this is not working.  

[warn]  module not found: com.github.mpeltonen#sbt-idea;1.2.0
[warn] ==== local: tried
[warn]   /home/user/.ivy2/local/com.github.mpeltonen/sbt-idea/scala_2.9.2/sbt_0.12/1.2.0/ivys/ivy.xml
[warn] ==== ivy-proxy: tried
[warn] ==== maven-proxy: tried
[info] Resolving org.scala-sbt#precompiled-2_10_0-m7;0.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.mpeltonen#sbt-idea;1.2.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:1.2.0 (sbtVersion=0.12, scalaVersion=2.9.2)

Artifactory lets me browse to these locations
But they are empty.

At this point, I don't know if this is an SBT issue or an Artifactory issue.  For testing purposes, I was able to configure an external http_proxy that by-passes Artifactory and heads out to http://repo1.maven.org/maven2/com/github/mpeltonen/sbt-idea_2.9.2_0.12/1.2.0/sbt-idea-1.2.0.jar just fine.

Any ideas on what I can do to resolve this issue?

As a side note, this work is part of our migration from sbt 0.7.7 to sbt 0.12.1.

Michael

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simple-build-tool/-/sxp5tD2bHqYJ.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Michael Franz

unread,
Dec 18, 2012, 11:00:04 AM12/18/12
to simple-b...@googlegroups.com
I did not follow those instructions, but had pretty much all the same setup.  What is different is the ivy config pattern.  The one I used was taken from the sbt-launch.jar sbt/sbt.boot.properties.  Does that imply the default sbt.boot.properties is incorrect?  Or that proxies require a different pattern? The 'Proxy Repository' page is very useful and wish I would have found it before I started, as I have pieced this information together from other questions and bug reports.

After following the instructions I am convinced the the problem is the pom for that project and the fact that I have Artifactory validating poms.  When I try to access via Artifactory and my browser I get the following error: 'Failed to transform pom file: The target deployment path 'com/github/mpeltonen/sbt-idea_2.9.2_0.12/1.2.0/sbt-idea-1.2.0.pom' 
does not match the POM's expected path prefix 'com/github/mpeltonen/sbt-idea/1.2.0'. Please verify your POM content for correctness and make sure the source path 
is a valid Maven repository root path.'

If I enable 'Suppress POM Consistency Checks' or my maven-central repo, I can download the plugin without issue.

So, this seems to be a poorly published plugin. 

Thanks for you help.

Michael
Reply all
Reply to author
Forward
0 new messages