Determining the reason for a dependency

33 views
Skip to first unread message

Matt Woodyard

unread,
Mar 22, 2011, 8:22:36 AM3/22/11
to simple-b...@googlegroups.com
SBT is pulling jetty-6.1.22 jars into lib_managed - Is there a way to determine the reason for this?


matt

Mark Harrah

unread,
Mar 22, 2011, 8:44:58 AM3/22/11
to simple-b...@googlegroups.com
I assume you have declared dependencies in your project and have run
'update'. If so, sbt uses Ivy to do this. Ivy produces reports in
~/.ivy2/cache/. These are styled XML files with names like
<org>-<name>-config.xml that are viewable in a web browser. They
should be fairly thorough.

-Mark

> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> 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.
>
>

Jason Zaugg

unread,
Mar 22, 2011, 9:41:42 AM3/22/11
to simple-b...@googlegroups.com, Mark Harrah
I don't actually see these and HTML files under ~/.ivy2/cache. I'm using SBT 0.7.4 on Mac and Windows.

I'm sure I've seen them once before when troubleshooting a dependency problem, and have no idea what has changed.

Any ideas?

-jason

Mark Harrah

unread,
Mar 22, 2011, 9:56:36 AM3/22/11
to simple-b...@googlegroups.com
Not sure if this is what you are missing, but they are XML files
styled by the ivy-report.xsl stylesheet, not HTML.

-Mark

Jason Zaugg

unread,
Mar 22, 2011, 10:51:45 AM3/22/11
to simple-b...@googlegroups.com, Mark Harrah
I still don't see this. Perhaps I'm blind.

Could you post a sample of the XML, and the path relative to .ivy2 where it is written?

This problem comes up for us relatively often, and the report would be really helpful. Perhaps it warrants some documentation in the Managed Dependencies; and even an actions to show the report (launching a browser) from SBT.

-jason

Gustavo Hexsel

unread,
Mar 22, 2011, 10:55:58 AM3/22/11
to simple-b...@googlegroups.com
  Do a 

sbt clean-cache clean-lib debug update

  It will redownload the files (unfortunately) and generate the reports.  I think if the log level is not "debug" you won't see them.

     []s Gus


--

David Bernard

unread,
Mar 22, 2011, 10:58:26 AM3/22/11
to simple-b...@googlegroups.com, Jason Zaugg, Mark Harrah
Thanks for the tips.

/davidB

FYI : In some of our projects  (sub-modules) the display toke several minutes to display and freeze firefox, eat memory (the ~/.ivy2/cache/<group>-<artifactId>-<conf>.xml weight 172 Ko)

--

Mark Harrah

unread,
Mar 22, 2011, 11:20:18 AM3/22/11
to simple-b...@googlegroups.com
On 3/22/11, Gustavo Hexsel <ghe...@gmail.com> wrote:
> Do a
>
> sbt clean-cache clean-lib debug update
>
> It will redownload the files (unfortunately) and generate the reports. I
> think if the log level is not "debug" you won't see them.

I would be surprised if that is necessary. I tested adding a single
dependency to a new project, ran 'update', and I got the reports. No
'debug' or cleaning the cache needed.

-Mark

Mark Harrah

unread,
Mar 22, 2011, 11:39:06 AM3/22/11
to simple-b...@googlegroups.com
On 3/22/11, David Bernard <david.be...@gmail.com> wrote:
> Thanks for the tips.
>
> /davidB
>
> FYI : In some of our projects (sub-modules) the display toke several
> minutes to display and freeze firefox, eat memory

Right, that makes it somewhat less useful. I seem to remember an Ivy
bug/enhancement along these lines.

> (the
> ~/.ivy2/cache/<group>-<artifactId>-<conf>.xml weight 172 Ko)

Viewing the report is implemented as an XML report + XSL
transformation. I ran xsltproc on the report to directly produce the
HTML and the resulting file was about 3.5x larger than the XML file
(just as additional information).

Some options for improving the situation are:
1) modify ivy-report.xsl, perhaps splitting the information up somehow
2) write code to process the XML directly
3) XSL-FO to produce a PDF
4) write code to produce a report directly from an Ivy update report

1) could be potentially be contributed back to Ivy. 3) might be neat,
might require 1) as well.

-Mark

Reply all
Reply to author
Forward
0 new messages