Cherrypick 64b54c04 from twitter/commons to Enable local publishing in pants

Review Request #207 — Created April 11, 2014 and submitted

tejal
pants
https://github.com/pantsbuild/pants/issues/46
pants-reviews
jsirois, travis
Ship it here: 
https://rbcommons.com/s/twitter/r/119/


Cherrypick 64b54c04 from twitter/commons to Enable local publishing in pants
Fix header and imports
1. ============= Run pants goal goals.
[tw-mbp13-tdesai pants]$ PANTS_DEV=1 ./pants goal list
*** Running pants in dev mode from src/python/pants/bin/pants_exe.py ***

14:28:36 00:00 [main]
               (To run a reporting server: ./pants server)
14:28:36 00:00   [setup]
14:28:36 00:00     [bootstrap]
14:28:36 00:00     [parse]
....
               publish: Publish one or more artifacts.
               resolve: Resolves jar dependencies and produces dependency reports.
                 roots: Prints the source roots and associated target types defined in the repo.
                   run: Run a (currently JVM only) binary target.
             run-dirty: Run a (currently JVM only) binary target, using only currently existing binaries, skipping compilation
                server: Run the pants reporting server.
                 setup: Setup the target's build environment.
                  sort: Topologically sort the input targets.
               targets: List all target types.

               SUCCESS
[tw-mbp13-tdesai pants]$

2. =============  Ci.sh
./build-support/bin/ci.sh  is Success.


3. ============= Finally use the pex to publish since no integrations tests yet

[tw-mbp13-tdesai pants]$ PANTS_DEV=1 ./pants goal publish src/java/com/pants/examples/hello/greet/BUILD --publish-local=~tdesai/.m2/
*** Running pants in dev mode from src/python/pants/bin/pants_exe.py ***

11:09:20 00:00 [main]
               (To run a reporting server: ./pants server)
11:09:20 00:00   [setup]
11:09:20 00:00     [bootstrap]
11:09:20 00:00     [parse]
11:09:20 00:00   [bootstrap]
11:09:20 00:00     [bootstrap-jvm-tools]
11:09:20 00:00   [gen]
11:09:20 00:00     [thrift]
11:09:20 00:00     [scrooge]
11:09:20 00:00     [protoc]
11:09:20 00:00     [antlr]
11:09:20 00:00   [check-exclusives]
11:09:20 00:00     [check-exclusives]
11:09:20 00:00   [resolve]
11:09:20 00:00     [ivy]
11:09:20 00:00   [compile]
11:09:20 00:00     [jvm]
11:09:20 00:00       [java]
11:09:21 00:01   [resources]
11:09:21 00:01     [prepare]
11:09:21 00:01   [publish]
11:09:21 00:01     [javadoc_publish]
11:09:21 00:01     [scaladoc_publish]
11:09:21 00:01     [jar_create_publish]
11:09:21 00:01     [publish]Skipping check for a clean enable_publishing_in_twitter_common_pants in test mode.
Skipping publish of com.pants.example#example;0.0.1-SNAPSHOT in test mode.

               SUCCESS

tw-mbp13-tdesai pants]$ ls ~tdesai/.m2/com/pants/example/example/
0.0.1-SNAPSHOT
TE
  1. Also, note it only works for local-publish
    
    [tw-mbp13-tdesai pants]$ PANTS_DEV=1 ./pants goal publish src/java/com/pants/examples/hello/greet/BUILD
    *** Running pants in dev mode from src/python/pants/bin/pants_exe.py ***
    
    11:14:24 00:00 [main]
                   (To run a reporting server: ./pants server)
    11:14:24 00:00   [setup]
    11:14:24 00:00     [bootstrap]
    11:14:24 00:00     [parse]
    FAILURE: This repo is not yet set for publishing to the world! Please re-run with --publish-local
    
    
                   SUCCESS
    [tw-mbp13-tdesai pants]$ 
  2. 
      
TR
  1. Ship It!
  2. 
      
TE
Review request changed

Status: Closed (submitted)

Loading...