Define a JVM Executable
If you need to specify a Scala or Java library target, see Create a New Scala or Java Library Target.
jvm_binary target definition for your project that specifies which
java_library target will be included in the binary (you can also include several).
jvm_binary target you must specify the following:
namefor the target
basenamethat will be used as the basis of the filename if you bundle the target using a
mainfunction which serves as the executable's entry point.
- A list of
dependenciesthat must include at least one
java_librarytarget. More info can be found in Add a Dependency from Source.
- A list of file
bundlesfor use as static assets (optional). More info can be found in Specify a File Bundle.
Here's an example
jvm_binary(name='bin', basename='myproject-bin', main='com.acme.myproject.Main', dependencies=[ 'server-lib/src/main/java', 'analytics-lib/src/main/java', ], bundles=[ bundle(fileset=globs('assets/*')) ] )