Remove artifacts from JarDependency; Kill IvyArtifact.

Review Request #2858 - Created Sept. 22, 2015 and submitted

Information
John Sirois
pants
jsirois/release/remove_deprecations
1410, 2235
ba8a892...
Reviewers
pants-reviews
areitz, gmalmquist, kwlzn, mateor, nhoward_tw, patricklaw, tejal, zundel
The `IvyArtifact` and its collection inside `JarDependency` objects is
killed in favor of declaring 1 jar dependency per needed artifact.  This
was already the way to declare custom classifier dependencies, but the
vestigal artifacts system was engaged prior to this change.  Now
artifact attributes are rolled up into `JarDependency` and only the ivy
resolution code knows to aggregate multiple jars for the same coordinate
with different classifiers into 1 ivy dependency.  The user-facing model
shows no signs of this implementation detail.

The only remaining evidence of ivy in the BUILD UI for jars is the
`type_` paramater which is now deprecated in favor of `ext`.

Tests are updated and `JarPublish` is simplified on the ivy end where
the ivy.xml need not record external dependencies since it just drives
the publication machinery for poms and various jars and other artifacts.

 3rdparty/BUILD                                                                                                                    |  18 +++--
 BUILD.tools                                                                                                                       |  18 +++--
 contrib/spindle/src/python/pants/contrib/spindle/targets/spindle_thrift_library.py                                                |   3 -
 src/python/pants/backend/android/tasks/unpack_libraries.py                                                                        |   4 +-
 src/python/pants/backend/core/tasks/listtargets.py                                                                                |   2 +-
 src/python/pants/backend/jvm/BUILD                                                                                                |   1 -
 src/python/pants/backend/jvm/ivy_utils.py                                                                                         | 158 +++++++++++++++++++-------------------
 src/python/pants/backend/jvm/register.py                                                                                          |   3 +-
 src/python/pants/backend/jvm/targets/BUILD                                                                                        |   1 +
 src/python/pants/backend/jvm/targets/jar_dependency.py                                                                            | 208 +++++++++++++-------------------------------------
 src/python/pants/backend/jvm/targets/jarable.py                                                                                   |   9 +--
 src/python/pants/backend/jvm/tasks/BUILD                                                                                          |   1 +
 src/python/pants/backend/jvm/tasks/check_published_deps.py                                                                        |   2 +-
 src/python/pants/backend/jvm/tasks/ivy_resolve.py                                                                                 |  11 ++-
 src/python/pants/backend/jvm/tasks/ivy_task_mixin.py                                                                              |  45 ++++++-----
 src/python/pants/backend/jvm/tasks/jar_publish.py                                                                                 |  90 +++++++++-------------
 src/python/pants/backend/jvm/tasks/unpack_jars.py                                                                                 |   4 +-
 src/python/pants/backend/project_info/tasks/depmap.py                                                                             |   4 +-
 src/python/pants/backend/project_info/tasks/ide_gen.py                                                                            |   2 +-
 testprojects/src/scala/org/pantsbuild/testproject/publish/classifiers/BUILD                                                       |  22 +++---
 tests/python/pants_test/backend/codegen/tasks/BUILD                                                                               |   1 +
 tests/python/pants_test/backend/codegen/tasks/test_wire_gen.py                                                                    |   5 +-
 tests/python/pants_test/backend/jvm/targets/BUILD                                                                                 |  13 ----
 tests/python/pants_test/backend/jvm/targets/test_jar_dependency.py                                                                |  60 ---------------
 tests/python/pants_test/backend/jvm/targets/test_jvm_binary.py                                                                    |   4 +-
 tests/python/pants_test/backend/jvm/tasks/test_ivy_resolve.py                                                                     |  75 +++++++++---------
 tests/python/pants_test/base/test_payload_field.py                                                                                |   2 +-
 tests/python/pants_test/jvm/BUILD                                                                                                 |   1 -
 tests/python/pants_test/jvm/jvm_tool_task_test_base.py                                                                            |   2 +
 tests/python/pants_test/tasks/jar_publish_resources/org.pantsbuild.testproject.publish.hello/welcome/ivy-0.0.1-SNAPSHOT.xml       |   3 -
 tests/python/pants_test/tasks/jar_publish_resources/org.pantsbuild.testproject.publish/classifiers/classifiers-0.0.1-SNAPSHOT.pom |   4 +-
 tests/python/pants_test/tasks/jar_publish_resources/org.pantsbuild.testproject.publish/classifiers/ivy-0.0.1-SNAPSHOT.xml         |  17 -----
 tests/python/pants_test/tasks/jar_publish_resources/org.pantsbuild.testproject.publish/jvm-example-lib/ivy-0.0.1-SNAPSHOT.xml     |   3 -
 tests/python/pants_test/tasks/test_jar_publish.py                                                                                 |  18 ++---
 34 files changed, 293 insertions(+), 521 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/82093645

Issues

  • 0
  • 4
  • 2
  • 6
Description From Last Updated
John Sirois
Nick Howard (Twitter)
Mateo Rodriguez
Eric Ayers
Ity Kaul
John Sirois
John Sirois
Nick Howard (Twitter)
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...