jvm_binary_task: do not insert an error message as the "main" class
Review Request #1590 - Created Jan. 9, 2015 and submitted
|benjyw, jsirois, stuhood, zundel|
If no main class is specified for a JvmBinary target, pants sets the main class in the jar manifest to the string: "*** java -jar not supported, please use -cp and pick a main ***" The goal appears to be to indirectly provide an explanation to a user who tries to run the jar via `java -jar` why running the jar in that manner fails (as `java` would print out the failing "class name" which would be the message string). This behavior prevents using multiple main classes with Hadoop jars, however. If a main class is specified in a jar manifest, `hadoop jar` will use that class to the exclusion of any class name specified on the `hadoop jar` command line. `hadoop jar` only uses a main class from the command line if there is no main class specified in the jar manifest. Jars are perfectly fine without a main class specified in the jar manifest. Indeed, the docstring states this is the expected behavior.
Used this change to produce a jar file (for Hadoop consumption of course) without a main class defined in the jar manifest.