Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Support for flat-file output (like CSV) #69

Open
joescii opened this issue Mar 30, 2015 · 6 comments
Open

Support for flat-file output (like CSV) #69

joescii opened this issue Mar 30, 2015 · 6 comments

Comments

@joescii
Copy link

joescii commented Mar 30, 2015

Firstly, thanks for providing this excellent plugin for the community! My team uses it regularly to comply with our legal department's policy to keep a record of all OSS libraries used in production. It would be much more conducive to our use case if we could output this into a flat comma-delimited format. I plan to write this myself soon, but I would like to contribute to this project if you feel it fits appropriately.

The biggest problem we have is the ability to perform a diff on the output over time. The dependency-tree's order gets a little shuffled when dependencies change. What I would rather is a csv file that is either sorted, or could easily be sorted to provide a consistent order. Furthermore, the document we record our dependencies itself is a spreadsheet, so a CSV file is rather appropriate.

What do you think? Something valuable for sbt-dependency-graph? Or is this readily achievable in one of the other formats?

Thanks for your time,
Joe

@hochgi
Copy link

hochgi commented Mar 30, 2015

@joescii if I understand you correctly, you don't need this (excelent) plugin.
e.g. use fullClasspath. a hacky solution to what you want can be:

sbt "show fullClasspath" | sed s/List\(Attributed\(/\\n/g | sed s/\)\)//g | sed s/\),\ Attributed\(/\\n/g | sed '/\[[.]*/d' | sort

(I'm not that good with sed, perhaps someone better can write it more concise)

a better way would be to write a custom task to do that.

@joescii
Copy link
Author

joescii commented Mar 31, 2015

@hochgi I didn't know about that key. I'll write my own tiny plugin for doing that. Thanks for the tip!

@joescii joescii closed this as completed Mar 31, 2015
@hochgi
Copy link

hochgi commented Mar 31, 2015

np. also, if you realy want just the 3rd party dependencies, you can use dependencyClasspath instead of fullClasspath

@jrudolph jrudolph reopened this Apr 1, 2015
@jrudolph
Copy link
Member

jrudolph commented Apr 1, 2015

I find this feature useful, however, I won't have time to work on this right now. The advantage of implementing it here would be that you also have access to all the data in the pom, so you could include license or homepage data in the output.

@hochgi
Copy link

hochgi commented Apr 1, 2015

@jrudolph take a look at @ashwanthkumar fork. I think he already did that: https://github.com/ashwanthkumar/sbt-dependency-graph

@joescii
Copy link
Author

joescii commented Apr 2, 2015

Thanks @jrudolph. No need to worry about spending your time. This is something our team needs to do in the next week or so. I'm just looking for a good home for our work.

@hochgi I took a quick glance at @ashwanthkumar's fork, and it looks promising. Thanks!

@jrudolph jrudolph changed the title Support for flat-file output Support for flat-file output (like CSV) Nov 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants