Updated the basename and name of some targets to that pants goal bundle src/java:: doesn't create colliding bundles in dist/

Testing Done:
ci running @ https://travis-ci.org/pantsbuild/pants/builds/31947112

Bugs closed: 453

Reviewed at https://rbcommons.com/s/twitter/r/847/
Remove all existing cases of custom args for Task class ctors.

Tasks are instantiated in a managed way, in the execution engine.
So they must all have a set of known ctor args (currently context and workdir).

In some cases we allowed extra args, used only by tests. This change removes
those extra args and requires all Task classes to receive any extra information
via the context, even at test time.

This is for a couple of reasons:

1) Since the task cannot have extra args when run in the execution engine,
it's more realistic not to allow tests to do so.

2) We want to be able to change the Task base class's ctor args in the
future without having to modify dozens of subclasses. To do so, we'd
like to change all Task ctors to *args, **kwargs style. This change
is the first step towards that.

Note that we even disallow intermediate classes from having extra ctor args,
even if in theory that would be OK as long as all instantiable subclasses provide
those arguments. However it's simpler and more uniform, especially in the
*args, **kwargs style, not to allow this.
Conflicts:
	src/python/pants/backend/core/tasks/console_task.py
	src/python/pants/backend/core/tasks/filter.py
	src/python/pants/backend/core/tasks/listtargets.py
	src/python/pants/backend/core/tasks/what_changed.py
	src/python/pants/backend/jvm/tasks/dependencies.py
	src/python/pants/backend/jvm/tasks/ivy_resolve.py
	src/python/pants/backend/jvm/tasks/jar_publish.py
	src/python/pants/backend/jvm/tasks/jar_task.py
	src/python/pants/backend/jvm/tasks/jvm_compile/java/java_compile.py
	src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py
	src/python/pants/backend/jvm/tasks/jvm_compile/scala/scala_compile.py
	src/python/pants/backend/jvm/tasks/nailgun_task.py
	tests/python/pants_test/tasks/test_console_task.py
Dummy commit to provide message intended for previous commit.

Message for 1d68bf9d0c326883962ae8e0f05394c03682da54 should have been:

Change all Task subclass constructor args to (*args, **kwargs).

Unfortunately the message got messed up in a merge, and I only
discovered this after pushing, and didn't want to force-push a fix,
as that leads to trouble.
docs: Remove targets of the form dir/BUILD:target which cause errors

ValueError: Spec tests/java/com/pants/examples/hello/greet/BUILD:greet
has BUILD as the last path part and BUILD is reserved files

Reviewed at https://rbcommons.com/s/twitter/r/853/
Migrate some reasonable default values from pants.ini into 'defaults' in the pants source.  This covers scala-compile, jvm-compile, protobuf-gen, and a few others.

Testing Done:
CI is baking at: https://travis-ci.org/pantsbuild/pants/builds/32014416

Bugs closed: 455, 456, 458

Reviewed at https://rbcommons.com/s/twitter/r/852/
Miscellaneous fixes to protobuf codegen.

Sorted protobuf paths and resources, and handled collisions deterministically. This process generates
copious warning/error log output where appropriate, as protobuf collisions are something the user should
definitely be aware of.

The imports property of java_protobuf_library was changed slightly to not cache its list of jars if it doesn't
manage to resolve one of its targets. This solves a problem where it incorrectly saves an empty list if it's
poked before the build graph loads.

Modified the log outputs of ivy imports to be more accurate/helpful.

Reduced occurance of extraneous/incorrect 'unconsumed gen targets' warning (it still happens, not as much).

Testing Done:
Tests under pants_test/tasks:: behave the identically to their counterparts on master.

Tested successfully on many square internal projects.

Bugs closed: 376

Reviewed at https://rbcommons.com/s/twitter/r/720/
test_idea_integration.py: Fix duplicate named function

There were two test_idea_on_java_sources; rename them to be unique.

Testing Done:
PANTS_DEV=1 ./pants goal test tests/python/pants_test/tasks:idea_integration

Reviewed at https://rbcommons.com/s/twitter/r/854/
Fix up the error message when attempting to publish without any configured repos.

Reviewed at https://rbcommons.com/s/twitter/r/850
Fix bad BUILD file and failed test for AaptGen tests

This is independent of any other of my reviews currently up.

This test was broken, had been for a little while. A change broke
the test but it had an inconsistent BUILD file so that
test was never getting called by the CI.

I have a somwhat large refactor of the entire Aapt pipeline
coming up with the AaptBuild task, which I am writing tests
for now. But I wanted to get this in soon, because the this test
will fail if the user calls something like
'./pants goal test tests::', etc.

Testing Done:
Verified that all android tests are being called by CI.
CI passes.
Travis passes.

Reviewed at https://rbcommons.com/s/twitter/r/858/
Simplify MultipleRootedProducts._get_products_for_root by using setdefault

