Closed DanyalFaheem closed 1 year ago
@DanyalFaheem thanks for this. Mostly works but the command above contains whitespace before the from importlib import util
, which causes IndentationError
to be raised:
File "<string>", line 1
from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")
^
IndentationError: unexpected indent
Corrected command is mvn dependency:copy-dependencies -DoutputDirectory=./jars -f $(python3 -c 'from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")')
If you have trouble running this, make sure you can run the python3 -c 'from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")'
part without issue (eg, that python3
is available and that you're in the correct environment with sutime
installed).
Thank you for that and sorry for the indentation error. I think this issue can be closed now.
For this error, I found that the python command import importlib; has an issue and throws a util not found error. Instead the command should be from importlib import util and then removing the util keyword.
The new command should be:
mvn dependency:copy-dependencies -DoutputDirectory=./jars -f $(python3 -c ' from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")')