Fix order-dependent force handling: if a version is forced in one place, it is forced everywhere.  Two JarLibraries might compare equal even though their force setting is different; we want force to be dominant.

Reviewed at https://rbcommons.com/s/twitter/r/1085/
Support old-style flags even in the new flag system.

E.g., --compile-java-foo-bar anywhere on the cmd-line is the same
as ./pants compile.java --foo-bar.

This will make migration easier, as people are used to the old style,
and we may even want to keep this forever, if some users prefer
the verbose flags.

Testing Done:
Ran all the tests.

Reviewed at https://rbcommons.com/s/twitter/r/1093/
Tiny tweak to legacy option printing.

Also rewrote some comments for clarity.

Reviewed at https://rbcommons.com/s/twitter/r/1094/
Allow a task type know its own options scope.

E.g., JavaCompile should know that its options are under compile.java.

Also fix some stale comments from the goal->task terminology change.

Testing Done:
Ran all the tests. Tested that this works when registering options in the new style (will be sent for review in a future change).

Reviewed at https://rbcommons.com/s/twitter/r/1095/
Merge branch 'master' into sitegen_better
Hook new-style registration up to the goal runner.

Provides appropriate special-casing for GroupTask.

Note: relies on https://rbcommons.com/s/twitter/r/1095/.

Testing Done:
Ran all tests. Manually tested new-style registration on top of this.

Reviewed at https://rbcommons.com/s/twitter/r/1096/
Add missing BUILD dep.
Switch a handful of flags over to the new registration style.

This includes a superclass-subclass scenario (ConsoleTask-ListGoals)
and a GroupTask scenario (JvmCompile).

Note that the code that reads and uses the flags needn't change yet.
The legacy flags layer places the values in the existing destinations.

Note: Relies on https://rbcommons.com/s/twitter/r/1096/.

Once this is in I will write up a quick guide to porting flags,
and then we can set ourselves loose on them!

Testing Done:
Ran all tests. Manually ran the relevant pants goals with various flag settings.

Reviewed at https://rbcommons.com/s/twitter/r/1097/
Patch code review comment fixes back in.

They got lost due to my misuse of ./rbt.
maybe that internal_backend vs builddict stuff should be in another branch
kick build dictionary out of the docsite for now.

It's choking now; https://rbcommons.com/s/twitter/r/1101/ or
something like it should fix that.
our example repositories snuck into the build dictionary.

Our internal_backend/repositories defines a couple of example repositories that our BUILD files can refer to.

Our BUILD Dictionary builder code looks at symbols defined in our BUILD files to figure out what do doc in http://pantsbuild.github.io/build_dictionary.html

So...

Give our old @manual.builddict() decorator a new optional arg, suppress.

Mark those example repositories with manual.builddict(suppress=True)

BUILD Dictionary builder checks for suppress==True and omits those

Testing Done:
publish_docs.sh , eyeballed

https://travis-ci.org/pantsbuild/pants/builds/36815549

Reviewed at https://rbcommons.com/s/twitter/r/1101/
Merge branch 'master' into sitegen_better
bring the bdict back in
those prints were helpful, but not anymore
Protobuf and payload cleanups

Moved some of the protobuf examples around to be more consistent.
Some cleanups from payload refactoring
Added a deprecation message for the unused 'buildflags' attribute in java_protobuf_library
Removed the ability to use a jar_dependency in java_protobuf_library imports.

Testing Done:
CI is green.
Added a unit test for the java_protobuf_library target

Bugs closed: 623

Reviewed at https://rbcommons.com/s/twitter/r/1099/
Adding a list of dirs to exclude from the '::' scan.  The CmdLineSpecParser

By default passes along the workdir as the one dir to exclude.
You can add more directories relative to the build root using 'spec_excludes' in pants.ini

Testing Done:
ci is green.

I also created a bogus BUILD file under .pants.d and ran build-support/bin/ci.sh locally and the tests still passed.

Bugs closed: 618, 621

Reviewed at https://rbcommons.com/s/twitter/r/1091/
'goal builddict' : generate .rst and .html, not just .rst

before: running 'goal builddict' generates a couple of .rst files which we then give to Sphinx

after: running 'goal builddict' generates those .rst files but also a couple of .html files which we then give to sitegen.

If/when sitegen's in good shape, it'd be good to get rid of the .rst-generating part.

Most of this change is in src/python/pants/backend/core/tasks/builddictionary.py , plus new html templates.

There are also changes to some docstrings:

I replaced some sphinx-rst-isms with docutil-rst-isms (which also work with Sphinx).

And I replaced some lost docstrings which I removed with the "inherit docstrings" change because I "knew" they'd be inherited from a superclass.

And added some docstrings which have been missing for a while which I noticed because increased scrutiny grrrrr.

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/36888156

Running sphinx on the generated .rst files now generates warnings :-(
I poked around 'em for a while, but eventually gave up.

Bugs closed: 529

Reviewed at https://rbcommons.com/s/twitter/r/1079/
Plumb new-style options into the Context.

Allows code to reference option values the new way.

Renamed the overloaded self.options in Command to self.old_options/self.new_options,
to avoid confusion. Previously these collided and the only reason it worked was that
self.options happened to be reset to the right one just before using it.

Change a single flag reference to use the new path, as proof that it works.

With this change we can not only register flags the new way but also reference the option
values the new way. Once everything is ported to use these, we can switch the parser to
the new one, and the transition will be complete.

Testing Done:
ci baking.

Reviewed at https://rbcommons.com/s/twitter/r/1102/
Merge remote-tracking branch 'pantsbuild/master'

Conflicts:
	src/python/pants/goal/context.py