Fix maven resolver for certain packages.
Fix maven resolver for certain packages.

Summary:
The values specified in ArtifactDescriptorResult aren't sane in most ways. That is, they need evaluation & variable substitution.

I'm not sure why this was here in the first place, so this patch may be wrong. That is, I think the CollectRequest correctly returns direct dependencies as part of the query. Perhaps I'm missing something, so please tell me if something breaks with this approach.

I'd love to test this for buck itself, but I couldn't find a (direct) dependency list for it. Is there one somewhere?

Before:
```shell
Exception in thread "main" org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact
io.netty:netty-tcnative:jar:${os.detected.classifier}:1.1.30.Fork2 in http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
	at com.facebook.buck.maven.Resolver.getRunTimeTransitiveDeps(Resolver.java:435)
	at com.facebook.buck.maven.Resolver.resolve(Resolver.java:121)
	at com.facebook.buck.maven.Resolver.main(Resolver.java:482)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:1.1.30.Fork2
in http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
	... 3 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:1.1.30.Fork2 in
http://repo1.maven.org/maven2 (http://repo1.maven.org/maven2)
	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
	... 5 more

```

After: Works :)

This fixes #456 as well.

Closes https://github.com/facebook/buck/pull/491

Test Plan:
```shell
buck run src/com/facebook/buck/maven:resolver -- /tmp/buck_repo/ thirdparty/jvm
/tmp/mvn/ http://repo1.maven.org/maven2 io.netty:netty-all:4.0.24.Final
```

Plus tests were added in ffec8f597bef37ed33851735910808a96ee4cbd1

Reviewed By: sdwilsh

fb-gh-sync-id: d089f02

