cool-easter-32542
11/22/2023, 2:38 PMdeploy_jar target in a subdirectory shading process throws an exception NoSuchFileException
Pants version
2.18.0
OS
Ubuntu 22.04
Additional info
`helloworld/HelloWorld.java`:
package helloworld;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
`helloworld/BUILD`:
java_sources(name="src")
`subdir/BUILD`:
deploy_jar(
name="fat",
main="helloworld.HelloWorld",
dependencies=["//helloworld:src"],
shading_rules=[
shading_keep(pattern="helloworld.**"),
],
)
It's important to put deploy_jar into a subdirectory. It works without errors if you put it into root BUILD file.
Steps to reproduce:
• pants generate-lockfiles
• pants subdir:fat
I get this:
ProcessExecutionFailure: Process 'Shading JAR subdir/fat.jar' failed with exit code 899.
...
java.nio.file.NoSuchFileException: subdir/fat.jar
...
pantsbuild/pantscool-easter-32542
12/01/2023, 11:02 PM