├── .bazelci └── presubmit.yml ├── .gitignore ├── AUTHORS ├── CODEOWNERS ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── LICENSE.txt ├── README.md ├── WORKSPACE ├── example └── src │ └── main │ └── java │ └── io │ └── bazel │ └── sample │ ├── BUILD │ ├── SampleApp.gwt.xml │ ├── SampleApp.java │ ├── lib │ ├── BUILD │ └── Greeter.java │ └── public │ ├── WEB-INF │ └── web.xml │ ├── css │ └── style.css │ └── index.html └── gwt ├── BUILD └── gwt.bzl /.bazelci/presubmit.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platforms: 3 | ubuntu1804: 4 | build_targets: 5 | - "//..." 6 | macos: 7 | build_targets: 8 | - "//..." 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bazel-* 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # This the official list of Bazel authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as: 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | Google Inc. 10 | Erik Kuefler 11 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @ekuefler 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Want to contribute? Great! First, read this page (including the small print at the end). 2 | 3 | ### Before you contribute 4 | **Before we can use your code, you must sign the 5 | [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1) 6 | (CLA)**, which you can do online. 7 | 8 | The CLA is necessary mainly because you own the copyright to your changes, 9 | even after your contribution becomes part of our codebase, so we need your 10 | permission to use and distribute your code. We also need to be sure of 11 | various other things — for instance that you'll tell us if you know that 12 | your code infringes on other people's patents. You don't have to sign 13 | the CLA until after you've submitted your code for review and a member has 14 | approved it, but you must do it before we can put your code into our codebase. 15 | 16 | Before you start working on a larger contribution, you should get in touch 17 | with us first. Use the issue tracker to explain your idea so we can help and 18 | possibly guide you. 19 | 20 | ### Code reviews and other contributions. 21 | **All submissions, including submissions by project members, require review.** 22 | Please follow the instructions in [the contributors documentation](http://bazel.io/contributing.html). 23 | 24 | ### The small print 25 | Contributions made by corporations are covered by a different agreement than 26 | the one above, the 27 | [Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). 28 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # People who have agreed to one of the CLAs and can contribute patches. 2 | # The AUTHORS file lists the copyright holders; this file 3 | # lists people. For example, Google employees are listed here 4 | # but not in AUTHORS, because Google holds the copyright. 5 | # 6 | # https://developers.google.com/open-source/cla/individual 7 | # https://developers.google.com/open-source/cla/corporate 8 | # 9 | # Names should be added to this file as: 10 | # Name 11 | 12 | Erik Kuefler 13 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build status](https://badge.buildkite.com/098023d2f6cea6cc1d8645e99d8924901284b5551b6eb55bd2.svg)](https://buildkite.com/bazel/rules-gwt-postsubmit) 2 | 3 | # 📣 [Unmaintained] GWT Rules for Bazel 4 | 5 | > [!WARNING] 6 | > Due to an absence of any maintainers, this repository is archived and currently unmaintained. 7 | > 8 | > **We discourage any new dependencies on the contents of this repository.** 9 | > 10 | > If you, or your organization, are interested in revitalizing this project by taking over its maintenance, we welcome your initiative. 11 | > To discuss the process of un-archiving and assuming ownership of this repository, please reach out to us via email at `bazel-contrib@googlegroups.com` or join the conversation on our Slack workspace in the `#rules` channel. 12 | > You can sign up for Slack access at [https://slack.bazel.build](https://slack.bazel.build). 13 | 14 |
15 |

Rules

