foursquare / fsqio

A monorepo that holds all of Foursquare's opensource projects
Apache License 2.0
252 stars 54 forks source link

Instructions for installing pom resolve in a new repo #29

Closed toddgardner closed 6 years ago

toddgardner commented 7 years ago

After the last issue I took a stab at it, so far it's working but haven't tried putting in the complicated deps.

Copy these files from the fsqio repo:

src/python/fsqio/__init__.py
src/python/fsqio/pants/__init__.py
src/python/fsqio/pants/pom/*

You can delete src/python/fsqio/pants/pom/BUILD unless you're planning on writing tests for or publishing the pom-resolve; this means you don't need to put the deps in your 3rdparty file.

Add this to your pants.ini:

# Note this is effectively requirements.txt for the pants environment, so we need the deps of
# our build dependancies, see: https://github.com/pantsbuild/pants/issues/4001
[GLOBAL]
plugins: +[
    "requests==2.5.3",
    "requests-futures==0.9.4",
   ]
backend_packages: +[
    "fsqio.pants.pom",
  ]
[pom-resolve]
# Fill in these values as appropriate; there's good defaults in fsqio's pants.ini
maven_repos: [
    ...
  ]
global_exclusions = [
    ...
  ]
global_pinned_versions = [
    ...
  ]
local_override_versions = [
    ...
  ]

[cache.pom-resolve]
write_to: ...
read_from: ...
mateor commented 7 years ago

!!!! Wow, this is great.

Thanks a bunch Todd. I will perhaps link a wiki page to this or something.

mateor commented 7 years ago

Hi @toddgardner. I am going to be pushing some new things to Fsq.io in the near future. I have started moving to a model where I add docs as README.md pages inside the targets themselves.

The hope is that it will help keep the docs fresh. It will also allow me to write docs internally that are synced to Fsq.io - in the past a lot of our documentation is silo-ed in the corporate wiki.

So, I am thinking about dumping the contents of this issue straight into src/python/fsqio/pants/pom/README.md.

I wanted to give you the opportunity to send that as a pull request first. Otherwise I can just credit you inside the text itself.

toddgardner commented 7 years ago

Yeah, sure, added a README here: https://github.com/foursquare/fsqio/pull/41/files

Very bare bones at the moment.

mateor commented 6 years ago

Landed in Fsq.io, thanks sir!