Pants publish to support publishing extra publish artifacts as individual artifacts with classifier attached.

Review Request #1889 - Created March 9, 2015 and submitted

Information
Tejal Desai
pants
1f459b0...
Reviewers
pants-reviews
areitz, benjyw, ity, jsirois, zundel

Since last 2 weeks, i am trying to work around publishing idl only thrift jars.
The discussion started here https://groups.google.com/forum/#!search/Proposal$3A$20Make$20JarPublish$20task$20more$20configurable./pants-devel/S5l2_NXBtnw/Mf1pLj7P-kgJ

John, has more history around this but in short,
At twitter, old pants used to publish idl only thirft jars a separate artifact.
This artifact had its own pom and also has a classifier attached to it.

In contrast to this, OS pants supports extra publish parameter and publishes the idl thrift jars under the same artifact but with a different classifier.

We all agree OS pants is the right way to got about it.
However that would mean changing all internal consumption of thrift jars at twitter.
We are deep into migrating to new pants and making this switch right now is going to push is over the deadline. It also costs us maintaining the branch for longer till we rollout the new way of consumption.

Since we are the only one consuming publish extra plugins, this rb changes the publishing to old pants way.

I added integration tests to compare the contents of artifact pom file and ivy.xml file generated during publishing in the https://rbcommons.com/s/twitter/r/1879/

If you notice, these test case files have not been changed touched in this RB.
This does not break the normal publish flow nor does change the contents of generated pom and ivy files.

To describe the changes verbally
1. I have added classifier to all the method of the dependency writer
2. Instead of checking for product type 'jars', the publishing loops through product type jar and any other product types mentioned in the publish.publish_extras config.
3. It will barf with error 'No product mapping in {0} for {1}. ' only if none of the above products are found.
4. The publish will create individual artifacts for 'jars' and any other product mentioned in publish.publish_extras config. By individual artifact i mean, a separate pom, ivy.xml.

Please let me know how you feel about this.

Thanks
Tejal

yes.
Locally verified the extra published artifacts can be consumed internally.

New Travis url
https://travis-ci.org/pantsbuild/pants/builds/53863412

Issues

  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Andy Reitz
Ity Kaul
Tejal Desai
Tejal Desai
Tejal Desai
John Townsend
Benjy Weinberger
Andy Reitz
Eric Ayers
Tejal Desai
Eric Ayers
Ity Kaul
Tejal Desai
Tejal Desai
Review request changed

Status: Closed (submitted)

Loading...