16 | 19 |
20 | 21 | ## Overview 22 | 23 | These build rules are used for building [GWT](http://www.gwtproject.org/) 24 | applications with Bazel. Applications are compiled as `.war` files containing 25 | compiled JavaScript and other resources. GWT applications can also be run in 26 | [Development Mode](http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html) 27 | via `bazel run`. 28 | 29 | 30 | ## Setup 31 | 32 | To be able to use the GWT rules, you must provide bindings for the GWT jars and 33 | everything it depends on. The easiest way to do so is to add the following to 34 | your `WORKSPACE` file, which will give you default versions for GWT and each 35 | dependency: 36 | 37 | ```python 38 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 39 | http_archive( 40 | name = "io_bazel_rules_gwt", 41 | url = "https://github.com/bazelbuild/rules_gwt/archive/0.1.3.tar.gz", 42 | sha256 = "3f017bd2f7734e259535da0bcc75398b883dda6da6b657dfa84bd02fab0a6916", 43 | strip_prefix = "rules_gwt-0.1.3", 44 | ) 45 | load("@io_bazel_rules_gwt//gwt:gwt.bzl", "gwt_repositories") 46 | gwt_repositories() 47 | ``` 48 | 49 | If you want to use a different version of GWT or any of its dependencies, you 50 | must provide your own bindings. Remove the `gwt_repositories()` line above and 51 | add a `bind` rule for each of the following in your `WORKSPACE`: 52 | 53 | * `//external:gwt-dev` (defaults to [`com.google.gwt:gwt-dev:2.8.0`](https://mvnrepository.com/artifact/com.google.gwt/gwt-dev/2.8.0)) 54 | * `//external:gwt-user` (defaults to [`com.google.gwt:gwt-user:2.8.0`](https://mvnrepository.com/artifact/com.google.gwt/gwt-user/2.8.0)) 55 | * `//external:gwt_ant` (defaults to [`org.apache.ant:ant:1.9.7`](https://mvnrepository.com/artifact/org.apache.ant/ant/1.9.7)) 56 | * `//external:gwt_asm` (defaults to [`org.ow2.asm:asm:5.0.3`](https://mvnrepository.com/artifact/org.ow2.asm/asm/5.0.3)) 57 | * `//external:gwt_colt` (defaults to [`colt:colt:1.2.0`](https://mvnrepository.com/artifact/colt/colt/1.2.0)) 58 | * `//external:gwt_commons-io` (defaults to [`commons-io:commons-io:2.4`](https://mvnrepository.com/artifact/commons-io/commons-io/2.4)) 59 | * `//external:gwt_gson` (defaults to [`com.google.code.gson:gson:2.6.2`](https://mvnrepository.com/artifact/com.google.code.gson/gson/2.6.2)) 60 | * `//external:gwt_javax-servlet` (defaults to [`javax.servlet:javax.servlet-api:3.1.0`](https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api/3.1.0)) 61 | * `//external:gwt_javax-validation` (defaults to [`javax.validation:validation-api:1.0.0.GA`](https://mvnrepository.com/artifact/javax.validation/validation-api/1.0.0.GA)) 62 | * `//external:gwt_java-validation-src` (defaults to [`javax.validation:validation-api:sources:1.0.0.GA`](https://mvnrepository.com/artifact/javax.validation/validation-api/1.0.0.GA)) 63 | * `//external:gwt_jetty-annotations` (defaults to [`org.eclipse.jetty:jetty-annotations:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-annotations/9.2.14.v20151106)) 64 | * `//external:gwt_jetty-http` (defaults to [`org.eclipse.jetty:jetty-http:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-http/9.2.14.v20151106)) 65 | * `//external:gwt_jetty-io` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-io/9.2.14.v20151106)) 66 | * `//external:gwt_jetty-jndi` (defaults to [`org.eclipse.jetty:jetty-jndi:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-jndi/9.2.14.v20151106)) 67 | * `//external:gwt_jetty-plus` (defaults to [`org.eclipse.jetty:jetty-plus:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-plus/9.2.14.v20151106)) 68 | * `//external:gwt_jetty-security` (defaults to [`org.eclipse.jetty:jetty-security:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-security/9.2.14.v20151106)) 69 | * `//external:gwt_jetty-server` (defaults to [`org.eclipse.jetty:jetty-server:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-server/9.2.14.v20151106)) 70 | * `//external:gwt_jetty-servlet` (defaults to [`org.eclipse.jetty:jetty-servlet:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlet/9.2.14.v20151106)) 71 | * `//external:gwt_jetty-servlets` (defaults to [`org.eclipse.jetty:jetty-servlets:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets/9.2.14.v20151106)) 72 | * `//external:gwt_jetty-util` (defaults to [`org.eclipse.jetty:jetty-util:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util/9.2.14.v20151106)) 73 | * `//external:gwt_jetty-webapp` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-webapp/9.2.14.v20151106)) 74 | * `//external:gwt_jetty-xml` (defaults to [`org.eclipse.jetty:jetty-io:9.2.14.v20151106`](https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-xml/9.2.14.v20151106)) 75 | * `//external:gwt_jsinterop` (defaults to [`com.google.jsinterop:jsinterop-annotations:1.0.0`](https://mvnrepository.com/artifact/com.google.jsinterop/jsinterop-annotations/1.0.0)) 76 | * `//external:gwt_jsinterop-src` (defaults to [`com.google.jsinterop:jsinterop-annotations:sources:1.0.0`](https://mvnrepository.com/artifact/com.google.jsinterop/jsinterop-annotations/1.0.0)) 77 | * `//external:gwt_jsr-250-api` (defaults to [`javax.annotation:jsr250-api:1.0`](https://mvnrepository.com/artifact/javax.annotation/jsr250-api/1.0)) 78 | * `//external:gwt_sac` (defaults to [`org.w3c.css:sac:1.3`](https://mvnrepository.com/artifact/org.w3c.css/sac/1.3)) 79 | * `//external:gwt_tapestry` (defaults to [`tapestry:tapestry:4.0.2`](https://mvnrepository.com/artifact/tapestry/tapestry/4.0.2)) 80 | 81 | 82 | ## Basic Example 83 | 84 | Suppose you have the following directory structure for a simple GWT application: 85 | 86 | ``` 87 | [workspace]/ 88 | WORKSPACE 89 | src/main/java/ 90 | app/ 91 | BUILD 92 | MyApp.java 93 | MyApp.gwt.xml 94 | lib/ 95 | BUILD 96 | MyLib.java 97 | public/ 98 | index.html 99 | ``` 100 | 101 | Here, `MyApp.java` defines the entry point to a GWT application specified by 102 | `MyApp.gwt.xml` which depends on another Java library `MyLib.java`. `index.html` 103 | defines the HTML page that links in the GWT application. To build this app, your 104 | `src/main/java/app/BUILD` can look like this: 105 | 106 | ```python 107 | load("@io_bazel_rules_gwt//gwt:gwt.bzl", "gwt_application") 108 | 109 | gwt_application( 110 | name = "MyApp", 111 | srcs = glob(["*.java"]), 112 | resources = glob(["*.gwt.xml"]), 113 | modules = ["app.MyApp"], 114 | pubs = glob(["public/*"]), 115 | deps = [ 116 | "//src/main/java/lib", 117 | ], 118 | ) 119 | ``` 120 | 121 | Now, you can build the GWT application by running 122 | `bazel build src/main/java/app:MyApp`. This will run the GWT compiler and place 123 | all of its output as well as `index.html` into 124 | `bazel-bin/src/main/java/app/MyApp.war`. You can also run 125 | `bazel run src/main/java/app:MyApp-dev` to run GWT development mode for the 126 | application. Once development mode has started, you can see the app by opening 127 | http://127.0.0.1:8888/index.html in a browser. Note that development mode assumes 128 | that all of your `.java` files are located under `java/` or `src/main/java/` - see 129 | details on the `java_roots` flag below if this is not the case. 130 | 131 | For a complete example, see the 132 | [`example/`](https://github.com/bazelbuild/rules_gwt/tree/master/example/src/main/java/io/bazel/sample) 133 | directory in this repository. 134 | 135 | 136 | ## gwt_application 137 | 138 | ```python 139 | gwt_application(name, srcs, resources, modules, pubs, deps, output_root, java_roots, compiler_flags, compiler_jvm_flags, dev_flags, dev_jvm_flags): 140 | ``` 141 | 142 | ### Implicit output targets 143 | 144 | * `.war`: archive containing GWT compiler output and any files passed 145 | in via pubs. 146 | * `-dev`: script that can be run via `bazel run` to launch the app in 147 | development mode. 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 166 | 167 | 168 | 169 | 176 | 177 | 178 | 179 | 187 | 188 | 189 | 190 | 198 | 199 | 200 | 201 | 208 | 209 | 210 | 211 | 221 | 222 | 223 | 224 | 231 | 232 | 233 | 234 | 247 | 248 | 249 | 250 | 258 | 259 | 260 | 261 | 268 | 269 | 270 | 271 | 279 | 280 | 281 | 282 | 289 | 290 | 291 |
Attributes
name 163 | Name, required 164 |