robbertvanginkel/buck,robbertvanginkel/buck,Dominator008/buck,romanoid/buck,rmaz/buck,justinmuller/buck,ilya-klyuchnikov/buck,OkBuilds/buck,k21/buck,marcinkwiatkowski/buck,Addepar/buck,grumpyjames/buck,robbertvanginkel/buck,janicduplessis/buck,dsyang/buck,dsyang/buck,brettwooldridge/buck,janicduplessis/buck,janicduplessis/buck,kageiit/buck,liuyang-li/buck,bocon13/buck,mogers/buck,janicduplessis/buck,romanoid/buck,davido/buck,shybovycha/buck,Addepar/buck,sdwilsh/buck,grumpyjames/buck,rmaz/buck,kageiit/buck,marcinkwiatkowski/buck,ilya-klyuchnikov/buck,k21/buck,ilya-klyuchnikov/buck,sdwilsh/buck,brettwooldridge/buck,liuyang-li/buck,rmaz/buck,k21/buck,rowillia/buck,rmaz/buck,SeleniumHQ/buck,brettwooldridge/buck,darkforestzero/buck,mikekap/buck,mogers/buck,raviagarwal7/buck,illicitonion/buck,darkforestzero/buck,romanoid/buck,clonetwin26/buck,facebook/buck,illicitonion/buck,SeleniumHQ/buck,brettwooldridge/buck,illicitonion/buck,darkforestzero/buck,daedric/buck,nguyentruongtho/buck,shs96c/buck,LegNeato/buck,Dominator008/buck,mogers/buck,vschs007/buck,davido/buck,robbertvanginkel/buck,k21/buck,facebook/buck,justinmuller/buck,davido/buck,robbertvanginkel/buck,illicitonion/buck,raviagarwal7/buck,robbertvanginkel/buck,darkforestzero/buck,illicitonion/buck,bocon13/buck,zhan-xiong/buck,romanoid/buck,davido/buck,JoelMarcey/buck,raviagarwal7/buck,bocon13/buck,Addepar/buck,mikekap/buck,zhan-xiong/buck,shs96c/buck,shybovycha/buck,sdwilsh/buck,darkforestzero/buck,raviagarwal7/buck,raviagarwal7/buck,daedric/buck,zhan-xiong/buck,vschs007/buck,SeleniumHQ/buck,zpao/buck,JoelMarcey/buck,OkBuilds/buck,OkBuilds/buck,clonetwin26/buck,k21/buck,k21/buck,grumpyjames/buck,Dominator008/buck,LegNeato/buck,Dominator008/buck,illicitonion/buck,JoelMarcey/buck,bocon13/buck,ilya-klyuchnikov/buck,zhan-xiong/buck,Dominator008/buck,Addepar/buck,rmaz/buck,ilya-klyuchnikov/buck,liuyang-li/buck,sdwilsh/buck,vschs007/buck,marcinkwiatkowski/buck,SeleniumHQ/buck,sdwilsh/buck,dsyang/buck,zhan-xiong/buck,clonetwin26/buck,zhan-xiong/buck,sdwilsh/buck,romanoid/buck,JoelMarcey/buck,shs96c/buck,zhan-xiong/buck,davido/buck,daedric/buck,janicduplessis/buck,clonetwin26/buck,brettwooldridge/buck,darkforestzero/buck,grumpyjames/buck,rmaz/buck,shs96c/buck,justinmuller/buck,zpao/buck,illicitonion/buck,facebook/buck,raviagarwal7/buck,robbertvanginkel/buck,facebook/buck,darkforestzero/buck,daedric/buck,marcinkwiatkowski/buck,shs96c/buck,SeleniumHQ/buck,raviagarwal7/buck,grumpyjames/buck,rowillia/buck,dsyang/buck,clonetwin26/buck,shybovycha/buck,janicduplessis/buck,daedric/buck,clonetwin26/buck,vschs007/buck,mikekap/buck,brettwooldridge/buck,rmaz/buck,shybovycha/buck,romanoid/buck,zpao/buck,romanoid/buck,grumpyjames/buck,shs96c/buck,mikekap/buck,shs96c/buck,JoelMarcey/buck,rowillia/buck,davido/buck,justinmuller/buck,sdwilsh/buck,zpao/buck,robbertvanginkel/buck,raviagarwal7/buck,justinmuller/buck,liuyang-li/buck,k21/buck,vschs007/buck,bocon13/buck,rmaz/buck,justinmuller/buck,daedric/buck,mikekap/buck,rowillia/buck,SeleniumHQ/buck,shybovycha/buck,Addepar/buck,marcinkwiatkowski/buck,marcinkwiatkowski/buck,rowillia/buck,raviagarwal7/buck,vschs007/buck,janicduplessis/buck,liuyang-li/buck,LegNeato/buck,JoelMarcey/buck,JoelMarcey/buck,marcinkwiatkowski/buck,Addepar/buck,ilya-klyuchnikov/buck,davido/buck,Dominator008/buck,davido/buck,rowillia/buck,ilya-klyuchnikov/buck,marcinkwiatkowski/buck,shybovycha/buck,justinmuller/buck,shybovycha/buck,Addepar/buck,mogers/buck,kageiit/buck,romanoid/buck,daedric/buck,robbertvanginkel/buck,SeleniumHQ/buck,mogers/buck,LegNeato/buck,ilya-klyuchnikov/buck,illicitonion/buck,liuyang-li/buck,OkBuilds/buck,mogers/buck,vschs007/buck,bocon13/buck,liuyang-li/buck,ilya-klyuchnikov/buck,rmaz/buck,davido/buck,raviagarwal7/buck,rmaz/buck,davido/buck,bocon13/buck,Addepar/buck,dsyang/buck,k21/buck,justinmuller/buck,rmaz/buck,shs96c/buck,mikekap/buck,rmaz/buck,mikekap/buck,shs96c/buck,LegNeato/buck,mogers/buck,LegNeato/buck,grumpyjames/buck,SeleniumHQ/buck,darkforestzero/buck,Addepar/buck,nguyentruongtho/buck,shybovycha/buck,marcinkwiatkowski/buck,grumpyjames/buck,facebook/buck,dsyang/buck,romanoid/buck,dsyang/buck,Addepar/buck,justinmuller/buck,rowillia/buck,shybovycha/buck,ilya-klyuchnikov/buck,sdwilsh/buck,nguyentruongtho/buck,sdwilsh/buck,Dominator008/buck,shybovycha/buck,SeleniumHQ/buck,Addepar/buck,marcinkwiatkowski/buck,facebook/buck,zpao/buck,LegNeato/buck,davido/buck,shs96c/buck,ilya-klyuchnikov/buck,dsyang/buck,sdwilsh/buck,shybovycha/buck,brettwooldridge/buck,mogers/buck,vschs007/buck,SeleniumHQ/buck,mikekap/buck,liuyang-li/buck,mikekap/buck,OkBuilds/buck,romanoid/buck,marcinkwiatkowski/buck,shs96c/buck,romanoid/buck,SeleniumHQ/buck,daedric/buck,mogers/buck,shs96c/buck,grumpyjames/buck,vschs007/buck,raviagarwal7/buck,zhan-xiong/buck,clonetwin26/buck,dsyang/buck,zhan-xiong/buck,grumpyjames/buck,mogers/buck,OkBuilds/buck,brettwooldridge/buck,Dominator008/buck,JoelMarcey/buck,JoelMarcey/buck,illicitonion/buck,daedric/buck,brettwooldridge/buck,dsyang/buck,raviagarwal7/buck,dsyang/buck,darkforestzero/buck,k21/buck,zpao/buck,OkBuilds/buck,shybovycha/buck,clonetwin26/buck,rowillia/buck,rowillia/buck,zhan-xiong/buck,mogers/buck,grumpyjames/buck,dsyang/buck,janicduplessis/buck,dsyang/buck,robbertvanginkel/buck,marcinkwiatkowski/buck,zhan-xiong/buck,Addepar/buck,justinmuller/buck,illicitonion/buck,LegNeato/buck,vschs007/buck,shybovycha/buck,clonetwin26/buck,bocon13/buck,bocon13/buck,darkforestzero/buck,SeleniumHQ/buck,k21/buck,brettwooldridge/buck,LegNeato/buck,kageiit/buck,romanoid/buck,bocon13/buck,OkBuilds/buck,darkforestzero/buck,bocon13/buck,vschs007/buck,OkBuilds/buck,janicduplessis/buck,rowillia/buck,Dominator008/buck,rowillia/buck,robbertvanginkel/buck,JoelMarcey/buck,LegNeato/buck,justinmuller/buck,Dominator008/buck,nguyentruongtho/buck,nguyentruongtho/buck,janicduplessis/buck,k21/buck,zpao/buck,Dominator008/buck,OkBuilds/buck,robbertvanginkel/buck,Addepar/buck,JoelMarcey/buck,daedric/buck,ilya-klyuchnikov/buck,k21/buck,daedric/buck,clonetwin26/buck,liuyang-li/buck,brettwooldridge/buck,LegNeato/buck,daedric/buck,darkforestzero/buck,mikekap/buck,k21/buck,kageiit/buck,kageiit/buck,nguyentruongtho/buck,nguyentruongtho/buck,JoelMarcey/buck,robbertvanginkel/buck,OkBuilds/buck,davido/buck,facebook/buck,clonetwin26/buck,LegNeato/buck,darkforestzero/buck,justinmuller/buck,davido/buck,liuyang-li/buck,JoelMarcey/buck,zhan-xiong/buck,ilya-klyuchnikov/buck,LegNeato/buck,brettwooldridge/buck,zhan-xiong/buck,illicitonion/buck,sdwilsh/buck,vschs007/buck,kageiit/buck,marcinkwiatkowski/buck,justinmuller/buck,romanoid/buck,illicitonion/buck,brettwooldridge/buck,sdwilsh/buck,vschs007/buck,mikekap/buck,janicduplessis/buck,mikekap/buck,daedric/buck,liuyang-li/buck,Dominator008/buck,sdwilsh/buck,grumpyjames/buck,clonetwin26/buck,illicitonion/buck,bocon13/buck,OkBuilds/buck,rmaz/buck,raviagarwal7/buck,clonetwin26/buck,OkBuilds/buck,rowillia/buck,SeleniumHQ/buck,shs96c/buck,janicduplessis/buck