https://pantsbuild.org/ logo
#general
Title
# general
h

happy-barista-11481

08/28/2019, 9:34 PM
I am running into problem with JVM build. I have a local jar in my project, and I can't seem to build the project, it can't find the jar
Copy code
jar_library(name='jar-library-name',
  jars = [
    jar(org='myorg', name='jar-library-name', rev='0.1.0',
        url='file:jar-library-name_2.11-0.1.0.jar'),
  ],
)
w

witty-crayon-22786

08/28/2019, 10:43 PM
the first thing to check is whether it can find it with an absolute jar name: ie,
file:///path/to/my/jar
if it can, then it's probably just the "relative path" syntax that is in use.
h

happy-barista-11481

08/28/2019, 11:05 PM
No, it can't find either way
w

witty-crayon-22786

08/28/2019, 11:12 PM
do you know what i mean by "absolute"?
(just confirming)
h

happy-barista-11481

08/28/2019, 11:24 PM
/root-folder/project/bleh/bleh2/I-am-a-jar.jar
the only "helpful' output I get is
Copy code
==== maven2: tried

  <https://repo1.maven.org/maven2/myorg/0.1.0/jar-library-name-0.1.0.jar>

  file:/Users/me/project/somefolder/jar-library-name_2.11-0.1.0.jar
and
ls /Users/me/project/somefolder/jar-library-name_2.11-0.1.0.jar
shows me the file
also get under warnings
Copy code
[FAILED     ] myorg#jar-library-name;0.1.0!jar-library-name.jar: no protocol: /Users/me/project/somefolder/jar-library-name_2.11-0.1.0.jar (397ms)
w

witty-crayon-22786

08/29/2019, 12:19 AM
that indicates that the url syntax is incorrect
the triple slash i used above is i think the correct syntax for an absolute path:
file:///some/absolute/path/to/a/file.jar
h

happy-barista-11481

08/29/2019, 12:19 AM
file:/
file://
file:///
I tried all
w

witty-crayon-22786

08/29/2019, 12:20 AM
and which one gave you the "no protocol" error?
h

happy-barista-11481

08/29/2019, 12:20 AM
and "file:"
let me try again (I think all gave me no protocol)
w

witty-crayon-22786

08/29/2019, 12:21 AM
also, what version of pants is this?
h

happy-barista-11481

08/29/2019, 12:21 AM
pants_version: 1.3.0
w

witty-crayon-22786

08/29/2019, 12:21 AM
...ah. that is a few years old, and probably doesn't support this syntax at all
not 100% sure though.
h

happy-barista-11481

08/29/2019, 12:22 AM
I was trying to make a fresh project per the tutorial to see what version it would give me in the ini file
but I keep running into
psutil/_psutil_osx.c:36:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
and the internets (or as it is common called intertubes) is not helping
going to try a update and reboot otherwise moving to virtualbox
installed a fresh nixos, installed python3, pip... no game
installed a fresh ubuntu, installed python2 and python3 and pip, no game
w

witty-crayon-22786

08/29/2019, 3:21 AM
which instructions are you following to install...?
note that the install script has change a bit in that time, so you probably to refresh by re-running the curl command
h

happy-barista-11481

08/29/2019, 3:44 AM
I was trying to "start a new project"
ah! Now it's moving I installed various dev libraries (for other reasons)
progress:
Copy code
$ ./pants help
PANTS VERSION 1.19.0
PANTS DIR /home/osboxes/.cache/pants/setup/bootstrap-Linux-x86_64/1.19.0_py37
PYTHON /usr/bin/python3.7
timestamp: 2019-08-29T00:40:24.060227
Exception caught: (configparser.DuplicateSectionError) (backtrace omitted)
Exception message: While reading from '<string>' [line 811]: section 'binaries' already exists
the first 3 lines I added echos in the pants script
g

gentle-wolf-58752

08/29/2019, 1:49 PM
Just as a heads up - https://pants.docsapp.io/docs/ is not the official docsite, (in case that caused some confusion, since it is a WIP project and possibly out of date for recent changes)