A unique name for this rule.

165 |
srcs 170 | List of labels, optional 171 |

172 | List of .java source files that will be compiled and passed on the 173 | classpath to the GWT compiler. 174 |

175 |
resources 180 | List of labels, optional 181 |

182 | List of resource files that will be passed on the classpath to the GWT 183 | compiler, e.g. .gwt.xml, .ui.xml, and 184 | .css files. 185 |

186 |
modules 191 | List of strings, required 192 |

193 | List of fully-qualified names of modules that will be passed to the GWT 194 | compiler. Usually contains a single module name corresponding to the 195 | application's .gwt.xml file. 196 |

197 |
pubs 202 | List of labels, optional 203 |

204 | Files that will be copied directly to the output war, such as static 205 | HTML or image resources. Not interpreted by the GWT compiler. 206 |

207 |
deps 212 | List of labels, optional 213 |

214 | List of other java_libraries on which the application depends. Both the 215 | class jars and the source jars corresponding to each library as well as 216 | their transitive dependencies will be passed to the GWT compiler's 217 | classpath. These libraries may contain other .gwt.xml, 218 | .ui.xml, etc. files as resources. 219 |

220 |
output_root 225 | String, optional 226 |

227 | Directory in the output war in which all outputs will be placed. By 228 | default outputs are placed at the root of the war file. 229 |

230 |
java_roots 235 | List of strings, optional 236 |

237 | Directories relative to the workspace root that form roots of the 238 | Java package hierarchy (e.g. they contain com directories). 239 | By default this includes java, javatests, 240 | src/main/java and src/test/java. If your Java 241 | files aren't under these directories, you must set this property in order 242 | for development mode to work correctly. Otherwise GWT won't be able to 243 | see your source files, so you will not see any changes reflected when 244 | refreshing dev mode. 245 |

246 |
compiler_flags 251 | List of strings, optional 252 |

253 | Additional flags that will be passed to the GWT compiler. See 254 | here 255 | for a list of available flags. 256 |

257 |
compiler_jvm_flags 262 | List of strings, optional 263 |

264 | Additional JVM flags that will be passed to the GWT compiler, such as 265 | -Xmx4G to increase the amount of available memory. 266 |

267 |
dev_flags 272 | List of strings, optional 273 |

274 | Additional flags that will be passed to development mode. See 275 | here 276 | for a list of available flags. 277 |

278 |
dev_jvm_flags 283 | List of strings, optional 284 |

285 | Additional JVM flags that will be passed to development mode, such as 286 | -Xmx4G to increase the amount of available memory. 287 |

