brief-engineer-67497
10/23/2018, 12:23 PMenough-analyst-54434
10/23/2018, 3:13 PMenough-analyst-54434
10/23/2018, 3:13 PM./pants publish ...
?enough-analyst-54434
10/23/2018, 3:49 PM$ ./pants publish.jar --local=/tmp/repo --no-prompt --no-dryrun src/main/java::
...
$ $ tree /tmp/repo/
/tmp/repo/
└── org
└── pantsbuild
└── jarjar
└── 1.6.7-SNAPSHOT
├── ivy-1.6.7-SNAPSHOT.xml
├── ivy-1.6.7-SNAPSHOT.xml.md5
├── ivy-1.6.7-SNAPSHOT.xml.sha1
├── jarjar-1.6.7-SNAPSHOT-CHANGELOG.txt
├── jarjar-1.6.7-SNAPSHOT-CHANGELOG.txt.md5
├── jarjar-1.6.7-SNAPSHOT-CHANGELOG.txt.sha1
├── jarjar-1.6.7-SNAPSHOT.jar
├── jarjar-1.6.7-SNAPSHOT.jar.md5
├── jarjar-1.6.7-SNAPSHOT.jar.sha1
├── jarjar-1.6.7-SNAPSHOT-javadoc.jar
├── jarjar-1.6.7-SNAPSHOT-javadoc.jar.md5
├── jarjar-1.6.7-SNAPSHOT-javadoc.jar.sha1
├── jarjar-1.6.7-SNAPSHOT.pom
├── jarjar-1.6.7-SNAPSHOT.pom.md5
├── jarjar-1.6.7-SNAPSHOT.pom.sha1
├── jarjar-1.6.7-SNAPSHOT-sources.jar
├── jarjar-1.6.7-SNAPSHOT-sources.jar.md5
└── jarjar-1.6.7-SNAPSHOT-sources.jar.sha1
4 directories, 18 files
enough-analyst-54434
10/23/2018, 3:50 PMbrief-engineer-67497
10/23/2018, 3:58 PMenough-analyst-54434
10/23/2018, 4:05 PMHowever I'm surprised as I have to specify all its dependency in the classpath argument unlike the code in the githubThat is surprising.
brief-engineer-67497
10/23/2018, 4:08 PMbrief-engineer-67497
10/23/2018, 4:09 PM./pants publish pants-plugins/scala/play-gen-tools --publish-jar-local=~/.ivy2/local --no-publish-jar-dryrun
brief-engineer-67497
10/23/2018, 4:09 PMbrief-engineer-67497
10/23/2018, 4:10 PMbrief-engineer-67497
10/23/2018, 4:10 PM./pants clean-all
is uselessbrief-engineer-67497
10/23/2018, 4:10 PMrm ~/.ivy2/pants/com.mediarithmics.pants* -rf
enough-analyst-54434
10/23/2018, 4:10 PMbrief-engineer-67497
10/23/2018, 4:10 PM./pants ng-killall
enough-analyst-54434
10/23/2018, 4:11 PMbrief-engineer-67497
10/23/2018, 4:12 PMenough-analyst-54434
10/23/2018, 4:13 PMbrief-engineer-67497
10/23/2018, 4:14 PMenough-analyst-54434
10/23/2018, 4:14 PMenough-analyst-54434
10/23/2018, 4:15 PMenough-analyst-54434
10/23/2018, 4:15 PMcoursier
brief-engineer-67497
10/23/2018, 4:15 PMenough-analyst-54434
10/23/2018, 4:16 PMbrief-engineer-67497
10/23/2018, 4:16 PMenough-analyst-54434
10/23/2018, 4:16 PMbrief-engineer-67497
10/23/2018, 4:17 PMresolver.resolver = coursier (from CONFIG in pants.ini)
enough-analyst-54434
10/23/2018, 4:17 PM./pants options --scope=coursier --name=repos
brief-engineer-67497
10/23/2018, 4:18 PMenough-analyst-54434
10/23/2018, 4:18 PMbrief-engineer-67497
10/23/2018, 4:19 PM~/.ivy2/local
enough-analyst-54434
10/23/2018, 4:19 PMbrief-engineer-67497
10/23/2018, 4:20 PMenough-analyst-54434
10/23/2018, 4:20 PM~
brief-engineer-67497
10/23/2018, 4:20 PMbrief-engineer-67497
10/23/2018, 4:21 PMbrief-engineer-67497
10/23/2018, 4:21 PMenough-analyst-54434
10/23/2018, 4:21 PMbrief-engineer-67497
10/23/2018, 4:22 PMenough-analyst-54434
10/23/2018, 4:22 PMenough-analyst-54434
10/23/2018, 4:22 PMenough-analyst-54434
10/23/2018, 4:22 PM~/.ivy2/local
on their machine?brief-engineer-67497
10/23/2018, 4:22 PMbrief-engineer-67497
10/23/2018, 4:23 PMenough-analyst-54434
10/23/2018, 4:24 PMbrief-engineer-67497
10/23/2018, 4:24 PMbrief-engineer-67497
10/23/2018, 4:24 PMenough-analyst-54434
10/23/2018, 4:24 PMenough-analyst-54434
10/23/2018, 4:25 PMbrief-engineer-67497
10/23/2018, 4:25 PMbrief-engineer-67497
10/23/2018, 4:25 PMenough-analyst-54434
10/23/2018, 4:26 PMbrief-engineer-67497
10/23/2018, 4:27 PMPANTS_COURSIER_REPOS
env var and use repos: +[
in pants.ini but it's not workingbrief-engineer-67497
10/23/2018, 4:27 PMPANTS_COURSIER_REPOS
varbrief-engineer-67497
10/23/2018, 4:27 PMenough-analyst-54434
10/23/2018, 4:28 PMenough-analyst-54434
10/23/2018, 4:29 PM$ tail -3 ~/.pants.rc
[coursier]
repos: nancy
brief-engineer-67497
10/23/2018, 4:29 PMenough-analyst-54434
10/23/2018, 4:29 PMenough-analyst-54434
10/23/2018, 4:30 PMenough-analyst-54434
10/23/2018, 4:30 PMbrief-engineer-67497
10/23/2018, 4:30 PMenough-analyst-54434
10/23/2018, 4:31 PMbrief-engineer-67497
10/23/2018, 4:34 PMbrief-engineer-67497
10/23/2018, 4:34 PMbrief-engineer-67497
10/23/2018, 4:35 PMenough-analyst-54434
10/23/2018, 4:35 PMbrief-engineer-67497
10/23/2018, 4:36 PMcoursier.repos
but it does not solve my initial problem 😞brief-engineer-67497
10/23/2018, 4:36 PMenough-analyst-54434
10/23/2018, 4:37 PM-ldebug
give more information about the resolve?enough-analyst-54434
10/23/2018, 4:37 PMbrief-engineer-67497
10/23/2018, 4:39 PMbrief-engineer-67497
10/23/2018, 4:39 PMExecuting tasks in goals: bootstrap -> imports -> unpack-jars -> deferred-sources -> gen -> jvm-platform-validate -> resolve -> compile
brief-engineer-67497
10/23/2018, 4:40 PM18:37:36 00:00 [gen]
18:37:36 00:00 [antlr-java]
18:37:36 00:00 [antlr-py]
18:37:36 00:00 [jaxb]
18:37:36 00:00 [protoc]
18:37:36 00:00 [ragel]
18:37:36 00:00 [thrift-java]
18:37:36 00:00 [thrift-py]
18:37:36 00:00 [wire]
18:37:36 00:00 [twirl]
play_tasks_twirl_gen_TwirlGen will read from local artifact cache at /home/lorilan/dev/mediarithmics-platform-2/.cache/38cc49ee3f6d74794dc9d5c801197dfcbbacf699
18:37:36 00:00 [cache]
No cached artifacts for 1 target.
Invalidated 1 target.DEBUG] Using previous fetch.
enough-analyst-54434
10/23/2018, 4:48 PM$ ./pants publish.jar --no-dryrun --no-prompt --local=/tmp/coursier src/java/org/pantsbuild::
3. create target to test with
$ cat BUILD.coursier-test
jar_library(
name='coursier-test',
jars=[
jar(org='org.pantsbuild', name='args4j', rev='0.0.20-SNAPSHOT')
],
)
3. try coursier resolve
$ ./pants --resolver-resolver=coursier --coursier-repos=/tmp/coursier -ldebug resolve //:coursier-test
...
10:45:50 00:01 [resolve]
10:45:50 00:01 [ivy]
10:45:50 00:01 [coursier]
Invalidated 1 target.
10:45:50 00:01 [bootstrap-coursier]DEBUG] Using previous fetch.
10:45:50 00:01 [coursier]DEBUG] Nailgun ng_CoursierResolve_resolve_coursier state: updated=True running=False fingerprint=None new_fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3 distribution=None new_distribution=/usr/bin/java
DEBUG] Spawning nailgun server ng_CoursierResolve_resolve_coursier with fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3, jvm_options=['-Xmx1g', u'-Dpants.buildroot=/home/jsirois/dev/pantsbuild/pants', u'-Dpants.nailgun.owner=/home/jsirois/dev/pantsbuild/pants/.pants.d/ng/CoursierResolve_resolve_coursier', u'-Dpants.nailgun.fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3'], classpath=[u'/home/jsirois/dev/pantsbuild/pants/.pants.d/ivy/jars/com.martiansoftware/nailgun-server/jars/nailgun-server-0.9.1.jar', u'/home/jsirois/.cache/pants/tools/jvm/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier.jar']
DEBUG] purging metadata directory: /home/jsirois/dev/pantsbuild/pants/.pids/ng_coursierresolve_resolve_coursier
DEBUG] Executing: /usr/bin/java -Xmx1g -Dpants.buildroot=/home/jsirois/dev/pantsbuild/pants -Dpants.nailgun.owner=/home/jsirois/dev/pantsbuild/pants/.pants.d/ng/CoursierResolve_resolve_coursier -Dpants.nailgun.fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3 -cp .pants.d/ivy/jars/com.martiansoftware/nailgun-server/jars/nailgun-server-0.9.1.jar:../../../.cache/pants/tools/jvm/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier.jar com.martiansoftware.nailgun.NGServer :0 args={'close_fds': True} at cwd=/home/jsirois/dev/pantsbuild/pants
DEBUG] Spawned nailgun server ng_CoursierResolve_resolve_coursier with fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3, pid=3085 port=39913
DEBUG] Verified new ng server is connectable at ('127.0.0.1', 39913)
DEBUG] Executing via NailgunClient(host=u'127.0.0.1', port=39913, workdir=u'/home/jsirois/dev/pantsbuild/pants'): /usr/bin/java -Xmx1g -cp /home/jsirois/.cache/pants/tools/jvm/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier.jar coursier.cli.Coursier fetch -t --cache /home/jsirois/.cache/pants/coursier -r <https://repo1.maven.org/maven2> -r /tmp/coursier -A jar,bundle,test-jar,maven-plugin,src,doc,aar -q --no-default -n 8 --json-output-file /home/jsirois/dev/pantsbuild/pants/.pants.d/tmp/tmpc934QA org.pantsbuild:args4j:0.0.20-SNAPSHOT
==== stderr ====
Error with repositories:
Error parsing URL Right(/tmp/coursier) (no protocol: /tmp/coursier)
==== stdout ====
DEBUG] releasing lock: <pants.process.lock.OwnerPrintingInterProcessFileLock object at 0x7f33640b4710>
FAILURE: The coursier process exited non-zero: 255
Waiting for background workers to finish.
10:45:51 00:02 [complete]
FAILURE
enough-analyst-54434
10/23/2018, 4:48 PMenough-analyst-54434
10/23/2018, 4:51 PM$ ./pants --resolver-resolver=coursier --coursier-repos=file:/tmp/coursier -ldebug resolve //:coursier-test
...
10:49:00 00:01 [resolve]
10:49:00 00:01 [ivy]
10:49:00 00:01 [coursier]
Invalidated 1 target.
10:49:00 00:01 [bootstrap-coursier]DEBUG] Using previous fetch.
10:49:00 00:01 [coursier]DEBUG] Nailgun ng_CoursierResolve_resolve_coursier state: updated=False running=True fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3 new_fingerprint=6a2227e1706eb48f3a776a9a60844077732ae2a3 distribution=/usr/bin/java new_distribution=/usr/bin/java
DEBUG] Executing via NailgunClient(host=u'127.0.0.1', port=39913, workdir=u'/home/jsirois/dev/pantsbuild/pants'): /usr/bin/java -Xmx1g -cp /home/jsirois/.cache/pants/tools/jvm/coursier/1.1.0.cf365ea27a710d5f09db1f0a6feee129aa1fc417/coursier.jar coursier.cli.Coursier fetch -t --cache /home/jsirois/.cache/pants/coursier -r <https://repo1.maven.org/maven2> -r file:/tmp/coursier -A jar,bundle,test-jar,maven-plugin,src,doc,aar -q --no-default -n 8 --json-output-file /home/jsirois/dev/pantsbuild/pants/.pants.d/tmp/tmpCHAgxX org.pantsbuild:args4j:0.0.20-SNAPSHOT
10:49:04 00:05 [go]
10:49:04 00:05 [scala-js-compile]
10:49:04 00:05 [scala-js-link]
10:49:04 00:05 [node]DEBUG] releasing lock: <pants.process.lock.OwnerPrintingInterProcessFileLock object at 0x7fe1bc0427d0>
Waiting for background workers to finish.
10:49:04 00:05 [complete]
SUCCESS
$ $ jq . /home/jsirois/dev/pantsbuild/pants/.pants.d/tmp/tmpCHAgxX
{
"conflict_resolution": {},
"dependencies": [
{
"coord": "args4j:args4j:2.33",
"file": "/home/jsirois/.cache/pants/coursier/https/repo1.maven.org/maven2/args4j/args4j/2.33/args4j-2.33.jar",
"dependencies": []
},
{
"coord": "com.google.code.findbugs:jsr305:3.0.2",
"file": "/home/jsirois/.cache/pants/coursier/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar",
"dependencies": []
},
{
"coord": "com.google.guava:guava:18.0",
"file": "/home/jsirois/.cache/pants/coursier/https/repo1.maven.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar",
"dependencies": []
},
{
"coord": "org.pantsbuild:args4j:0.0.20-SNAPSHOT",
"file": "/tmp/coursier/org/pantsbuild/args4j/0.0.20-SNAPSHOT/args4j-0.0.20-SNAPSHOT.jar",
"dependencies": [
"com.google.guava:guava:18.0",
"args4j:args4j:2.33",
"com.google.code.findbugs:jsr305:3.0.2"
]
}
],
"version": "0.1.0"
}
enough-analyst-54434
10/23/2018, 4:52 PM./pants clean-all
perhaps we can spot the differences. My test just confirms coursier handles additional local repos fine as long as you use file:/path/to/local/repo
brief-engineer-67497
10/23/2018, 5:01 PMError parsing URL Right(/home/lorilan/.ivy2/local) (no protocol: /home/lorilan/.ivy2/local)
. This is kind of a good sign I'm adding file://
.brief-engineer-67497
10/23/2018, 5:02 PMBUILD dot someting
works ?enough-analyst-54434
10/23/2018, 5:03 PMbrief-engineer-67497
10/23/2018, 5:03 PMBUILD.tools
at root because I saw this is how to configure a custom scala version but I've seen it again once or twiceenough-analyst-54434
10/23/2018, 5:03 PMbrief-engineer-67497
10/23/2018, 5:03 PMenough-analyst-54434
10/23/2018, 5:03 PMenough-analyst-54434
10/23/2018, 5:04 PMbrief-engineer-67497
10/23/2018, 5:10 PMenough-analyst-54434
10/23/2018, 5:10 PMbrief-engineer-67497
10/23/2018, 5:11 PMbrief-engineer-67497
10/23/2018, 5:13 PM--json-output-file /home/jsirois/dev/pantsbuild/pants/.pants.d/tmp/tmpCHAgxX
partenough-analyst-54434
10/23/2018, 5:14 PMenough-analyst-54434
10/23/2018, 5:14 PMbrief-engineer-67497
10/23/2018, 5:14 PM[coursier]DEBUG] releasing lock: <pants.process.lock.OwnerPrintingInterProcessFileLock object at 0x7f3e9007cad0>
brief-engineer-67497
10/23/2018, 5:15 PMenough-analyst-54434
10/23/2018, 5:15 PMbrief-engineer-67497
10/23/2018, 5:15 PM./pants --resolver-resolver=coursier --coursier-repos=file:/tmp/coursier -ldebug resolve //:coursier-test
enough-analyst-54434
10/23/2018, 5:16 PMenough-analyst-54434
10/23/2018, 5:16 PMbrief-engineer-67497
10/23/2018, 5:16 PMbrief-engineer-67497
10/23/2018, 5:17 PMbrief-engineer-67497
10/23/2018, 5:17 PM./pants --resolver-resolver=coursier --coursier-repos=file:/tmp/coursier -ldebug resolve //:coursier-test
brief-engineer-67497
10/23/2018, 5:17 PMcat BUILD.coursier-test
jar_library(
name='coursier-test',
jars=[
jar(org='com.mediarithmics.pants', name='play-gen-tools', rev='0.0.1-SNAPSHOT')
],
)
brief-engineer-67497
10/23/2018, 5:18 PM./pants --resolver-resolver=coursier --coursier-repos=/tmp/coursier -ldebug resolve //:coursier-test
failsbrief-engineer-67497
10/23/2018, 5:18 PM./pants --resolver-resolver=coursier --coursier-repos=file:/tmp/coursier -ldebug resolve //:coursier-test
is a sucessbrief-engineer-67497
10/23/2018, 5:19 PM./pants --resolver-resolver=coursier --coursier-repos=file:/tmp/coursier -ldebug compile mytarget
enough-analyst-54434
10/23/2018, 5:19 PMbrief-engineer-67497
10/23/2018, 5:19 PMjava.lang.NoClassDefFoundError: scala/collection/Seq
enough-analyst-54434
10/23/2018, 5:19 PMenough-analyst-54434
10/23/2018, 5:20 PMenough-analyst-54434
10/23/2018, 5:21 PMbrief-engineer-67497
10/23/2018, 5:21 PMbrief-engineer-67497
10/23/2018, 5:24 PM<ivysettings>
<credentials host="mediarithmics.nexus"
realm="Artifactory Realm"
username="${login}"
passwd="${password}"/>
<property name="local.ivy.pattern"
value="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
override="false" />
<property name="local.artifact.pattern"
value="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
override="false" />
<property name="web.ivy.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
override="false" />
<property name="web.artifact.pattern"
value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
override="false" />
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain" returnFirst="true">
<url name="web">
<ivy pattern="<https://mediarithmics.nexus/${web.ivy.pattern}>" />
<artifact pattern="<https://mediarithmics.nexus/${web.artifact.pattern}>" />
</url>
<url name="local" m2compatible="true" >
<ivy pattern="file:///home/lorilan/.ivy2/local/${local.ivy.pattern}" />
<artifact pattern="file:///home/lorilan/.ivy2/local/${local.artifact.pattern}" />
</url>
<ibiblio name="public" m2compatible="true" />
<!--<ivyrep name="mics-nexus" ivyroot="<https://mediarithmics.nexus>"/>-->
</chain>
</resolvers>
</ivysettings>
enough-analyst-54434
10/23/2018, 5:25 PMbrief-engineer-67497
10/23/2018, 5:25 PM[ivy]
ivy_settings: %(buildroot)s/build-support/ivysettings.xml
enough-analyst-54434
10/23/2018, 5:28 PMenough-analyst-54434
10/23/2018, 5:31 PMbrief-engineer-67497
10/23/2018, 5:32 PMbrief-engineer-67497
10/23/2018, 5:40 PMbrief-engineer-67497
10/23/2018, 5:40 PMbrief-engineer-67497
10/23/2018, 5:42 PMenough-analyst-54434
10/23/2018, 5:44 PMenough-analyst-54434
10/23/2018, 5:44 PMenough-analyst-54434
10/23/2018, 5:44 PMbrief-engineer-67497
10/23/2018, 5:51 PM