-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
94 lines (82 loc) · 3.65 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_test")
load("@rules_spring//springboot:springboot.bzl", "springboot")
package(default_visibility = ["//visibility:public"])
java_library(
name = "jobs-lib",
srcs = glob([
"src/main/java/org/daming/jobs/*.java",
"src/main/java/org/daming/jobs/api/advice/*.java",
"src/main/java/org/daming/jobs/api/controller/*.java",
"src/main/java/org/daming/jobs/api/interceptor/*.java",
"src/main/java/org/daming/jobs/base/*.java",
"src/main/java/org/daming/jobs/base/**/*.java",
"src/main/java/org/daming/jobs/config/**/*.java",
"src/main/java/org/daming/jobs/pojo/**/*.java",
"src/main/java/org/daming/jobs/security/**/*.java",
"src/main/java/org/daming/jobs/service/**/*.java",
"src/main/java/org/daming/jobs/task/**/*.java",
]),
resources = glob(["src/main/resources/**"]),
deps = [
"@maven//:org_springframework_boot_spring_boot_starter_web",
"@maven//:org_springframework_boot_spring_boot_starter_jdbc",
"@maven//:org_springframework_boot_spring_boot_starter_quartz",
"@maven//:org_springframework_boot_spring_boot_starter_aop",
"@maven//:io_swagger_core_v3_swagger_core_jakarta",
"@maven//:io_swagger_core_v3_swagger_annotations_jakarta",
"@maven//:io_swagger_core_v3_swagger_models_jakarta",
"@maven//:com_auth0_java_jwt",
"@maven//:org_postgresql_postgresql",
"@maven//:org_springframework_boot_spring_boot_devtools",
"@maven//:org_springframework_boot_spring_boot",
"@maven//:org_springframework_boot_spring_boot_loader",
"@maven//:org_springframework_boot_spring_boot_loader_tools",
"@maven//:org_springframework_boot_spring_boot_autoconfigure",
"@maven//:org_springframework_spring_aop",
"@maven//:org_springframework_spring_beans",
"@maven//:org_springframework_spring_core",
"@maven//:org_springframework_spring_context",
"@maven//:org_springframework_spring_expression",
"@maven//:org_springframework_spring_web",
# "@maven//:org_apache_shiro_shiro_spring_boot_starter",
"@maven//:org_apache_shiro_shiro_core_jakarta",
"@maven//:org_apache_shiro_shiro_spring_jakarta",
"@maven//:org_apache_shiro_shiro_web_jakarta",
"@maven//:org_slf4j_slf4j_api",
"@maven//:org_quartz_scheduler_quartz",
"@maven//:org_aspectj_aspectjweaver",
"@maven//:org_apache_tomcat_embed_tomcat_embed_core",
"@maven//:jakarta_servlet_jakarta_servlet_api",
"@maven//:jakarta_annotation_jakarta_annotation_api",
"@maven//:jakarta_xml_bind_jakarta_xml_bind_api",
"@maven//:com_fasterxml_jackson_core_jackson_core",
"@maven//:com_fasterxml_jackson_core_jackson_databind"
],
)
# java_binary(
# name = "jobs",
# main_class = "org.daming.jobs.JobsApplication",
# runtime_deps = [":jobs-lib"],
# deploy_manifest_lines = {
# "Main-Class": "org.daming.jobs.JobsApplication",
# },
# )
springboot(
name = "jobs",
# specify the main class
boot_app_class = "org.daming.jobs.JobsApplication",
# refrence the library
java_library = ":jobs-lib",
# https://github.com/salesforce/rules_spring/issues/177
boot_launcher_class = 'org.springframework.boot.loader.launch.JarLauncher',
)
# java_test(
# name = "tests",
# srcs = glob(["src/test/java/com/example/myproject/*.java"]),
# test_class = "com.example.myproject.TestApp",
# deps = [
# ":jobs-lib",
# "@maven//:com_google_guava_guava",
# "@maven//:junit_junit",
# ],
# )