Testing Done:
./pants goal test tests/python/pants_test:all

Reviewed at https://rbcommons.com/s/twitter/r/851/
docs: Remove more references to /BUILD:target notation

Found with git grep 'BUILD:'. Other uses still exist, but they seem to be in
example output.

Reviewed at https://rbcommons.com/s/twitter/r/855/
Add DxCompile task to android backend

This task gathers the class files of a target and compiles them into a classes.dex.
Dex file is a Dalvik exeecutable file. Once the classes have been dexed, then the app
is ready to be packaged into an .apk.

The classes.dex that is created is output to
pants.d/dex/dex/target.id/classes.dex. The target.id is
simply the package name. This is done b/c every Android target that
is dexed will output a file named "classes.dex". Putting them in
dirs that are named after the target.id means that they will
not clobber each other unless the package names correspond
(which would cause other problems as well).

CLI options allow configuring of VM options and build-tools versions.

This is just the task itself, I will write the test class tomorrow. I wanted to give people
a chance to comment while I worked on them, in case large changes are needed.
If you prefer to wait for the test class, that should be up tomorrow.

Testing Done:
CI.sh passes at 67089e7
Full integration tests pass on local machine.

Travis now passes [0].

[0] https://travis-ci.org/pantsbuild/pants/jobs/31952336

Reviewed at https://rbcommons.com/s/twitter/r/840/
Add a try/raise block to catch exceptions from calling os module on None

If someone defines an Android target without specifying a 'manifest'
field in the BUILD file, they only got a cryptic error. The exception was
never called because the error came earlier, when calling os.path on a None
object. This ensures that the user sees the error message we mean them to.

I have added testing for Android targets to my TODO list.

This patch is small and shouldn't be dependent on any other open reviews.

Testing Done:
CI passes.
Did some fuzz testing manually.
Travis passes. [0]

[0] https://travis-ci.org/pantsbuild/pants/builds/32069220

Reviewed at https://rbcommons.com/s/twitter/r/860/
Remove unused invalidate_for method and unused extra_data variable.

As discussed in https://rbcommons.com/s/twitter/r/808/ we are removing the unused extra_data variable and invalidate_for.

Testing Done:
Added an integration test to ensure java compile with 6 and then 7 produces two different artifacts.

Reviewed at https://rbcommons.com/s/twitter/r/849/
Prepare for 0.0.23 release.

Testing Done:
None

Bugs closed: 469

Reviewed at https://rbcommons.com/s/twitter/r/862/
Add AaptBuild task

AaptBuild constructs the apk out of the dex file and
the targets resource dir. Refactored the Aapt pipeline,
there is now an AaptTask base class. When calling
"bundle" on Android code you should now get an
unsigned .apk as output.

This also adds an AndroidIntegrationTest base class to
simplify Android integration testing.

I moved the 'package_path' method out of codegen and into
the AaptTask because all the aapt methods needed it. If
someone thinks it is truly useful to other codegen methods
I am open to moving it higher.

Testing Done:
CI.sh passes
Travis is failing elsewhere, so no Travis info.
Unsigned apks are indeed generated :)

Reviewed at https://rbcommons.com/s/twitter/r/859/
don't hide docs for exclusives= target param in an unpublished docstring.

A blurb about how to use exclusives was hiding in the CheckExclusives goal doc. Many BUILD dictionary entries mentioned this, but weren't high-tech enough to "hyperlink" that doc.

So... move the "user-facing" exclusives doc out of tasks/check_exclusives.py into docs/build_files.rst.

in many backend/.../targets/*.py files, link to the new location.

Testing Done:
generated doc set, eyeballed

to make sure my automated comment-fixup doesn't destroy the world's syntax, kicked off https://travis-ci.org/pantsbuild/pants/builds/32287735

Bugs closed: 451

Reviewed at https://rbcommons.com/s/twitter/r/865/
Split AddressMapper out of BuildFileParser

Split caching and address mapping out of BuildFileParser and into its own class, BuildFileAddressMapper.

Move all of the BuildGraph population methods out of BuildFileParser and into BuildGraph, which delegates to its own BuildFileAddressMapper for TargetProxy (now TargetAddressable) resolution.

Generalize the notion of a TargetProxy to an Addressable.  It is now the responsibility of the BuildGraph (which has an AddressMapper) to resolve a TargetAddressable, convert it into a Target, and then traverse the transitive dependencies as necessary.

Move BuildFile caching into the BuildFile class.

Testing Done:
CI is green

Reviewed at https://rbcommons.com/s/twitter/r/584/
scm: add merge-base and origin url properties to git

catch exceptions and always remove remote in `mkremote`

Testing Done:
build passes: https://travis-ci.org/cheecheeo/pants/builds/31666560

This is necessary for a feature that will include the merge-base and repository url in pants-built artifacts.

Reviewed at https://rbcommons.com/s/twitter/r/834/