288 |
292 | -------------------------------------------------------------------------------- /WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "io_bazel_rules_gwt") 2 | 3 | load("//gwt:gwt.bzl", "gwt_repositories") 4 | gwt_repositories() 5 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/BUILD: -------------------------------------------------------------------------------- 1 | load("@io_bazel_rules_gwt//gwt:gwt.bzl", "gwt_application") 2 | 3 | # Use gwt_application to define your app. It will generate two targets: you can 4 | # run `bazel build` on `SampleApp` to create a .war file containing the compiled 5 | # application, or you can run `bazel run` on `SampleApp-dev` to run development 6 | # mode for your application. 7 | gwt_application( 8 | # Name of the build target. Required. 9 | name = "SampleApp", 10 | 11 | # Source files to include when running the GWT compiler. A jar is created 12 | # with these files (along with any specified by resources) and included on 13 | # the classpath during compilation. These are optional here, you don't need 14 | # to include them if all the sources you need exist in other deps. 15 | srcs = glob(["*.java"]), 16 | 17 | # Optional flags to pass to the GWT compiler and to dev mode. See 18 | # http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html for 19 | # more details. 20 | compiler_flags = [ 21 | "-strict", 22 | "-sourceLevel 1.8", 23 | ], 24 | compiler_jvm_flags = [ 25 | "-Xmx1G", 26 | ], 27 | dev_flags = [ 28 | "-logLevel DEBUG", 29 | ], 30 | dev_jvm_flags = [ 31 | "-Xmx1G", 32 | ], 33 | 34 | # Roots of the Java package hierarchy (which usually contains a top-level 35 | # package like "com"), relative to the root of the workspace (the directory 36 | # containing the WORKSPACE file). By default, the roots include "java", 37 | # "javatests", "src/main/java", and "src/test/java". If your java files 38 | # aren't under one of these directories (which is the case in this example), 39 | # you must set this attribute for dev mode to function correctly. 40 | java_roots = ["example/src/main/java"], 41 | 42 | # Name of the GWT modules to be compiled, which should correspond to .gwt.xml 43 | # files. At least one is required. 44 | modules = ["io.bazel.sample.SampleApp"], 45 | 46 | # Files that should be copied directly into the output war, like a static html 47 | # page that bootstraps the GWT app. Optional. 48 | pubs = glob(["public/*"], exclude_directories = 0), 49 | 50 | # Resources to include on the classpath when running the GWT compiler. Make 51 | # sure to include your .gwt.xml file and any other resources (e.g. css or 52 | # .ui.xml files). These are optional and don't need to be included here if 53 | # the files you need exist in other deps. 54 | resources = glob(["*.gwt.xml"]), 55 | 56 | # java_libraries that will be included on the classpath when running the GWT 57 | # compiler. Can contain java classes and resource files. 58 | deps = [ 59 | "//example/src/main/java/io/bazel/sample/lib", 60 | ], 61 | ) 62 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/SampleApp.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/SampleApp.java: -------------------------------------------------------------------------------- 1 | package io.bazel.sample; 2 | 3 | import com.google.gwt.core.client.EntryPoint; 4 | import io.bazel.sample.lib.Greeter; 5 | 6 | /** 7 | * A simple app that displays "Hello world" in an alert when the page loads. 8 | */ 9 | public class SampleApp implements EntryPoint { 10 | @Override 11 | public void onModuleLoad() { 12 | Greeter.greet(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/lib/BUILD: -------------------------------------------------------------------------------- 1 | # Some other Java library that the GWT application depends on. This library might 2 | # or might not have been created with GWT in mind, but if you want to use GWT 3 | # classes you should probably depend on "//external:gwt-user". 4 | java_library( 5 | name = "lib", 6 | srcs = glob(["*.java"]), 7 | visibility = ["//visibility:public"], 8 | deps = [ 9 | "//external:gwt-user", 10 | ], 11 | ) 12 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/lib/Greeter.java: -------------------------------------------------------------------------------- 1 | package io.bazel.sample.lib; 2 | 3 | import com.google.gwt.user.client.Window; 4 | 5 | /** 6 | * An external linrary that the main GWT application depends on. 7 | */ 8 | public class Greeter { 9 | public static void greet() { 10 | Window.alert("Hello world!"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/public/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/public/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #aaa 3 | } 4 | -------------------------------------------------------------------------------- /example/src/main/java/io/bazel/sample/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gwt/BUILD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bazelbuild/rules_gwt/a7563213b9bbc80063a6daf2468109c9c57bc935/gwt/BUILD -------------------------------------------------------------------------------- /gwt/gwt.bzl: -------------------------------------------------------------------------------- 1 | """GWT Rules 2 | 3 | Skylark rules for building [GWT](http://www.gwtproject.org/) applications using 4 | Bazel. 5 | """ 6 | 7 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar") 8 | load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") 9 | 10 | def _gwt_war_impl(ctx): 11 | output_war = ctx.outputs.output_war 12 | output_dir = output_war.path + ".gwt_output" 13 | extra_dir = output_war.path + ".extra" 14 | 15 | # Find all transitive dependencies 16 | all_deps = _get_dep_jars(ctx) 17 | 18 | # Run the GWT compiler 19 | cmd = "%s %s -cp %s com.google.gwt.dev.Compiler -war %s -deploy %s -extra %s %s %s\n" % ( 20 | ctx.executable._java.path, 21 | " ".join(ctx.attr.jvm_flags), 22 | ":".join([dep.path for dep in all_deps.to_list()]), 23 | output_dir + "/" + ctx.attr.output_root, 24 | output_dir + "/" + "WEB-INF/deploy", 25 | extra_dir, 26 | " ".join(ctx.attr.compiler_flags), 27 | " ".join(ctx.attr.modules), 28 | ) 29 | 30 | # Copy pubs into the output war 31 | if len(ctx.files.pubs) > 0: 32 | cmd += "cp -LR %s %s\n" % ( 33 | " ".join([pub.path for pub in ctx.files.pubs]), 34 | output_dir, 35 | ) 36 | 37 | # Don't include the unit cache in the output 38 | cmd += "rm -rf %s/gwt-unitCache\n" % output_dir 39 | 40 | # Discover all of the generated files and write their paths to a file. Run the 41 | # paths through sed to trim out everything before the package root so that the 42 | # paths match how they should look in the war file. 43 | cmd += "find %s -type f | sed 's:^%s/::' > file_list\n" % ( 44 | output_dir, 45 | output_dir, 46 | ) 47 | 48 | # Create a war file using the discovered paths 49 | cmd += "root=`pwd`\n" 50 | cmd += "cd %s; $root/%s Cc ../%s @$root/file_list\n" % ( 51 | output_dir, 52 | ctx.executable._zip.path, 53 | output_war.basename, 54 | ) 55 | cmd += "cd $root\n" 56 | 57 | # Execute the command 58 | ctx.actions.run_shell( 59 | inputs = ctx.files.pubs + all_deps.to_list() + ctx.files._jdk, 60 | tools = ctx.files._zip, 61 | outputs = [output_war], 62 | mnemonic = "GwtCompile", 63 | progress_message = "GWT compiling " + output_war.short_path, 64 | command = "set -e\n" + cmd, 65 | ) 66 | 67 | _gwt_war = rule( 68 | implementation = _gwt_war_impl, 69 | attrs = { 70 | "deps": attr.label_list(allow_files = [".jar"]), 71 | "pubs": attr.label_list(allow_files = True), 72 | "modules": attr.string_list(mandatory = True), 73 | "output_root": attr.string(default = "."), 74 | "compiler_flags": attr.string_list(), 75 | "jvm_flags": attr.string_list(), 76 | "_java": attr.label( 77 | default = Label("@local_jdk//:bin/java"), 78 | executable = True, 79 | cfg = "host", 80 | allow_single_file = True, 81 | ), 82 | "_jdk": attr.label( 83 | default = Label("@bazel_tools//tools/jdk:current_java_runtime"), 84 | ), 85 | "_zip": attr.label( 86 | default = Label("@bazel_tools//tools/zip:zipper"), 87 | executable = True, 88 | cfg = "host", 89 | allow_single_file = True, 90 | ), 91 | }, 92 | outputs = { 93 | "output_war": "%{name}.war", 94 | }, 95 | ) 96 | 97 | def _gwt_dev_impl(ctx): 98 | # Find all transitive dependencies that need to go on the classpath 99 | all_deps = _get_dep_jars(ctx) 100 | 101 | # TODO: to avoid flattening the depset, use ctx.actions.args 102 | dep_paths = [dep.short_path for dep in all_deps.to_list()] 103 | cmd = "#!/bin/bash\n\n" 104 | 105 | # Copy pubs to the war directory 106 | cmd += "rm -rf war\nmkdir war\ncp -LR %s war\n" % ( 107 | " ".join([pub.path for pub in ctx.files.pubs]), 108 | ) 109 | 110 | # Set up a working directory for dev mode 111 | cmd += "mkdir -p dev-workdir\n" 112 | 113 | # Determine the root directory of the package hierarchy. This needs to be on 114 | # the classpath for GWT to see changes to source files. 115 | cmd += 'echo "Dev mode working directoy is $(pwd)"\n' 116 | cmd += 'javaRoots=("%s")\n' % '" "'.join(ctx.attr.java_roots) 117 | cmd += "srcClasspath=''\n" 118 | cmd += "for root in ${javaRoots[@]}; do\n" 119 | cmd += " rootDir=$(pwd | sed -e 's:\\(.*\\)%s.*:\\1:')../../../$root\n" % (ctx.attr.package_name) 120 | cmd += " if [ -d $rootDir ]; then\n" 121 | cmd += " srcClasspath+=:$rootDir\n" 122 | cmd += ' echo "Using Java sources rooted at $rootDir"\n' 123 | cmd += " else\n" 124 | cmd += ' echo "No Java sources found under $rootDir"\n' 125 | cmd += " fi\n" 126 | cmd += "done\n" 127 | 128 | # Run dev mode 129 | cmd += "java %s -cp $srcClasspath:%s com.google.gwt.dev.DevMode -war %s -workDir ./dev-workdir %s %s\n" % ( 130 | " ".join(ctx.attr.jvm_flags), 131 | ":".join(dep_paths), 132 | "war/" + ctx.attr.output_root, 133 | " ".join(ctx.attr.dev_flags), 134 | " ".join(ctx.attr.modules), 135 | ) 136 | 137 | # Return the script and all dependencies needed to run it 138 | ctx.actions.write( 139 | output = ctx.outputs.executable, 140 | content = cmd, 141 | ) 142 | return struct( 143 | executable = ctx.outputs.executable, 144 | runfiles = ctx.runfiles(files = all_deps.to_list() + ctx.files.pubs), 145 | ) 146 | 147 | _gwt_dev = rule( 148 | implementation = _gwt_dev_impl, 149 | attrs = { 150 | "package_name": attr.string(mandatory = True), 151 | "java_roots": attr.string_list(mandatory = True), 152 | "deps": attr.label_list(mandatory = True, allow_files = [".jar"]), 153 | "modules": attr.string_list(mandatory = True), 154 | "pubs": attr.label_list(allow_files = True), 155 | "output_root": attr.string(default = "."), 156 | "dev_flags": attr.string_list(), 157 | "jvm_flags": attr.string_list(), 158 | }, 159 | executable = True, 160 | ) 161 | 162 | def _get_dep_jars(ctx): 163 | all_deps = depset(ctx.files.deps) 164 | for this_dep in ctx.attr.deps: 165 | if hasattr(this_dep, "java"): 166 | all_deps += this_dep.java.transitive_runtime_deps 167 | all_deps += this_dep.java.transitive_source_jars 168 | return all_deps 169 | 170 | def gwt_application( 171 | name, 172 | srcs = [], 173 | resources = [], 174 | modules = [], 175 | pubs = [], 176 | deps = [], 177 | visibility = [], 178 | output_root = ".", 179 | java_roots = ["java", "javatests", "src/main/java", "src/test/java"], 180 | compiler_flags = [], 181 | compiler_jvm_flags = [], 182 | dev_flags = [], 183 | dev_jvm_flags = []): 184 | """Builds a .war file and a development mode target for a GWT application. 185 | 186 | This rule runs the GWT compiler to generate .war, which will contain all 187 | output generated by the compiler as well as the files specified in pubs. It 188 | also defines the -war implicit output target, which can be executed via 189 | bazel run to launch the app in development mode. 190 | 191 | Args: 192 | name: A unique name for this rule. 193 | srcs: List of .java source files that will be compiled and passed on the 194 | classpath to the GWT compiler. 195 | resources: List of resource files that will be passed on the classpath to the 196 | GWT compiler, e.g. .gwt.xml, .ui.xml, and .css files. 197 | modules: List of fully-qualified names of modules that will be passed to the 198 | GWT compiler. Usually contains a single module name corresponding to the 199 | application's .gwt.xml file. 200 | pubs: Files that will be copied directly to the output war, such as static 201 | HTML or image resources. Not interpretted by the GWT compiler. 202 | deps: List of other java_libraries on which the application depends. Both the 203 | class jars and the source jars corresponding to each library as well as 204 | their transitive dependencies will be passed to the GWT compiler's 205 | classpath. These libraries may contain other .gwt.xml, .ui.xml, etc. files 206 | as resources. 207 | visibility: The visibility of this rule. 208 | output_root: Directory in the output war in which all outputs will be placed. 209 | By default outputs are placed at the root of the war file. 210 | java_roots: Directories relative to the workspace root that form roots of the 211 | Java package hierarchy (e.g. they contain `com` directories). By default 212 | this includes "java", "javatests", "src/main/java" and "src/test/java". If 213 | your Java files aren't under these directories, you must set this property 214 | in order for development mode to work correctly. Otherwise GWT won't be 215 | able to see your source files, so you will not see any changes reflected 216 | when refreshing dev mode. 217 | compiler_flags: Additional flags that will be passed to the GWT compiler. 218 | compiler_jvm_flags: Additional JVM flags that will be passed to the GWT 219 | compiler, such as `-Xmx4G` to increase the amount of available memory. 220 | dev_flags: Additional flags that will be passed to development mode. 221 | dev_jvm_flags: Additional JVM flags that will be passed to development mode, 222 | such as `-Xmx4G` to increase the amount of available memory. 223 | """ 224 | 225 | # Create a dummy java_binary to generate a deploy jar containing all transtive 226 | # deps and srcs. We have to do this instead of passing the transitive jars on 227 | # th classpath directly, since in large projects the classpath length could 228 | # exceed the maximum command-line length accepted by the OS. 229 | all_deps = deps + [ 230 | "//external:gwt-dev", 231 | "//external:gwt-user", 232 | "//external:gwt_ant", 233 | "//external:gwt_asm", 234 | "//external:gwt_colt", 235 | "//external:gwt_commons-io", 236 | "//external:gwt_gson", 237 | "//external:gwt_javax-servlet", 238 | "//external:gwt_javax-validation", 239 | "//external:gwt_javax-validation-src", 240 | "//external:gwt_jetty-annotations", 241 | "//external:gwt_jetty-http", 242 | "//external:gwt_jetty-io", 243 | "//external:gwt_jetty-jndi", 244 | "//external:gwt_jetty-plus", 245 | "//external:gwt_jetty-security", 246 | "//external:gwt_jetty-server", 247 | "//external:gwt_jetty-servlet", 248 | "//external:gwt_jetty-servlets", 249 | "//external:gwt_jetty-util", 250 | "//external:gwt_jetty-webapp", 251 | "//external:gwt_jetty-xml", 252 | "//external:gwt_jsinterop", 253 | "//external:gwt_jsinterop-src", 254 | "//external:gwt_jsr-250-api", 255 | "//external:gwt_sac", 256 | "//external:gwt_tapestry", 257 | ] 258 | if len(srcs) > 0: 259 | native.java_binary( 260 | name = name + "-deps", 261 | main_class = name, 262 | resources = resources, 263 | srcs = srcs, 264 | deps = all_deps, 265 | ) 266 | else: 267 | native.java_binary( 268 | name = name + "-deps", 269 | main_class = name, 270 | resources = resources, 271 | runtime_deps = all_deps, 272 | ) 273 | 274 | # Create the war and dev mode targets 275 | _gwt_war( 276 | name = name, 277 | output_root = output_root, 278 | deps = [ 279 | name + "-deps_deploy.jar", 280 | name + "-deps_deploy-src.jar", 281 | ], 282 | modules = modules, 283 | visibility = visibility, 284 | pubs = pubs, 285 | compiler_flags = compiler_flags, 286 | jvm_flags = compiler_jvm_flags, 287 | ) 288 | _gwt_dev( 289 | name = name + "-dev", 290 | java_roots = java_roots, 291 | output_root = output_root, 292 | package_name = native.package_name(), 293 | deps = [ 294 | name + "-deps_deploy.jar", 295 | name + "-deps_deploy-src.jar", 296 | ], 297 | modules = modules, 298 | visibility = visibility, 299 | pubs = pubs, 300 | dev_flags = dev_flags, 301 | jvm_flags = dev_jvm_flags, 302 | ) 303 | 304 | def gwt_repositories(): 305 | jvm_maven_import_external( 306 | name = "gwt_ant_artifact", 307 | artifact = "org.apache.ant:ant:1.9.7", 308 | artifact_sha256 = "9a5dbe3f5f2cb91854c8682cab80178afa412ab35a5ab718bf39ce01b3435d93", 309 | server_urls = ["https://repo1.maven.org/maven2"], 310 | licenses = ["notice"], # Apache 2.0 License 311 | ) 312 | jvm_maven_import_external( 313 | name = "gwt_asm_artifact", 314 | artifact = "org.ow2.asm:asm:5.0.3", 315 | artifact_sha256 = "71c4f78e437b8fdcd9cc0dfd2abea8c089eb677005a6a5cff320206cc52b46cc", 316 | server_urls = ["https://repo1.maven.org/maven2"], 317 | licenses = ["notice"], # BSD License 318 | ) 319 | jvm_maven_import_external( 320 | name = "gwt_colt_artifact", 321 | artifact = "colt:colt:1.2.0", 322 | artifact_sha256 = "e1fcbfbdd0d0caedadfb59febace5a62812db3b9425f3a03ef4c4cbba3ed0ee3", 323 | server_urls = ["https://repo1.maven.org/maven2"], 324 | licenses = ["unencumbered"], # No License 325 | ) 326 | jvm_maven_import_external( 327 | name = "gwt_commons_io_artifact", 328 | artifact = "commons-io:commons-io:2.4", 329 | artifact_sha256 = "cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581", 330 | server_urls = ["https://repo1.maven.org/maven2"], 331 | licenses = ["notice"], # Apache 2.0 License 332 | ) 333 | jvm_maven_import_external( 334 | name = "gwt_dev_artifact", 335 | artifact = "com.google.gwt:gwt-dev:2.8.0", 336 | artifact_sha256 = "8fc95f97b36568a087580f7c449f5bd698229a1d05942b041a514bb85ae97304", 337 | server_urls = ["https://repo1.maven.org/maven2"], 338 | licenses = ["unencumbered"], # No License 339 | ) 340 | jvm_maven_import_external( 341 | name = "gwt_gson_artifact", 342 | artifact = "com.google.code.gson:gson:2.6.2", 343 | artifact_sha256 = "b8545ba775f641f8bba86027f06307152279fee89a46a4006df1bf2f874d4d9d", 344 | server_urls = ["https://repo1.maven.org/maven2"], 345 | licenses = ["notice"], # Apache 2.0 License 346 | ) 347 | jvm_maven_import_external( 348 | name = "gwt_javax_servlet_artifact", 349 | artifact = "javax.servlet:javax.servlet-api:3.1.0", 350 | artifact_sha256 = "af456b2dd41c4e82cf54f3e743bc678973d9fe35bd4d3071fa05c7e5333b8482", 351 | server_urls = ["https://repo1.maven.org/maven2"], 352 | licenses = ["reciprocal"], # CDDL License 353 | ) 354 | jvm_maven_import_external( 355 | name = "gwt_javax_validation_artifact", 356 | artifact = "javax.validation:validation-api:1.0.0.GA", 357 | artifact_sha256 = "e459f313ebc6db2483f8ceaad39af07086361b474fa92e40f442e8de5d9895dc", 358 | server_urls = ["https://repo1.maven.org/maven2"], 359 | licenses = ["notice"], # Apache 2.0 License 360 | ) 361 | http_jar( 362 | name = "gwt_javax_validation_sources_artifact", 363 | url = "https://repo1.maven.org/maven2/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar", 364 | sha256 = "a394d52a9b7fe2bb14f0718d2b3c8308ffe8f37e911956012398d55c9f9f9b54", 365 | ) 366 | jvm_maven_import_external( 367 | name = "gwt_jetty_annotations_artifact", 368 | artifact = "org.eclipse.jetty:jetty-annotations:9.2.14.v20151106", 369 | artifact_sha256 = "d2e7774a3a15d6169d728c7f42b0e2b8a6dd3ed77dc776a2352e7a5b9b5f3a6b", 370 | server_urls = ["https://repo1.maven.org/maven2"], 371 | licenses = ["notice"], # Apache 2.0 License 372 | ) 373 | jvm_maven_import_external( 374 | name = "gwt_jetty_http_artifact", 375 | artifact = "org.eclipse.jetty:jetty-http:9.2.14.v20151106", 376 | artifact_sha256 = "635e5912cb14dfaefdf8fc7369fe96baa8d888b691a00290603d8bda41b80d61", 377 | server_urls = ["https://repo1.maven.org/maven2"], 378 | licenses = ["notice"], # Apache 2.0 License 379 | ) 380 | jvm_maven_import_external( 381 | name = "gwt_jetty_io_artifact", 382 | artifact = "org.eclipse.jetty:jetty-io:9.2.14.v20151106", 383 | artifact_sha256 = "16f2d49f497e5e42c92d96618adee2626af5ba1ac927589529b6fd9a92266d3a", 384 | server_urls = ["https://repo1.maven.org/maven2"], 385 | licenses = ["notice"], # Apache 2.0 License 386 | ) 387 | jvm_maven_import_external( 388 | name = "gwt_jetty_jndi_artifact", 389 | artifact = "org.eclipse.jetty:jetty-jndi:9.2.14.v20151106", 390 | artifact_sha256 = "9181d263612c457437d6f7e8470588eed862cdf1f08eec808d6577503bec5653", 391 | server_urls = ["https://repo1.maven.org/maven2"], 392 | licenses = ["notice"], # Apache 2.0 License 393 | ) 394 | jvm_maven_import_external( 395 | name = "gwt_jetty_plus_artifact", 396 | artifact = "org.eclipse.jetty:jetty-plus:9.2.14.v20151106", 397 | artifact_sha256 = "6c2c574507c693ad76fde1500b9090baccf346313ed342d98c4104234149bdf8", 398 | server_urls = ["https://repo1.maven.org/maven2"], 399 | licenses = ["notice"], # Apache 2.0 License 400 | ) 401 | jvm_maven_import_external( 402 | name = "gwt_jetty_security_artifact", 403 | artifact = "org.eclipse.jetty:jetty-security:9.2.14.v20151106", 404 | artifact_sha256 = "1810b2395f6f0717aef296c6c2d6f9504deb2076ef68b3312e1644c0b9cc3921", 405 | server_urls = ["https://repo1.maven.org/maven2"], 406 | licenses = ["notice"], # Apache 2.0 License 407 | ) 408 | jvm_maven_import_external( 409 | name = "gwt_jetty_server_artifact", 410 | artifact = "org.eclipse.jetty:jetty-server:9.2.14.v20151106", 411 | artifact_sha256 = "bedeec57bccd1680c8ec71ea0071d4e6946fd8152668b69ab753b34729993e8b", 412 | server_urls = ["https://repo1.maven.org/maven2"], 413 | licenses = ["notice"], # Apache 2.0 License 414 | ) 415 | jvm_maven_import_external( 416 | name = "gwt_jetty_servlet_artifact", 417 | artifact = "org.eclipse.jetty:jetty-servlet:9.2.14.v20151106", 418 | artifact_sha256 = "ac13cca38e1541647a2fbe726a871dc5c22a757c0d8900c08d77302e414a725f", 419 | server_urls = ["https://repo1.maven.org/maven2"], 420 | licenses = ["notice"], # Apache 2.0 License 421 | ) 422 | jvm_maven_import_external( 423 | name = "gwt_jetty_servlets_artifact", 424 | artifact = "org.eclipse.jetty:jetty-servlets:9.2.14.v20151106", 425 | artifact_sha256 = "2a6e50cc48cfb5de3c3cf15176e229861ac7bc5e03285408078658298b75c421", 426 | server_urls = ["https://repo1.maven.org/maven2"], 427 | licenses = ["notice"], # Apache 2.0 License 428 | ) 429 | jvm_maven_import_external( 430 | name = "gwt_jetty_util_artifact", 431 | artifact = "org.eclipse.jetty:jetty-util:9.2.14.v20151106", 432 | artifact_sha256 = "277a2cc734139f620bf5c88c09af2f0328b0114f6fad52776abfbcd8d37166ce", 433 | server_urls = ["https://repo1.maven.org/maven2"], 434 | licenses = ["notice"], # Apache 2.0 License 435 | ) 436 | jvm_maven_import_external( 437 | name = "gwt_jetty_webapp_artifact", 438 | artifact = "org.eclipse.jetty:jetty-webapp:9.2.14.v20151106", 439 | artifact_sha256 = "1865f0d3c0edc8727eb4e4d1f9c808cec039095e95cfff45816ea6f7059e6fc5", 440 | server_urls = ["https://repo1.maven.org/maven2"], 441 | licenses = ["notice"], # Apache 2.0 License 442 | ) 443 | jvm_maven_import_external( 444 | name = "gwt_jetty_xml_artifact", 445 | artifact = "org.eclipse.jetty:jetty-xml:9.2.14.v20151106", 446 | artifact_sha256 = "3d13667a02e331c86b124d020338ec5cc901a7986ddf9fd99782578fe77a0459", 447 | server_urls = ["https://repo1.maven.org/maven2"], 448 | licenses = ["notice"], # Apache 2.0 License 449 | ) 450 | jvm_maven_import_external( 451 | name = "gwt_jsinterop_artifact", 452 | artifact = "com.google.jsinterop:jsinterop-annotations:1.0.0", 453 | artifact_sha256 = "e5c1e0ceef98fb65a3d382641bcc1faab97649da1b422bbfc60e21b47345c854", 454 | server_urls = ["https://repo1.maven.org/maven2"], 455 | licenses = ["unencumbered"], # No License 456 | ) 457 | http_jar( 458 | name = "gwt_jsinterop_sources_artifact", 459 | url = "https://repo1.maven.org/maven2/com/google/jsinterop/jsinterop-annotations/1.0.0/jsinterop-annotations-1.0.0-sources.jar", 460 | sha256 = "80d63c117736ae2fb9837b7a39576f3f0c5bd19cd75127886550c77b4c478f87", 461 | ) 462 | jvm_maven_import_external( 463 | name = "gwt_jsr_250_api_artifact", 464 | artifact = "javax.annotation:jsr250-api:1.0", 465 | artifact_sha256 = "a1a922d0d9b6d183ed3800dfac01d1e1eb159f0e8c6f94736931c1def54a941f", 466 | server_urls = ["https://repo1.maven.org/maven2"], 467 | licenses = ["reciprocal"], # CDDL License 468 | ) 469 | jvm_maven_import_external( 470 | name = "gwt_sac_artifact", 471 | artifact = "org.w3c.css:sac:1.3", 472 | artifact_sha256 = "003785669f921aafe4f137468dd20a01a36111e94fd7449f26c16e7924d82d23", 473 | server_urls = ["https://repo1.maven.org/maven2"], 474 | licenses = ["notice"], # W3C License 475 | ) 476 | jvm_maven_import_external( 477 | name = "gwt_tapestry_artifact", 478 | artifact = "tapestry:tapestry:4.0.2", 479 | artifact_sha256 = "16dfc5b6b322bb0734b80e89d77fbeb987c809002fe59d52d9707a035949b107", 480 | server_urls = ["https://repo1.maven.org/maven2"], 481 | licenses = ["unencumbered"], # No License 482 | ) 483 | jvm_maven_import_external( 484 | name = "gwt_user_artifact", 485 | artifact = "com.google.gwt:gwt-user:2.8.0", 486 | artifact_sha256 = "07a826107ca2eafd05f2910cbe266f0fa0348e0f72daee7e00a2e228a2b60867", 487 | server_urls = ["https://repo1.maven.org/maven2"], 488 | licenses = ["unencumbered"], # No License 489 | ) 490 | 491 | native.bind( 492 | name = "gwt-dev", 493 | actual = "@gwt_dev_artifact//jar", 494 | ) 495 | native.bind( 496 | name = "gwt-user", 497 | actual = "@gwt_user_artifact//jar", 498 | ) 499 | native.bind( 500 | name = "gwt_ant", 501 | actual = "@gwt_ant_artifact//jar", 502 | ) 503 | native.bind( 504 | name = "gwt_asm", 505 | actual = "@gwt_asm_artifact//jar", 506 | ) 507 | native.bind( 508 | name = "gwt_colt", 509 | actual = "@gwt_colt_artifact//jar", 510 | ) 511 | native.bind( 512 | name = "gwt_commons-io", 513 | actual = "@gwt_commons_io_artifact//jar", 514 | ) 515 | native.bind( 516 | name = "gwt_gson", 517 | actual = "@gwt_gson_artifact//jar", 518 | ) 519 | native.bind( 520 | name = "gwt_javax-servlet", 521 | actual = "@gwt_javax_servlet_artifact//jar", 522 | ) 523 | native.bind( 524 | name = "gwt_javax-validation", 525 | actual = "@gwt_javax_validation_artifact//jar", 526 | ) 527 | native.bind( 528 | name = "gwt_javax-validation-src", 529 | actual = "@gwt_javax_validation_sources_artifact//jar", 530 | ) 531 | native.bind( 532 | name = "gwt_jetty-annotations", 533 | actual = "@gwt_jetty_annotations_artifact//jar", 534 | ) 535 | native.bind( 536 | name = "gwt_jetty-http", 537 | actual = "@gwt_jetty_http_artifact//jar", 538 | ) 539 | native.bind( 540 | name = "gwt_jetty-io", 541 | actual = "@gwt_jetty_io_artifact//jar", 542 | ) 543 | native.bind( 544 | name = "gwt_jetty-jndi", 545 | actual = "@gwt_jetty_jndi_artifact//jar", 546 | ) 547 | native.bind( 548 | name = "gwt_jetty-plus", 549 | actual = "@gwt_jetty_plus_artifact//jar", 550 | ) 551 | native.bind( 552 | name = "gwt_jetty-security", 553 | actual = "@gwt_jetty_security_artifact//jar", 554 | ) 555 | native.bind( 556 | name = "gwt_jetty-server", 557 | actual = "@gwt_jetty_server_artifact//jar", 558 | ) 559 | native.bind( 560 | name = "gwt_jetty-servlet", 561 | actual = "@gwt_jetty_servlet_artifact//jar", 562 | ) 563 | native.bind( 564 | name = "gwt_jetty-servlets", 565 | actual = "@gwt_jetty_servlets_artifact//jar", 566 | ) 567 | native.bind( 568 | name = "gwt_jetty-util", 569 | actual = "@gwt_jetty_util_artifact//jar", 570 | ) 571 | native.bind( 572 | name = "gwt_jetty-webapp", 573 | actual = "@gwt_jetty_webapp_artifact//jar", 574 | ) 575 | native.bind( 576 | name = "gwt_jetty-xml", 577 | actual = "@gwt_jetty_xml_artifact//jar", 578 | ) 579 | native.bind( 580 | name = "gwt_jsinterop", 581 | actual = "@gwt_jsinterop_artifact//jar", 582 | ) 583 | native.bind( 584 | name = "gwt_jsinterop-src", 585 | actual = "@gwt_jsinterop_sources_artifact//jar", 586 | ) 587 | native.bind( 588 | name = "gwt_jsr-250-api", 589 | actual = "@gwt_jsr_250_api_artifact//jar", 590 | ) 591 | native.bind( 592 | name = "gwt_sac", 593 | actual = "@gwt_sac_artifact//jar", 594 | ) 595 | native.bind( 596 | name = "gwt_tapestry", 597 | actual = "@gwt_tapestry_artifact//jar", 598 | ) 599 | --------------------------------------------------------------------------------