├── 4.0-jdk7-aws-eb-onbuild
├── Dockerfile
└── glassfish-start.sh
├── 4.0-jdk7
└── Dockerfile
├── 4.1-jdk8-aws-eb-onbuild
├── Dockerfile
└── glassfish-start.sh
├── 4.1-jdk8
└── Dockerfile
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── THIRD-PARTY-LICENSES.txt
├── eb-glassfish-5.0
├── Dockerfile
└── glassfish-start.sh
├── generate-stackbrew-library.sh
└── glassfish-5.0
└── Dockerfile
/4.0-jdk7-aws-eb-onbuild/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM glassfish:4.0-jdk7
2 |
3 | WORKDIR /var/app
4 |
5 | ADD glassfish-start.sh /
6 |
7 | ONBUILD ADD . /var/app/
8 |
9 | CMD []
10 | ENTRYPOINT ["/glassfish-start.sh"]
11 |
12 |
--------------------------------------------------------------------------------
/4.0-jdk7-aws-eb-onbuild/glassfish-start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | PID_FILE=$GLASSFISH_HOME/glassfish/domains/domain1/config/pid
4 |
5 | # when deploying a directory, Glassfish expect all submodules to be extracted
6 | # which is usually not the case for EARs
7 | # zip app back into a bundle and let Glassfish handle it
8 | rm -f /var/app/Dockerfile
9 | rm -f /var/app/Dockerrun.aws.json
10 | zip /var/app.zip -r .
11 |
12 | asadmin start-domain
13 | asadmin deploy --contextroot / --name current-app /var/app.zip
14 |
15 | inotifywait -qq -e delete_self $PID_FILE
16 |
17 |
--------------------------------------------------------------------------------
/4.0-jdk7/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:7-jdk
2 |
3 | ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64
4 | ENV GLASSFISH_HOME /usr/local/glassfish4
5 | ENV PATH $PATH:$JAVA_HOME/bin:$GLASSFISH_HOME/bin
6 |
7 | RUN apt-get update && \
8 | apt-get install -y curl unzip zip inotify-tools && \
9 | rm -rf /var/lib/apt/lists/*
10 |
11 | RUN curl -L -o /tmp/glassfish-4.0.zip http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip && \
12 | unzip /tmp/glassfish-4.0.zip -d /usr/local && \
13 | rm -f /tmp/glassfish-4.0.zip
14 |
15 | EXPOSE 8080 4848 8181
16 |
17 | WORKDIR /usr/local/glassfish4
18 |
19 | # verbose causes the process to remain in the foreground so that docker can track it
20 | CMD asadmin start-domain --verbose
21 |
--------------------------------------------------------------------------------
/4.1-jdk8-aws-eb-onbuild/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM glassfish:4.1-jdk8
2 |
3 | WORKDIR /var/app
4 |
5 | ADD glassfish-start.sh /
6 |
7 | ONBUILD ADD . /var/app/
8 |
9 | CMD []
10 | ENTRYPOINT ["/glassfish-start.sh"]
11 |
12 |
--------------------------------------------------------------------------------
/4.1-jdk8-aws-eb-onbuild/glassfish-start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | PID_FILE=$GLASSFISH_HOME/glassfish/domains/domain1/config/pid
4 |
5 | # when deploying a directory, Glassfish expect all submodules to be extracted
6 | # which is usually not the case for EARs
7 | # zip app back into a bundle and let Glassfish handle it
8 | rm -f /var/app/Dockerfile
9 | rm -f /var/app/Dockerrun.aws.json
10 | zip /var/app.zip -r .
11 |
12 | asadmin start-domain
13 | asadmin deploy --contextroot / --name current-app /var/app.zip
14 |
15 | inotifywait -qq -e delete_self $PID_FILE
16 |
17 |
--------------------------------------------------------------------------------
/4.1-jdk8/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM java:8-jdk
2 |
3 | ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
4 | ENV GLASSFISH_HOME /usr/local/glassfish4
5 | ENV PATH $PATH:$JAVA_HOME/bin:$GLASSFISH_HOME/bin
6 |
7 | RUN apt-get update && \
8 | apt-get install -y curl unzip zip inotify-tools && \
9 | rm -rf /var/lib/apt/lists/*
10 |
11 | RUN curl -L -o /tmp/glassfish-4.1.zip http://download.java.net/glassfish/4.1/release/glassfish-4.1.zip && \
12 | unzip /tmp/glassfish-4.1.zip -d /usr/local && \
13 | rm -f /tmp/glassfish-4.1.zip
14 |
15 | EXPOSE 8080 4848 8181
16 |
17 | WORKDIR /usr/local/glassfish4
18 |
19 | # verbose causes the process to remain in the foreground so that docker can track it
20 | CMD asadmin start-domain --verbose
21 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/NOTICE.txt:
--------------------------------------------------------------------------------
1 | aws-eb-glassfish-dockerfiles
2 | Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #aws-eb-glassfish-dockerfiles
2 |
3 | #####This is the GlassFish Dockerfile repository for AWS Elastic Beanstalk.
4 |
5 | See also
6 |
7 | ##LICENSE
8 |
9 | Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
10 |
11 | Licensed under the Apache License, Version 2.0 (the "License").
12 | You may not use this file except in compliance with the License.
13 | A copy of the License is located at
14 |
15 | http://aws.amazon.com/apache2.0/
16 |
17 | or in the "license" file accompanying this file. This file is
18 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
19 | OF ANY KIND, either express or implied. See the License for the
20 | specific language governing permissions and limitations under the
21 | License.
22 |
--------------------------------------------------------------------------------
/THIRD-PARTY-LICENSES.txt:
--------------------------------------------------------------------------------
1 | ** joda-time; version 2.9.9 -- https://github.com/JodaOrg/joda-time/tree/v2.9.9
2 |
3 | Apache License
4 |
5 | Version 2.0, January 2004
6 |
7 | http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND
8 | DISTRIBUTION
9 |
10 | 1. Definitions.
11 |
12 | "License" shall mean the terms and conditions for use, reproduction, and
13 | distribution as defined by Sections 1 through 9 of this document.
14 |
15 | "Licensor" shall mean the copyright owner or entity authorized by the
16 | copyright owner that is granting the License.
17 |
18 | "Legal Entity" shall mean the union of the acting entity and all other
19 | entities that control, are controlled by, or are under common control
20 | with that entity. For the purposes of this definition, "control" means
21 | (i) the power, direct or indirect, to cause the direction or management
22 | of such entity, whether by contract or otherwise, or (ii) ownership of
23 | fifty percent (50%) or more of the outstanding shares, or (iii)
24 | beneficial ownership of such entity.
25 |
26 | "You" (or "Your") shall mean an individual or Legal Entity exercising
27 | permissions granted by this License.
28 |
29 | "Source" form shall mean the preferred form for making modifications,
30 | including but not limited to software source code, documentation source,
31 | and configuration files.
32 |
33 | "Object" form shall mean any form resulting from mechanical
34 | transformation or translation of a Source form, including but not limited
35 | to compiled object code, generated documentation, and conversions to
36 | other media types.
37 |
38 | "Work" shall mean the work of authorship, whether in Source or Object
39 | form, made available under the License, as indicated by a copyright
40 | notice that is included in or attached to the work (an example is
41 | provided in the Appendix below).
42 |
43 | "Derivative Works" shall mean any work, whether in Source or Object form,
44 | that is based on (or derived from) the Work and for which the editorial
45 | revisions, annotations, elaborations, or other modifications represent,
46 | as a whole, an original work of authorship. For the purposes of this
47 | License, Derivative Works shall not include works that remain separable
48 | from, or merely link (or bind by name) to the interfaces of, the Work and
49 | Derivative Works thereof.
50 |
51 | "Contribution" shall mean any work of authorship, including the original
52 | version of the Work and any modifications or additions to that Work or
53 | Derivative Works thereof, that is intentionally submitted to Licensor for
54 | inclusion in the Work by the copyright owner or by an individual or Legal
55 | Entity authorized to submit on behalf of the copyright owner. For the
56 | purposes of this definition, "submitted" means any form of electronic,
57 | verbal, or written communication sent to the Licensor or its
58 | representatives, including but not limited to communication on electronic
59 | mailing lists, source code control systems, and issue tracking systems
60 | that are managed by, or on behalf of, the Licensor for the purpose of
61 | discussing and improving the Work, but excluding communication that is
62 | conspicuously marked or otherwise designated in writing by the copyright
63 | owner as "Not a Contribution."
64 |
65 | "Contributor" shall mean Licensor and any individual or Legal Entity on
66 | behalf of whom a Contribution has been received by Licensor and
67 | subsequently incorporated within the Work.
68 |
69 | 2. Grant of Copyright License. Subject to the terms and conditions of this
70 | License, each Contributor hereby grants to You a perpetual, worldwide,
71 | non-exclusive, no-charge, royalty-free, irrevocable copyright license to
72 | reproduce, prepare Derivative Works of, publicly display, publicly perform,
73 | sublicense, and distribute the Work and such Derivative Works in Source or
74 | Object form.
75 |
76 | 3. Grant of Patent License. Subject to the terms and conditions of this
77 | License, each Contributor hereby grants to You a perpetual, worldwide,
78 | non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
79 | this section) patent license to make, have made, use, offer to sell, sell,
80 | import, and otherwise transfer the Work, where such license applies only to
81 | those patent claims licensable by such Contributor that are necessarily
82 | infringed by their Contribution(s) alone or by combination of their
83 | Contribution(s) with the Work to which such Contribution(s) was submitted.
84 | If You institute patent litigation against any entity (including a
85 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a
86 | Contribution incorporated within the Work constitutes direct or contributory
87 | patent infringement, then any patent licenses granted to You under this
88 | License for that Work shall terminate as of the date such litigation is
89 | filed.
90 |
91 | 4. Redistribution. You may reproduce and distribute copies of the Work or
92 | Derivative Works thereof in any medium, with or without modifications, and
93 | in Source or Object form, provided that You meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or Derivative Works a
96 | copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices stating
99 | that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works that You
102 | distribute, all copyright, patent, trademark, and attribution notices
103 | from the Source form of the Work, excluding those notices that do not
104 | pertain to any part of the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must include
108 | a readable copy of the attribution notices contained within such NOTICE
109 | file, excluding those notices that do not pertain to any part of the
110 | Derivative Works, in at least one of the following places: within a
111 | NOTICE text file distributed as part of the Derivative Works; within the
112 | Source form or documentation, if provided along with the Derivative
113 | Works; or, within a display generated by the Derivative Works, if and
114 | wherever such third-party notices normally appear. The contents of the
115 | NOTICE file are for informational purposes only and do not modify the
116 | License. You may add Your own attribution notices within Derivative Works
117 | that You distribute, alongside or as an addendum to the NOTICE text from
118 | the Work, provided that such additional attribution notices cannot be
119 | construed as modifying the License.
120 |
121 | You may add Your own copyright statement to Your modifications and may
122 | provide additional or different license terms and conditions for use,
123 | reproduction, or distribution of Your modifications, or for any such
124 | Derivative Works as a whole, provided Your use, reproduction, and
125 | distribution of the Work otherwise complies with the conditions stated in
126 | this License.
127 |
128 | 5. Submission of Contributions. Unless You explicitly state otherwise, any
129 | Contribution intentionally submitted for inclusion in the Work by You to the
130 | Licensor shall be under the terms and conditions of this License, without
131 | any additional terms or conditions. Notwithstanding the above, nothing
132 | herein shall supersede or modify the terms of any separate license agreement
133 | you may have executed with Licensor regarding such Contributions.
134 |
135 | 6. Trademarks. This License does not grant permission to use the trade
136 | names, trademarks, service marks, or product names of the Licensor, except
137 | as required for reasonable and customary use in describing the origin of the
138 | Work and reproducing the content of the NOTICE file.
139 |
140 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
141 | writing, Licensor provides the Work (and each Contributor provides its
142 | Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
143 | KIND, either express or implied, including, without limitation, any
144 | warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
145 | FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
146 | the appropriateness of using or redistributing the Work and assume any risks
147 | associated with Your exercise of permissions under this License.
148 |
149 | 8. Limitation of Liability. In no event and under no legal theory, whether
150 | in tort (including negligence), contract, or otherwise, unless required by
151 | applicable law (such as deliberate and grossly negligent acts) or agreed to
152 | in writing, shall any Contributor be liable to You for damages, including
153 | any direct, indirect, special, incidental, or consequential damages of any
154 | character arising as a result of this License or out of the use or inability
155 | to use the Work (including but not limited to damages for loss of goodwill,
156 | work stoppage, computer failure or malfunction, or any and all other
157 | commercial damages or losses), even if such Contributor has been advised of
158 | the possibility of such damages.
159 |
160 | 9. Accepting Warranty or Additional Liability. While redistributing the Work
161 | or Derivative Works thereof, You may choose to offer, and charge a fee for,
162 | acceptance of support, warranty, indemnity, or other liability obligations
163 | and/or rights consistent with this License. However, in accepting such
164 | obligations, You may act only on Your own behalf and on Your sole
165 | responsibility, not on behalf of any other Contributor, and only if You
166 | agree to indemnify, defend, and hold each Contributor harmless for any
167 | liability incurred by, or claims asserted against, such Contributor by
168 | reason of your accepting any such warranty or additional liability. END OF
169 | TERMS AND CONDITIONS
170 |
171 | APPENDIX: How to apply the Apache License to your work.
172 |
173 | To apply the Apache License to your work, attach the following boilerplate
174 | notice, with the fields enclosed by brackets "[]" replaced with your own
175 | identifying information. (Don't include the brackets!) The text should be
176 | enclosed in the appropriate comment syntax for the file format. We also
177 | recommend that a file or class name and description of purpose be included on
178 | the same "printed page" as the copyright notice for easier identification
179 | within third-party archives.
180 |
181 | Copyright [yyyy] [name of copyright owner]
182 |
183 | Licensed under the Apache License, Version 2.0 (the "License");
184 |
185 | you may not use this file except in compliance with the License.
186 |
187 | You may obtain a copy of the License at
188 |
189 | http://www.apache.org/licenses/LICENSE-2.0
190 |
191 | Unless required by applicable law or agreed to in writing, software
192 |
193 | distributed under the License is distributed on an "AS IS" BASIS,
194 |
195 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
196 |
197 | See the License for the specific language governing permissions and
198 |
199 | limitations under the License.
200 |
201 | * For joda-time see also this required NOTICE:
202 | =============================================================================
203 | = NOTICE file corresponding to section 4d of the Apache License Version 2.0
204 | =
205 | =============================================================================
206 | This product includes software developed by
207 | Joda.org (http://www.joda.org/).
208 |
209 | ------
210 |
211 | ** GlassFish; version 5.0 -- https://javaee.github.io/glassfish/
212 | Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
213 | ** grizzly-npn; version 1.8 -- https://github.com/javaee/grizzly-npn/tree/1_8
214 | Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
215 |
216 | * Package GlassFish's source code may be found at:
217 | https://github.com/javaee/glassfish/tree/5.0
218 | * Package grizzly-npn's source code may be found at:
219 | https://github.com/javaee/grizzly-npn/tree/1_8
220 |
221 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1
222 |
223 | 1. Definitions.
224 |
225 | 1.1. "Contributor" means each individual or entity that creates or
226 | contributes to the creation of Modifications.
227 |
228 | 1.2. "Contributor Version" means the combination of the Original
229 | Software, prior Modifications used by a Contributor (if any), and
230 | the Modifications made by that particular Contributor.
231 |
232 | 1.3. "Covered Software" means (a) the Original Software, or (b)
233 | Modifications, or (c) the combination of files containing Original
234 | Software with files containing Modifications, in each case including
235 | portions thereof.
236 |
237 | 1.4. "Executable" means the Covered Software in any form other than
238 | Source Code.
239 |
240 | 1.5. "Initial Developer" means the individual or entity that first
241 | makes Original Software available under this License.
242 |
243 | 1.6. "Larger Work" means a work which combines Covered Software or
244 | portions thereof with code not governed by the terms of this License.
245 |
246 | 1.7. "License" means this document.
247 |
248 | 1.8. "Licensable" means having the right to grant, to the maximum
249 | extent possible, whether at the time of the initial grant or
250 | subsequently acquired, any and all of the rights conveyed herein.
251 |
252 | 1.9. "Modifications" means the Source Code and Executable form of
253 | any of the following:
254 |
255 | A. Any file that results from an addition to, deletion from or
256 | modification of the contents of a file containing Original Software
257 | or previous Modifications;
258 |
259 | B. Any new file that contains any part of the Original Software or
260 | previous Modification; or
261 |
262 | C. Any new file that is contributed or otherwise made available
263 | under the terms of this License.
264 |
265 | 1.10. "Original Software" means the Source Code and Executable form
266 | of computer software code that is originally released under this
267 | License.
268 |
269 | 1.11. "Patent Claims" means any patent claim(s), now owned or
270 | hereafter acquired, including without limitation, method, process,
271 | and apparatus claims, in any patent Licensable by grantor.
272 |
273 | 1.12. "Source Code" means (a) the common form of computer software
274 | code in which modifications are made and (b) associated
275 | documentation included in or with such code.
276 |
277 | 1.13. "You" (or "Your") means an individual or a legal entity
278 | exercising rights under, and complying with all of the terms of,
279 | this License. For legal entities, "You" includes any entity which
280 | controls, is controlled by, or is under common control with You. For
281 | purposes of this definition, "control" means (a) the power, direct
282 | or indirect, to cause the direction or management of such entity,
283 | whether by contract or otherwise, or (b) ownership of more than
284 | fifty percent (50%) of the outstanding shares or beneficial
285 | ownership of such entity.
286 |
287 | 2. License Grants.
288 |
289 | 2.1. The Initial Developer Grant.
290 |
291 | Conditioned upon Your compliance with Section 3.1 below and subject
292 | to third party intellectual property claims, the Initial Developer
293 | hereby grants You a world-wide, royalty-free, non-exclusive license:
294 |
295 | (a) under intellectual property rights (other than patent or
296 | trademark) Licensable by Initial Developer, to use, reproduce,
297 | modify, display, perform, sublicense and distribute the Original
298 | Software (or portions thereof), with or without Modifications,
299 | and/or as part of a Larger Work; and
300 |
301 | (b) under Patent Claims infringed by the making, using or selling of
302 | Original Software, to make, have made, use, practice, sell, and
303 | offer for sale, and/or otherwise dispose of the Original Software
304 | (or portions thereof).
305 |
306 | (c) The licenses granted in Sections 2.1(a) and (b) are effective on
307 | the date Initial Developer first distributes or otherwise makes the
308 | Original Software available to a third party under the terms of this
309 | License.
310 |
311 | (d) Notwithstanding Section 2.1(b) above, no patent license is
312 | granted: (1) for code that You delete from the Original Software, or
313 | (2) for infringements caused by: (i) the modification of the
314 | Original Software, or (ii) the combination of the Original Software
315 | with other software or devices.
316 |
317 | 2.2. Contributor Grant.
318 |
319 | Conditioned upon Your compliance with Section 3.1 below and subject
320 | to third party intellectual property claims, each Contributor hereby
321 | grants You a world-wide, royalty-free, non-exclusive license:
322 |
323 | (a) under intellectual property rights (other than patent or
324 | trademark) Licensable by Contributor to use, reproduce, modify,
325 | display, perform, sublicense and distribute the Modifications
326 | created by such Contributor (or portions thereof), either on an
327 | unmodified basis, with other Modifications, as Covered Software
328 | and/or as part of a Larger Work; and
329 |
330 | (b) under Patent Claims infringed by the making, using, or selling
331 | of Modifications made by that Contributor either alone and/or in
332 | combination with its Contributor Version (or portions of such
333 | combination), to make, use, sell, offer for sale, have made, and/or
334 | otherwise dispose of: (1) Modifications made by that Contributor (or
335 | portions thereof); and (2) the combination of Modifications made by
336 | that Contributor with its Contributor Version (or portions of such
337 | combination).
338 |
339 | (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
340 | on the date Contributor first distributes or otherwise makes the
341 | Modifications available to a third party.
342 |
343 | (d) Notwithstanding Section 2.2(b) above, no patent license is
344 | granted: (1) for any code that Contributor has deleted from the
345 | Contributor Version; (2) for infringements caused by: (i) third
346 | party modifications of Contributor Version, or (ii) the combination
347 | of Modifications made by that Contributor with other software
348 | (except as part of the Contributor Version) or other devices; or (3)
349 | under Patent Claims infringed by Covered Software in the absence of
350 | Modifications made by that Contributor.
351 |
352 | 3. Distribution Obligations.
353 |
354 | 3.1. Availability of Source Code.
355 |
356 | Any Covered Software that You distribute or otherwise make available
357 | in Executable form must also be made available in Source Code form
358 | and that Source Code form must be distributed only under the terms
359 | of this License. You must include a copy of this License with every
360 | copy of the Source Code form of the Covered Software You distribute
361 | or otherwise make available. You must inform recipients of any such
362 | Covered Software in Executable form as to how they can obtain such
363 | Covered Software in Source Code form in a reasonable manner on or
364 | through a medium customarily used for software exchange.
365 |
366 | 3.2. Modifications.
367 |
368 | The Modifications that You create or to which You contribute are
369 | governed by the terms of this License. You represent that You
370 | believe Your Modifications are Your original creation(s) and/or You
371 | have sufficient rights to grant the rights conveyed by this License.
372 |
373 | 3.3. Required Notices.
374 |
375 | You must include a notice in each of Your Modifications that
376 | identifies You as the Contributor of the Modification. You may not
377 | remove or alter any copyright, patent or trademark notices contained
378 | within the Covered Software, or any notices of licensing or any
379 | descriptive text giving attribution to any Contributor or the
380 | Initial Developer.
381 |
382 | 3.4. Application of Additional Terms.
383 |
384 | You may not offer or impose any terms on any Covered Software in
385 | Source Code form that alters or restricts the applicable version of
386 | this License or the recipients' rights hereunder. You may choose to
387 | offer, and to charge a fee for, warranty, support, indemnity or
388 | liability obligations to one or more recipients of Covered Software.
389 | However, you may do so only on Your own behalf, and not on behalf of
390 | the Initial Developer or any Contributor. You must make it
391 | absolutely clear that any such warranty, support, indemnity or
392 | liability obligation is offered by You alone, and You hereby agree
393 | to indemnify the Initial Developer and every Contributor for any
394 | liability incurred by the Initial Developer or such Contributor as a
395 | result of warranty, support, indemnity or liability terms You offer.
396 |
397 | 3.5. Distribution of Executable Versions.
398 |
399 | You may distribute the Executable form of the Covered Software under
400 | the terms of this License or under the terms of a license of Your
401 | choice, which may contain terms different from this License,
402 | provided that You are in compliance with the terms of this License
403 | and that the license for the Executable form does not attempt to
404 | limit or alter the recipient's rights in the Source Code form from
405 | the rights set forth in this License. If You distribute the Covered
406 | Software in Executable form under a different license, You must make
407 | it absolutely clear that any terms which differ from this License
408 | are offered by You alone, not by the Initial Developer or
409 | Contributor. You hereby agree to indemnify the Initial Developer and
410 | every Contributor for any liability incurred by the Initial
411 | Developer or such Contributor as a result of any such terms You offer.
412 |
413 | 3.6. Larger Works.
414 |
415 | You may create a Larger Work by combining Covered Software with
416 | other code not governed by the terms of this License and distribute
417 | the Larger Work as a single product. In such a case, You must make
418 | sure the requirements of this License are fulfilled for the Covered
419 | Software.
420 |
421 | 4. Versions of the License.
422 |
423 | 4.1. New Versions.
424 |
425 | Oracle is the initial license steward and may publish revised and/or
426 | new versions of this License from time to time. Each version will be
427 | given a distinguishing version number. Except as provided in Section
428 | 4.3, no one other than the license steward has the right to modify
429 | this License.
430 |
431 | 4.2. Effect of New Versions.
432 |
433 | You may always continue to use, distribute or otherwise make the
434 | Covered Software available under the terms of the version of the
435 | License under which You originally received the Covered Software. If
436 | the Initial Developer includes a notice in the Original Software
437 | prohibiting it from being distributed or otherwise made available
438 | under any subsequent version of the License, You must distribute and
439 | make the Covered Software available under the terms of the version
440 | of the License under which You originally received the Covered
441 | Software. Otherwise, You may also choose to use, distribute or
442 | otherwise make the Covered Software available under the terms of any
443 | subsequent version of the License published by the license steward.
444 |
445 | 4.3. Modified Versions.
446 |
447 | When You are an Initial Developer and You want to create a new
448 | license for Your Original Software, You may create and use a
449 | modified version of this License if You: (a) rename the license and
450 | remove any references to the name of the license steward (except to
451 | note that the license differs from this License); and (b) otherwise
452 | make it clear that the license contains terms which differ from this
453 | License.
454 |
455 | 5. DISCLAIMER OF WARRANTY.
456 |
457 | COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
458 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
459 | INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE
460 | IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
461 | NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
462 | THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
463 | DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY
464 | OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
465 | REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
466 | ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS
467 | AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
468 |
469 | 6. TERMINATION.
470 |
471 | 6.1. This License and the rights granted hereunder will terminate
472 | automatically if You fail to comply with terms herein and fail to
473 | cure such breach within 30 days of becoming aware of the breach.
474 | Provisions which, by their nature, must remain in effect beyond the
475 | termination of this License shall survive.
476 |
477 | 6.2. If You assert a patent infringement claim (excluding
478 | declaratory judgment actions) against Initial Developer or a
479 | Contributor (the Initial Developer or Contributor against whom You
480 | assert such claim is referred to as "Participant") alleging that the
481 | Participant Software (meaning the Contributor Version where the
482 | Participant is a Contributor or the Original Software where the
483 | Participant is the Initial Developer) directly or indirectly
484 | infringes any patent, then any and all rights granted directly or
485 | indirectly to You by such Participant, the Initial Developer (if the
486 | Initial Developer is not the Participant) and all Contributors under
487 | Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice
488 | from Participant terminate prospectively and automatically at the
489 | expiration of such 60 day notice period, unless if within such 60
490 | day period You withdraw Your claim with respect to the Participant
491 | Software against such Participant either unilaterally or pursuant to
492 | a written agreement with Participant.
493 |
494 | 6.3. If You assert a patent infringement claim against Participant
495 | alleging that the Participant Software directly or indirectly
496 | infringes any patent where such claim is resolved (such as by
497 | license or settlement) prior to the initiation of patent
498 | infringement litigation, then the reasonable value of the licenses
499 | granted by such Participant under Sections 2.1 or 2.2 shall be taken
500 | into account in determining the amount or value of any payment or
501 | license.
502 |
503 | 6.4. In the event of termination under Sections 6.1 or 6.2 above,
504 | all end user licenses that have been validly granted by You or any
505 | distributor hereunder prior to termination (excluding licenses
506 | granted to You by any distributor) shall survive termination.
507 |
508 | 7. LIMITATION OF LIABILITY.
509 |
510 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
511 | (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
512 | INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
513 | COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE
514 | TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
515 | CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
516 | LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
517 | FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
518 | LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE
519 | POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT
520 | APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
521 | PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
522 | LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
523 | LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
524 | AND LIMITATION MAY NOT APPLY TO YOU.
525 |
526 | 8. U.S. GOVERNMENT END USERS.
527 |
528 | The Covered Software is a "commercial item," as that term is defined
529 | in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
530 | software" (as that term is defined at 48 C.F.R. §
531 | 252.227-7014(a)(1)) and "commercial computer software documentation"
532 | as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent
533 | with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
534 | (June 1995), all U.S. Government End Users acquire Covered Software
535 | with only those rights set forth herein. This U.S. Government Rights
536 | clause is in lieu of, and supersedes, any other FAR, DFAR, or other
537 | clause or provision that addresses Government rights in computer
538 | software under this License.
539 |
540 | 9. MISCELLANEOUS.
541 |
542 | This License represents the complete agreement concerning subject
543 | matter hereof. If any provision of this License is held to be
544 | unenforceable, such provision shall be reformed only to the extent
545 | necessary to make it enforceable. This License shall be governed by
546 | the law of the jurisdiction specified in a notice contained within
547 | the Original Software (except to the extent applicable law, if any,
548 | provides otherwise), excluding such jurisdiction's conflict-of-law
549 | provisions. Any litigation relating to this License shall be subject
550 | to the jurisdiction of the courts located in the jurisdiction and
551 | venue specified in a notice contained within the Original Software,
552 | with the losing party responsible for costs, including, without
553 | limitation, court costs and reasonable attorneys' fees and expenses.
554 | The application of the United Nations Convention on Contracts for
555 | the International Sale of Goods is expressly excluded. Any law or
556 | regulation which provides that the language of a contract shall be
557 | construed against the drafter shall not apply to this License. You
558 | agree that You alone are responsible for compliance with the United
559 | States export administration regulations (and the export control
560 | laws and regulation of any other countries) when You use, distribute
561 | or otherwise make available any Covered Software.
562 |
563 | 10. RESPONSIBILITY FOR CLAIMS.
564 |
565 | As between Initial Developer and the Contributors, each party is
566 | responsible for claims and damages arising, directly or indirectly,
567 | out of its utilization of rights under this License and You agree to
568 | work with Initial Developer and Contributors to distribute such
569 | responsibility on an equitable basis. Nothing herein is intended or
570 | shall be deemed to constitute any admission of liability.
571 |
572 | ------------------------------------------------------------------------
573 |
574 | NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
575 | LICENSE (CDDL)
576 |
577 | The code released under the CDDL shall be governed by the laws of the
578 | State of California (excluding conflict-of-law provisions). Any
579 | litigation relating to this License shall be subject to the jurisdiction
580 | of the Federal Courts of the Northern District of California and the
581 | state courts of the State of California, with venue lying in Santa Clara
582 | County, California.
583 |
584 |
585 |
586 | The GNU General Public License (GPL) Version 2, June 1991
587 |
588 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
589 | 51 Franklin Street, Fifth Floor
590 | Boston, MA 02110-1335
591 | USA
592 |
593 | Everyone is permitted to copy and distribute verbatim copies
594 | of this license document, but changing it is not allowed.
595 |
596 | Preamble
597 |
598 | The licenses for most software are designed to take away your freedom to
599 | share and change it. By contrast, the GNU General Public License is
600 | intended to guarantee your freedom to share and change free software--to
601 | make sure the software is free for all its users. This General Public
602 | License applies to most of the Free Software Foundation's software and
603 | to any other program whose authors commit to using it. (Some other Free
604 | Software Foundation software is covered by the GNU Library General
605 | Public License instead.) You can apply it to your programs, too.
606 |
607 | When we speak of free software, we are referring to freedom, not price.
608 | Our General Public Licenses are designed to make sure that you have the
609 | freedom to distribute copies of free software (and charge for this
610 | service if you wish), that you receive source code or can get it if you
611 | want it, that you can change the software or use pieces of it in new
612 | free programs; and that you know you can do these things.
613 |
614 | To protect your rights, we need to make restrictions that forbid anyone
615 | to deny you these rights or to ask you to surrender the rights. These
616 | restrictions translate to certain responsibilities for you if you
617 | distribute copies of the software, or if you modify it.
618 |
619 | For example, if you distribute copies of such a program, whether gratis
620 | or for a fee, you must give the recipients all the rights that you have.
621 | You must make sure that they, too, receive or can get the source code.
622 | And you must show them these terms so they know their rights.
623 |
624 | We protect your rights with two steps: (1) copyright the software, and
625 | (2) offer you this license which gives you legal permission to copy,
626 | distribute and/or modify the software.
627 |
628 | Also, for each author's protection and ours, we want to make certain
629 | that everyone understands that there is no warranty for this free
630 | software. If the software is modified by someone else and passed on, we
631 | want its recipients to know that what they have is not the original, so
632 | that any problems introduced by others will not reflect on the original
633 | authors' reputations.
634 |
635 | Finally, any free program is threatened constantly by software patents.
636 | We wish to avoid the danger that redistributors of a free program will
637 | individually obtain patent licenses, in effect making the program
638 | proprietary. To prevent this, we have made it clear that any patent must
639 | be licensed for everyone's free use or not licensed at all.
640 |
641 | The precise terms and conditions for copying, distribution and
642 | modification follow.
643 |
644 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
645 |
646 | 0. This License applies to any program or other work which contains a
647 | notice placed by the copyright holder saying it may be distributed under
648 | the terms of this General Public License. The "Program", below, refers
649 | to any such program or work, and a "work based on the Program" means
650 | either the Program or any derivative work under copyright law: that is
651 | to say, a work containing the Program or a portion of it, either
652 | verbatim or with modifications and/or translated into another language.
653 | (Hereinafter, translation is included without limitation in the term
654 | "modification".) Each licensee is addressed as "you".
655 |
656 | Activities other than copying, distribution and modification are not
657 | covered by this License; they are outside its scope. The act of running
658 | the Program is not restricted, and the output from the Program is
659 | covered only if its contents constitute a work based on the Program
660 | (independent of having been made by running the Program). Whether that
661 | is true depends on what the Program does.
662 |
663 | 1. You may copy and distribute verbatim copies of the Program's source
664 | code as you receive it, in any medium, provided that you conspicuously
665 | and appropriately publish on each copy an appropriate copyright notice
666 | and disclaimer of warranty; keep intact all the notices that refer to
667 | this License and to the absence of any warranty; and give any other
668 | recipients of the Program a copy of this License along with the Program.
669 |
670 | You may charge a fee for the physical act of transferring a copy, and
671 | you may at your option offer warranty protection in exchange for a fee.
672 |
673 | 2. You may modify your copy or copies of the Program or any portion of
674 | it, thus forming a work based on the Program, and copy and distribute
675 | such modifications or work under the terms of Section 1 above, provided
676 | that you also meet all of these conditions:
677 |
678 | a) You must cause the modified files to carry prominent notices
679 | stating that you changed the files and the date of any change.
680 |
681 | b) You must cause any work that you distribute or publish, that in
682 | whole or in part contains or is derived from the Program or any part
683 | thereof, to be licensed as a whole at no charge to all third parties
684 | under the terms of this License.
685 |
686 | c) If the modified program normally reads commands interactively
687 | when run, you must cause it, when started running for such
688 | interactive use in the most ordinary way, to print or display an
689 | announcement including an appropriate copyright notice and a notice
690 | that there is no warranty (or else, saying that you provide a
691 | warranty) and that users may redistribute the program under these
692 | conditions, and telling the user how to view a copy of this License.
693 | (Exception: if the Program itself is interactive but does not
694 | normally print such an announcement, your work based on the Program
695 | is not required to print an announcement.)
696 |
697 | These requirements apply to the modified work as a whole. If
698 | identifiable sections of that work are not derived from the Program, and
699 | can be reasonably considered independent and separate works in
700 | themselves, then this License, and its terms, do not apply to those
701 | sections when you distribute them as separate works. But when you
702 | distribute the same sections as part of a whole which is a work based on
703 | the Program, the distribution of the whole must be on the terms of this
704 | License, whose permissions for other licensees extend to the entire
705 | whole, and thus to each and every part regardless of who wrote it.
706 |
707 | Thus, it is not the intent of this section to claim rights or contest
708 | your rights to work written entirely by you; rather, the intent is to
709 | exercise the right to control the distribution of derivative or
710 | collective works based on the Program.
711 |
712 | In addition, mere aggregation of another work not based on the Program
713 | with the Program (or with a work based on the Program) on a volume of a
714 | storage or distribution medium does not bring the other work under the
715 | scope of this License.
716 |
717 | 3. You may copy and distribute the Program (or a work based on it,
718 | under Section 2) in object code or executable form under the terms of
719 | Sections 1 and 2 above provided that you also do one of the following:
720 |
721 | a) Accompany it with the complete corresponding machine-readable
722 | source code, which must be distributed under the terms of Sections 1
723 | and 2 above on a medium customarily used for software interchange; or,
724 |
725 | b) Accompany it with a written offer, valid for at least three
726 | years, to give any third party, for a charge no more than your cost
727 | of physically performing source distribution, a complete
728 | machine-readable copy of the corresponding source code, to be
729 | distributed under the terms of Sections 1 and 2 above on a medium
730 | customarily used for software interchange; or,
731 |
732 | c) Accompany it with the information you received as to the offer to
733 | distribute corresponding source code. (This alternative is allowed
734 | only for noncommercial distribution and only if you received the
735 | program in object code or executable form with such an offer, in
736 | accord with Subsection b above.)
737 |
738 | The source code for a work means the preferred form of the work for
739 | making modifications to it. For an executable work, complete source code
740 | means all the source code for all modules it contains, plus any
741 | associated interface definition files, plus the scripts used to control
742 | compilation and installation of the executable. However, as a special
743 | exception, the source code distributed need not include anything that is
744 | normally distributed (in either source or binary form) with the major
745 | components (compiler, kernel, and so on) of the operating system on
746 | which the executable runs, unless that component itself accompanies the
747 | executable.
748 |
749 | If distribution of executable or object code is made by offering access
750 | to copy from a designated place, then offering equivalent access to copy
751 | the source code from the same place counts as distribution of the source
752 | code, even though third parties are not compelled to copy the source
753 | along with the object code.
754 |
755 | 4. You may not copy, modify, sublicense, or distribute the Program
756 | except as expressly provided under this License. Any attempt otherwise
757 | to copy, modify, sublicense or distribute the Program is void, and will
758 | automatically terminate your rights under this License. However, parties
759 | who have received copies, or rights, from you under this License will
760 | not have their licenses terminated so long as such parties remain in
761 | full compliance.
762 |
763 | 5. You are not required to accept this License, since you have not
764 | signed it. However, nothing else grants you permission to modify or
765 | distribute the Program or its derivative works. These actions are
766 | prohibited by law if you do not accept this License. Therefore, by
767 | modifying or distributing the Program (or any work based on the
768 | Program), you indicate your acceptance of this License to do so, and all
769 | its terms and conditions for copying, distributing or modifying the
770 | Program or works based on it.
771 |
772 | 6. Each time you redistribute the Program (or any work based on the
773 | Program), the recipient automatically receives a license from the
774 | original licensor to copy, distribute or modify the Program subject to
775 | these terms and conditions. You may not impose any further restrictions
776 | on the recipients' exercise of the rights granted herein. You are not
777 | responsible for enforcing compliance by third parties to this License.
778 |
779 | 7. If, as a consequence of a court judgment or allegation of patent
780 | infringement or for any other reason (not limited to patent issues),
781 | conditions are imposed on you (whether by court order, agreement or
782 | otherwise) that contradict the conditions of this License, they do not
783 | excuse you from the conditions of this License. If you cannot distribute
784 | so as to satisfy simultaneously your obligations under this License and
785 | any other pertinent obligations, then as a consequence you may not
786 | distribute the Program at all. For example, if a patent license would
787 | not permit royalty-free redistribution of the Program by all those who
788 | receive copies directly or indirectly through you, then the only way you
789 | could satisfy both it and this License would be to refrain entirely from
790 | distribution of the Program.
791 |
792 | If any portion of this section is held invalid or unenforceable under
793 | any particular circumstance, the balance of the section is intended to
794 | apply and the section as a whole is intended to apply in other
795 | circumstances.
796 |
797 | It is not the purpose of this section to induce you to infringe any
798 | patents or other property right claims or to contest validity of any
799 | such claims; this section has the sole purpose of protecting the
800 | integrity of the free software distribution system, which is implemented
801 | by public license practices. Many people have made generous
802 | contributions to the wide range of software distributed through that
803 | system in reliance on consistent application of that system; it is up to
804 | the author/donor to decide if he or she is willing to distribute
805 | software through any other system and a licensee cannot impose that choice.
806 |
807 | This section is intended to make thoroughly clear what is believed to be
808 | a consequence of the rest of this License.
809 |
810 | 8. If the distribution and/or use of the Program is restricted in
811 | certain countries either by patents or by copyrighted interfaces, the
812 | original copyright holder who places the Program under this License may
813 | add an explicit geographical distribution limitation excluding those
814 | countries, so that distribution is permitted only in or among countries
815 | not thus excluded. In such case, this License incorporates the
816 | limitation as if written in the body of this License.
817 |
818 | 9. The Free Software Foundation may publish revised and/or new
819 | versions of the General Public License from time to time. Such new
820 | versions will be similar in spirit to the present version, but may
821 | differ in detail to address new problems or concerns.
822 |
823 | Each version is given a distinguishing version number. If the Program
824 | specifies a version number of this License which applies to it and "any
825 | later version", you have the option of following the terms and
826 | conditions either of that version or of any later version published by
827 | the Free Software Foundation. If the Program does not specify a version
828 | number of this License, you may choose any version ever published by the
829 | Free Software Foundation.
830 |
831 | 10. If you wish to incorporate parts of the Program into other free
832 | programs whose distribution conditions are different, write to the
833 | author to ask for permission. For software which is copyrighted by the
834 | Free Software Foundation, write to the Free Software Foundation; we
835 | sometimes make exceptions for this. Our decision will be guided by the
836 | two goals of preserving the free status of all derivatives of our free
837 | software and of promoting the sharing and reuse of software generally.
838 |
839 | NO WARRANTY
840 |
841 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
842 | WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
843 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
844 | OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
845 | EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
846 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
847 | ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
848 | YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
849 | NECESSARY SERVICING, REPAIR OR CORRECTION.
850 |
851 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
852 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
853 | AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
854 | DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
855 | DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
856 | (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
857 | INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
858 | THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
859 | OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
860 |
861 | END OF TERMS AND CONDITIONS
862 |
863 | How to Apply These Terms to Your New Programs
864 |
865 | If you develop a new program, and you want it to be of the greatest
866 | possible use to the public, the best way to achieve this is to make it
867 | free software which everyone can redistribute and change under these terms.
868 |
869 | To do so, attach the following notices to the program. It is safest to
870 | attach them to the start of each source file to most effectively convey
871 | the exclusion of warranty; and each file should have at least the
872 | "copyright" line and a pointer to where the full notice is found.
873 |
874 | One line to give the program's name and a brief idea of what it does.
875 | Copyright (C)
876 |
877 | This program is free software; you can redistribute it and/or modify
878 | it under the terms of the GNU General Public License as published by
879 | the Free Software Foundation; either version 2 of the License, or
880 | (at your option) any later version.
881 |
882 | This program is distributed in the hope that it will be useful, but
883 | WITHOUT ANY WARRANTY; without even the implied warranty of
884 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
885 | General Public License for more details.
886 |
887 | You should have received a copy of the GNU General Public License
888 | along with this program; if not, write to the Free Software
889 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335
890 | USA
891 |
892 | Also add information on how to contact you by electronic and paper mail.
893 |
894 | If the program is interactive, make it output a short notice like this
895 | when it starts in an interactive mode:
896 |
897 | Gnomovision version 69, Copyright (C) year name of author
898 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
899 | `show w'. This is free software, and you are welcome to redistribute
900 | it under certain conditions; type `show c' for details.
901 |
902 | The hypothetical commands `show w' and `show c' should show the
903 | appropriate parts of the General Public License. Of course, the commands
904 | you use may be called something other than `show w' and `show c'; they
905 | could even be mouse-clicks or menu items--whatever suits your program.
906 |
907 | You should also get your employer (if you work as a programmer) or your
908 | school, if any, to sign a "copyright disclaimer" for the program, if
909 | necessary. Here is a sample; alter the names:
910 |
911 | Yoyodyne, Inc., hereby disclaims all copyright interest in the
912 | program `Gnomovision' (which makes passes at compilers) written by
913 | James Hacker.
914 |
915 | signature of Ty Coon, 1 April 1989
916 | Ty Coon, President of Vice
917 |
918 | This General Public License does not permit incorporating your program
919 | into proprietary programs. If your program is a subroutine library, you
920 | may consider it more useful to permit linking proprietary applications
921 | with the library. If this is what you want to do, use the GNU Library
922 | General Public License instead of this License.
923 |
924 | #
925 |
926 | Certain source files distributed by Oracle America, Inc. and/or its
927 | affiliates are subject to the following clarification and special
928 | exception to the GPLv2, based on the GNU Project exception for its
929 | Classpath libraries, known as the GNU Classpath Exception, but only
930 | where Oracle has expressly included in the particular source file's
931 | header the words "Oracle designates this particular file as subject to
932 | the "Classpath" exception as provided by Oracle in the LICENSE file
933 | that accompanied this code."
934 |
935 | You should also note that Oracle includes multiple, independent
936 | programs in this software package. Some of those programs are provided
937 | under licenses deemed incompatible with the GPLv2 by the Free Software
938 | Foundation and others. For example, the package includes programs
939 | licensed under the Apache License, Version 2.0. Such programs are
940 | licensed to you under their original licenses.
941 |
942 | Oracle facilitates your further distribution of this package by adding
943 | the Classpath Exception to the necessary parts of its GPLv2 code, which
944 | permits you to use that code in combination with other independent
945 | modules not licensed under the GPLv2. However, note that this would
946 | not permit you to commingle code under an incompatible license with
947 | Oracle's GPLv2 licensed code by, for example, cutting and pasting such
948 | code into a file also containing Oracle's GPLv2 licensed code and then
949 | distributing the result. Additionally, if you were to remove the
950 | Classpath Exception from any of the files to which it applies and
951 | distribute the result, you would likely be required to license some or
952 | all of the other code in that distribution under the GPLv2 as well, and
953 | since the GPLv2 is incompatible with the license terms of some items
954 | included in the distribution by Oracle, removing the Classpath
955 | Exception could therefore effectively compromise your ability to
956 | further distribute the package.
957 |
958 | Proceed with caution and we recommend that you obtain the advice of a
959 | lawyer skilled in open source matters before removing the Classpath
960 | Exception or making modifications to this package which may
961 | subsequently be redistributed and/or involve the use of third party
962 | software.
963 |
964 | CLASSPATH EXCEPTION
965 | Linking this library statically or dynamically with other modules is
966 | making a combined work based on this library. Thus, the terms and
967 | conditions of the GNU General Public License version 2 cover the whole
968 | combination.
969 |
970 | As a special exception, the copyright holders of this library give you
971 | permission to link this library with independent modules to produce an
972 | executable, regardless of the license terms of these independent
973 | modules, and to copy and distribute the resulting executable under
974 | terms of your choice, provided that you also meet, for each linked
975 | independent module, the terms and conditions of the license of that
976 | module. An independent module is a module which is not derived from or
977 | based on this library. If you modify this library, you may extend this
978 | exception to your version of the library, but you are not obligated to
979 | do so. If you do not wish to do so, delete this exception statement
980 | from your version.
--------------------------------------------------------------------------------
/eb-glassfish-5.0/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM amazon/aws-eb-glassfish:5.0-al-base
2 |
3 | WORKDIR /var/app
4 |
5 | ADD glassfish-start.sh /
6 |
7 | ONBUILD ADD . /var/app/
8 |
9 | CMD []
10 | ENTRYPOINT ["/glassfish-start.sh"]
11 |
--------------------------------------------------------------------------------
/eb-glassfish-5.0/glassfish-start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | PID_FILE=$GLASSFISH_HOME/glassfish/domains/domain1/config/pid
4 |
5 | # when deploying a directory, Glassfish expect all submodules to be extracted
6 | # which is usually not the case for EARs
7 | # zip app back into a bundle and let Glassfish handle it
8 | rm -f /var/app/Dockerfile
9 | rm -f /var/app/Dockerrun.aws.json
10 | zip -r /var/app.zip .
11 |
12 | asadmin start-domain
13 | asadmin deploy --contextroot / --name current-app /var/app.zip
14 |
15 | inotifywait -qq -e delete_self $PID_FILE
16 |
--------------------------------------------------------------------------------
/generate-stackbrew-library.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | defaultVersion=4.1-jdk8
5 |
6 | versions=( 4.0-jdk7 4.1-jdk8 )
7 | url='git://github.com/aws/aws-eb-glassfish'
8 |
9 | echo '# maintainer: Amazon Web Services (@aws)'
10 |
11 | for version in "${versions[@]}"; do
12 | commit="$(git log -1 --format='format:%H' -- "$version")"
13 |
14 | glassfishVersion="${version%%-*}"
15 | jdkVersion="${version#*-}" # "jdk7"
16 |
17 | versionAliases=( $glassfishVersion-$jdkVersion $glassfishVersion) # 4.0-jdk7 4.0
18 |
19 | if [ "$glassfishVersion-$jdkVersion" = "$defaultVersion" ]; then
20 | versionAliases+=( latest )
21 | fi
22 |
23 | echo
24 | for va in "${versionAliases[@]}"; do
25 | echo "$va: ${url}@${commit} $version"
26 | done
27 | done
28 |
--------------------------------------------------------------------------------
/glassfish-5.0/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM amazonlinux:2018.03
2 |
3 | ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk.x86_64
4 | ENV GLASSFISH_HOME /usr/local/glassfish5
5 | ENV PATH $PATH:$JAVA_HOME/bin:$GLASSFISH_HOME/bin
6 |
7 | RUN yum update -y && \
8 | curl -L -o /tmp/epel-release.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
9 | yum install -y /tmp/epel-release.rpm && \
10 | yum install -y zip unzip inotify-tools java-1.8.0-openjdk-devel
11 |
12 | RUN curl -L -o /tmp/glassfish-5.0.zip http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip && \
13 | unzip /tmp/glassfish-5.0.zip -d /usr/local && \
14 | rm -f /tmp/glassfish-5.0.zip
15 |
16 | # patch joda-time jar and grizzly jar to solve ssl issue with glassfish 5.0.
17 | RUN curl https://repo1.maven.org/maven2/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar --output "$GLASSFISH_HOME/glassfish/domains/domain1/lib/ext/joda-time-2.9.9.jar"
18 | RUN curl https://repo1.maven.org/maven2/org/glassfish/grizzly/grizzly-npn-osgi/1.8/grizzly-npn-osgi-1.8.jar --output "$GLASSFISH_HOME/glassfish/modules/grizzly-npn-osgi.jar"
19 | RUN curl https://repo1.maven.org/maven2/org/glassfish/grizzly/grizzly-npn-bootstrap/1.8/grizzly-npn-bootstrap-1.8.jar --output "$GLASSFISH_HOME/glassfish/modules/endorsed/grizzly-npn-bootstrap.jar"
20 |
21 | EXPOSE 8080 4848 8181
22 |
23 | WORKDIR /usr/local/glassfish5
24 |
25 | CMD asadmin start-domain --verbose
26 |
--------------------------------------------------------------------------------