Hi, taking a first look at Pants. I want to conver...
# general
b
Hi, taking a first look at Pants. I want to convert an existing Maven project as an experiment. I sadly stumple on the following error: • version 2.21.0 • use of
jvm_artifacts
Copy code
Engine traceback:
  in `check` goal
  in Find targets from input specs

ValueError: missing element: {<http://maven.apache.org/POM/4.0.0}version>
It must have something todo with my pom.xml. I use the following features: • Spring Boot parent pom • version properties • dependencyManagement
I got it working by replacing the pom with its effective pom.xml
g
Recently I also stumbled with the same error
b
Still very unfamiliar with the Pants code-base. Where would I find the pom.xml parsing?
More specifically the version error comes from here https://github.com/pantsbuild/pants/blob/main/src/python/pants/jvm/target_types.py#L542 , from the call to
get_child_text
b
with PANTS_SOURCE I get
pants: Failed to find a Python 3.9 interpreter
arg 😄
c
Yea, running from source sidesteps scie-pants and thus the provided python interpreter.
c
@billowy-vegetable-62104 this is because one of your dependency in your pom.xml doesn't have version specified the error message is not very clear unfortunately
b
sry, but I’m a total Python noob. I think I have setup up Python correctly on my Mac with
brew
Copy code
❯ python --version
Python 3.12.3
❯ python3 --version
Python 3.12.3
❯ which pip
/opt/homebrew/opt/python@3.12/libexec/bin/pip
❯ which python
/opt/homebrew/opt/python@3.12/libexec/bin/python
❯ which python3
/opt/homebrew/bin/python3
any hints want I need to do. Do I need the excactly 3.9?
g
@billowy-vegetable-62104 that’s the version required for pants itself
for mac I usually recommend you pyenv, alternatively I think you can install python3.9 with
python@3.9
but… you’ll also need to install rust not sure if this is the right path to troubleshoot, the idea is to use pants with java? Or what is the original context of this error? I’m going to likely troubleshoot a bit this topic later too (had the same error, but haven’t look specifically which dependency doesn’t have a version and if it make sense that it doesn’t