pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.2k stars 619 forks source link

sample code: jvm bundled files, resources #110

Closed lahosken closed 10 years ago

lahosken commented 10 years ago

The java "hello world" app uses a bundled file to configure log4j.

It'd be better to put it that config in a resources, as noted in a review https://rbcommons.com/s/twitter/r/273/:

Just noticing this now - happy to see a "fix" in a different RB - but typically we'd ask a Tweep to:
1.) put this in the same dir, but in the src/resources tree
2.) depend on it via a resources=pants(...) and a new resources target in the src/resources tree
3.) run with -Dlog4j.configuration=/com/pants/examples/hello/main/config/log4j.properties

This would be good: better code is better; also, the app doesn't demonstrate resources yet. They're kind of a big deal.

This would be worse: it's nice that the app demonstrates bundled files.

So... figure out some excuse to shoehorn a bundled file into the code and use it.

lahosken commented 10 years ago

this is in