putting them in `3rdparty/jvm` seems to work. is t...
# general
a
putting them in
3rdparty/jvm
seems to work. is there any way to specify multiple artifacts within a single
BUILD
file?
b
I struggled with this too. It seems that you can have multiple targets per BUILD file if you provide a
name
attribute in each. I also saw this pattern in some repositories:
Copy code
└── 3rdparty
    ├── jvm
        ├── junit
        |   └── junit
        |       └── BUILD
        └── google
            └── guava
                └── BUILD
a
ah I see, makes sense, thanks
b
Do you use pom.xml? If so, putting a
jvm_artifacts()
target in the BUILD file next to it also works (https://www.pantsbuild.org/prerelease/docs/jvm/java-and-scala#pomxml) Another pattern used is putting the artifacts in the closest parent of the code, e.g. if you have all the scala code in
scala/src/...
putting the 3rd party deps in
scala/BUILD
is common.
a
no I don't have a
pom.xml
, but putting it near the sources makes sense 👍