rough-dog-96241
05/07/2016, 4:38 AMrough-dog-96241
05/07/2016, 4:55 AMobject App2 {
def main(args: Array[String]): Unit = {
val loader = ClassLoader.getSystemClassLoader
println(loader.getResources("db/migration").hasMoreElements)
}
}
enough-analyst-54434
05/07/2016, 4:59 AMrough-dog-96241
05/07/2016, 5:06 AMrough-dog-96241
05/07/2016, 5:06 AMrough-dog-96241
05/07/2016, 5:06 AMrough-dog-96241
05/07/2016, 5:13 AMrough-dog-96241
05/07/2016, 5:14 AMenough-analyst-54434
05/07/2016, 5:15 AMrough-dog-96241
05/07/2016, 5:17 AMrough-dog-96241
05/07/2016, 5:19 AMrough-dog-96241
05/07/2016, 5:19 AMancient-stone-50795
05/09/2016, 4:47 PMwitty-crayon-22786
05/09/2016, 5:20 PMwitty-crayon-22786
05/09/2016, 5:22 PMIn terms of matching existing expectations, it occurs to me that the clearest way to make these "act like generated code" is to pretend that they were codegen'd, and create a synthetic target for them. It would be a bit of a re-architecture of deferred sources, but essentially, have a unpacked_sources target with a lang parameter (similar to thrift_library), and have the UnpackJars task create a synthetic target of the appropriate type paired to the unpacked_sources target.
witty-crayon-22786
05/09/2016, 5:24 PMwitty-crayon-22786
05/09/2016, 5:24 PMwitty-crayon-22786
05/09/2016, 5:24 PMwitty-crayon-22786
05/09/2016, 5:30 PMwitty-crayon-22786
05/09/2016, 5:30 PMlimited-country-20626
05/09/2016, 5:41 PM1.1.0-pre0
soonish. There were some objections to that scheme but as far as I can tell this is where we landed.limited-country-20626
05/09/2016, 5:41 PMlimited-country-20626
05/09/2016, 5:42 PMwitty-crayon-22786
05/09/2016, 5:48 PMrough-dog-96241
05/09/2016, 5:56 PMjvm_library
whose “source” is a bunch of files. A jvm_binary
lists that library as its “resources.” Is there a way to get the behavior I want?witty-crayon-22786
05/09/2016, 5:57 PMjvm_library
as a resources target. i think you'd want a resources(name=.., sources=..)
targetrough-dog-96241
05/09/2016, 5:57 PMresources(
name='resources',
sources=rglobs('*'),
followed elsewhere by jvm_binary(
name = 'bin',
dependencies = [
'services/cupid/src/main/scala:lib'
],
resources = [
'services/cupid/src/main/resources:resources'
],
main = 'com.civitaslearning.services.cupid.App',
)
witty-crayon-22786
05/09/2016, 5:58 PMrough-dog-96241
05/09/2016, 5:58 PMrough-dog-96241
05/09/2016, 5:59 PMresources
section of http://www.pantsbuild.org/build_dictionary.html that would suggest something of use.