sample: Java Hello World += 3rdparty:log4j , jvm_app.bundles

Review Request #245 — Created April 17, 2014 and submitted

lahosken
pants
pants-reviews
benjyw
Gave the "hello world" Java a 3rdparty dependency. Chose log4j. (Benjy had suggested util-core, but I chickened out of telling folks to look at Scala. I can nerve myself up, tho.) 

Added a "bundles" to hold a log4j.properties file. (I dunno if "bundles" belongs in "hello world"; it makes things more complex, that's for sure. I figure we're eventually gonna want a bundles example in some sample code or other. If it's silly to have it here, I can kick it out.)
$ ./pants goal bundle src/java/com/pants/examples/hello/main
...
15:06:42 00:00     [dup]
                   
                    ===== For target JvmBinary(src/java/com/pants/examples/hello/main/BUILD:main-bin):
                   Duplicate classes and/or resources detected in artifacts: (u'javax.activation-activation-1.1.jar', u'javax.mail-mail-1.4.jar')
                        META-INF/LICENSE.txt
...
$ cd dist/main-bundle/
$ java -jar main-bin.jar 
15:08:16 INFO : Hello, world!
$

I suspect I shouldn't worry about the dup META-INF/LICENSE.txt.
But if there's some 3rdparty/BUILD magic to dispel it, I'd love to know.
BE
  1. Thanks for the change.
  2. Actually I like having a bundles example here, so log4j is a better idea than util-core.
  3. 
      
LA
Review request changed

Status: Closed (submitted)

Loading...