Enabling publishing in twitter-commons required for #60.

Review Request #119 — Created March 18, 2014 and submitted

tejal
commons
https://github.com/twitter/commons/issues/258
pants-reviews
jsirois, travis, wickman
I want to add this as a separate change since it is not directly depend on rb #60.

This change is only to enable publishing in twitter-commons.
 PANTS_DEV=1 ./pants.bootstrap goal publish src/java/com/twitter/common/util --no-publish-dryrun --publish-local=~tdesai/.m2/ -ldebug --publish-force
*** running pants in dev mode from ./src/python/twitter/pants/bin/pants_exe.py ***
               SUCCESS
[tw-mbp13-tdesai pants_twitter_commons]$
  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
TE
TE
  1. 
      
  2. What i want to do here is: 
    jar_create has javadoc  DEFAULT set to False, 
    But 
    publish has javadoc  DEFAULT set to True.
    
    This is the minimal change which handles setting defaults based on goal.
    But its not a clean change. 
    The goal info is not passed to option_group explicitly but is embedded in this field option.title.
    See here:
     https://github.com/twitter/commons/blob/master/src/python/twitter/pants/goal/__init__.py#L108
    
    If there was better way to init option_group to pass the goal name
     
  3. Python 3.x checkstyle.
  4. 
      
TE
TE
  1. ping!!!!!
  2. 
      
TE
TE
  1. Ping!
    
    Can I get some feedback on this one??
    This is to enable publishing and not much changes except for the ivy mustache template.
  2. 
      
JS
  1. 
      
  2. This does not belong in commons - please put this in a pants dir.
  3. No idl in commons please - I already gutted it all for good reason.
  4. 
      
TE
  1. 
      
  2. Will move this to pants/tasks/publish/authentication
    1. sgtm - but maybe just pants/authentication - its used by publish, but it otherwise is not tasks or publish bound.
    2. done... 
  3. 
      
TE
TE
TE
  1. ping!!!
    
    
    
  2. 
      
TE
TE
TE
TE
  1. ping!
  2. 
      
JS
  1. I think at the end of the day this change won't make sense without maven-central support; ie: twitter/commons has publishing enabled, and the target is maven-central.
    If you want to do a more minimal setup where --publish-local works, that may be a better baby-step.
  2. pants.ini (Diff revision 6)
     
     
    This also does not belong in commons - its all Twitter specific detail.  If you really want to test remote publishes straight from commons, you'll need to setup real - publically accessible repos.
  3. s/iter/items/
  4. This is a regression - the LHS is the flexibility we want - was this intended?
    1. Now the template looks like this
      
      <!-- generated by pants! -->
      <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:m="http://ant.apache.org/ivy/maven">
      
        <info organisation="com.twitter.common" module="jdk-logging" revision="0.0.1-SNAPSHOT" status="release" publication="20140407173824"/>
      
          <configurations>
            <conf name="default"/>
            <conf name="sources"/>
            <conf name="javadoc"/>
           </configurations>
      
        <publications>
          <artifact conf="default" type="jar" ext="jar"/>
          <artifact conf="default" type="pom" ext="pom"/>
        </publications>
      
        <dependencies>
          <dependency org="com.google.guava" name="guava" rev="15.0">
            <conf name="default;sources;javadoc"/>
          </dependency>
          <dependency org="com.google.code.findbugs" name="jsr305" rev="1.3.9">
            <conf name="default"/>
          </dependency>
          <dependency org="javax.inject" name="javax.inject" rev="1">
            <conf name="default;sources"/>
          </dependency>
        </dependencies>
      </ivy-module>
  5. 
      
TE
TE
  1. 
      
  2. pants.ini (Diff revision 6)
     
     
    umm ok .. 
    
    When i talked to Travis about this he was ok with this being in twitter commons. 
    
    Added a change to error out when no --publish-local flag is used.
  3. fixed
  4. yes.. i had to make this change to get this work.
    
    The ivy.xml which was getting generated wasn't the right one.
    Ivy gets a runtime error:
    
    Cannot add dependency 'commons-lang#commons-lang;2.5' to configuration 'default' of module internal#7b260a45e588aed7de520af10d70b1101a603cf6;latest.integration because this configuration doesn't exist!
    
    
    The generated ivy.xml is 
    =======<!-- generated by pants! -->
    <ivy-module version="2.0"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
                xmlns:m="http://ant.apache.org/ivy/maven">
    
      <info organisation="internal" module="7b260a45e588aed7de520af10d70b1101a603cf6"
        revision="latest.integration"
       />
    
        <configurations>
          <conf name="True"/>
         </configurations>
    
    
      <dependencies>
        <dependency org="commons-lang"
                    name="commons-lang"
                    rev="2.5"
    
    
    
        >
          <conf name="default" mapped="default"/>
        </dependency>
        <dependency org="com.google.inject"
                    name="guice"
                    rev="3.0"
    ....
    =====
  5. 
      
TE
TE
TE
TE
  1. ping.. Need Ship-it!!
    
  2. 
      
JS
  1. This will need to be cherry-picked straight away into pantsbuild/pants and re-reviewed since pants in twitter/commons is dead.  Just reference this RB there when you do that.
  2. src/python/twitter/pants/tasks/jar_publish.py (Diff revisions 7 - 10)
     
     
    This is an odd indent, should be +4 from the start of `target_jar` on the line above IIUC.  You might also avoid line continuation characters via:
    target_jar = self.internaldep(
        as_jar(target),
        configurations=list(configurations)).extend(dependencies=dependencies.values())
    
    For example.
  3. 
      
TE
Review request changed

Status: Closed (submitted)

Loading...