Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownStorageCageDetailsService.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/DownStorageCageService.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/impl/DownStorageCageDetailsServiceImpl.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downstorage/service/impl/DownStorageCageServiceImpl.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/test/java/mes/UnloadGlassModuleApplicationTest.java
68个文件已修改
64个文件已添加
19个文件已删除
| | |
| | | .idea/ |
| | | #忽略所有.iml文件 |
| | | *.iml |
| | | #忽略所有日志文件 |
| | | *.log |
| | | |
| | |
| | | |
| | | //提取菜单模块列表 |
| | | let menuList = $ref([]) |
| | | // request.get('/loadGlass/menu/sysMenu/list').then((res) => { |
| | | request.get('/loadGlass/sys/menu/getMenuTree').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | |
| | | <!-- 箭头 --> |
| | | <div id="arrow"></div> |
| | | <div id="line"></div> |
| | | <div class="centered-text" >NG24030401B01</div> |
| | | <!-- <div v-if="process_id" class="centered-text">{{ process_id }}</div> --> |
| | | <!-- <div class="centered-text" >NG24030401B01</div> --> |
| | | <div class="centered-text"> |
| | | <div>{{ rect.process_id }}</div> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | } |
| | | .centered-text { |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | if (valid) { |
| | | loginLoadings.value = true |
| | | request |
| | | // .post('/loadGlass/userinfo/login', userForm) |
| | | .post('/loadGlass/sys/user/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | |
| | | import { ref } from 'vue' |
| | | import { ref, onMounted } from 'vue'; |
| | | // import { ref } from 'vue' |
| | | |
| | | const dialogFormVisible = ref(true) |
| | | const dialogFormVisiblea = ref(false) |
| | | const dialogFormVisibleb = ref(false) |
| | | const width = ref(); // 用于存储process_id的响应式引用 |
| | | const height = ref(); // 用于存储process_id的响应式引用 |
| | | const adjustedRects = ref([]); |
| | | const adjustedRectsa = ref([]); |
| | | const adjustedRectsb = ref([]); |
| | | // 进炉中 |
| | | onMounted(async () => { |
| | | try { |
| | | const response = await request.get('/temperingGlass/temperingGlassInfo/SelectIntoGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | adjustedRects.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }); |
| | | // 进炉前 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/SelectWaitingGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | adjustedRectsa.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }; |
| | | |
| | | // 已出炉 |
| | | const handleConfirma = async () => { |
| | | try { |
| | | const response = await request.get('/temperingGlass/temperingGlassInfo/SelectOutGlass'); |
| | | if (response.code === 200) { |
| | | const rawRects = response.data; // 设置矩形数据 |
| | | console.log(response.data); |
| | | const { height: newheight,width: newwidth } = response.data; // 获取尺寸 |
| | | height.value = newheight; |
| | | width.value = newwidth; |
| | | |
| | | adjustedRectsb.value = rawRects.map(rect => ({ |
| | | ...rect, // 复制原始对象的其他属性 |
| | | xcoordinate: rect.xcoordinate, // 将x值除以3 |
| | | ycoordinate: rect.ycoordinate, |
| | | width: rect.width , |
| | | height: rect.height , |
| | | })); |
| | | console.log(rect); |
| | | |
| | | // console.log( (rect.width*100) / 300 ); |
| | | } else { |
| | | // console.error('Failed to fetch rectangles from API.'); |
| | | console.error('Failed to fetch rects from API.'); |
| | | } |
| | | } catch (error) { |
| | | // console.error('Error fetching rectangles :', error); |
| | | console.error('Error fetching rects :', error); |
| | | } |
| | | }; |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <template> |
| | | <div style="margin-top: 10px;"> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false">摆片版图</el-button> |
| | | <el-button id="searchButton" type="success" @click="dialogFormVisiblea = true;dialogFormVisible = false">已出炉玻璃</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="dialogFormVisible = true;dialogFormVisiblea = false;dialogFormVisibleb = false;">进炉中</el-button> |
| | | <el-button style="margin-left: 15px;" id="searchButton" type="primary" @click="handleConfirm();dialogFormVisiblea = true;dialogFormVisible = false;dialogFormVisibleb = false;" >进炉前</el-button> |
| | | <el-button id="searchButton" type="success" @click="handleConfirma();dialogFormVisibleb = true;dialogFormVisible = false;dialogFormVisiblea = false">已出炉玻璃</el-button> |
| | | <div v-if="dialogFormVisible" > |
| | | <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <div style="display: flex;margin-bottom: 20px;"> |
| | | <!-- <div style="display: flex;margin-bottom: 20px;"> |
| | | <div style="margin-left: 450px;font-size: 20px;">工程号:P20240305001 </div> |
| | | <div style="margin-left: 150px;font-size: 20px;">版图编号:1</div> |
| | | </div> |
| | | <div> |
| | | <div id="boxa" style="width: 200px;height: 300px;margin-left: 70px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <div id="boxa" style="width: 200px;height: 300px;margin-left: 70px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxa" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | <div id="boxb" style="width: 200px;height: 300px;"> |
| | | <div style="margin-top: 35px;"> NG202405060798A01-1</div> |
| | | <div> 500×1000</div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisiblea"> |
| | | </div> --> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="630px"> |
| | | <div id="home-card"> |
| | | <div id="home-item" v-for="n in 20" :key="n"> |
| | | <div id="box" style="width: 100px;height: 165px;">100*65</div> |
| | | <div id="box" style="width: 107px;height: 150px;">107*60</div> |
| | | <div id="box" style="width: 107px;height: 155px;">109*60</div> |
| | | </div> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | <div v-if="dialogFormVisiblea"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="630px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | <div v-if="dialogFormVisibleb"> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> |
| | | <el-scrollbar height="630px"> |
| | | <div style="position: relative;width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects" |
| | | :key="index" |
| | | class="rect" |
| | | :style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`, width: `${rect.width}px`, height: `${rect.height}px` }" |
| | | > |
| | | <div class="centered-text"> |
| | | <div style="margin-top: 50px;margin-left: -85px;">{{ rect.width }}*{{ rect.height }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-scrollbar> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | } |
| | | } |
| | | } |
| | | .rect { |
| | | border: 1px solid black; /* 设置矩形的边框 */ |
| | | background-color: lightblue; /* 设置矩形的背景色 */ |
| | | } |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |
| | | /* 其他样式 */ |
| | | } |
| | | .centered-text { |
| | | /* 设置文字居中样式 */ |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | } |
| | | </style> |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
| | | |
| | | |
| | | Apache Maven includes a number of components and libraries with separate |
| | | copyright notices and license terms. Your use of those components are |
| | | subject to the terms and conditions of the following licenses: |
| | | |
| | | - lib/guava-25.1-android.jar: com.google.guava:guava:bundle:25.1-android |
| | | Guava: Google Core Libraries for Java |
| | | Project URL: https://github.com/google/guava/ |
| | | License: The Apache Software License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/guava.license) |
| | | |
| | | |
| | | - lib/guice-4.2.1.jar: com.google.inject:guice:jar:4.2.1 |
| | | Google Guice - Core Library |
| | | Project URL: https://github.com/google/guice/ |
| | | License: The Apache Software License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/guice.license) |
| | | |
| | | |
| | | - lib/commons-cli-1.4.jar: commons-cli:commons-cli:jar:1.4 |
| | | Apache Commons CLI |
| | | Project URL: http://commons.apache.org/proper/commons-cli/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) https://www.apache.org/licenses/LICENSE-2.0.txt (lib/commons-cli.license) |
| | | |
| | | |
| | | - lib/commons-io-2.5.jar: commons-io:commons-io:jar:2.5 |
| | | Apache Commons IO |
| | | Project URL: http://commons.apache.org/proper/commons-io/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/commons-io.license) |
| | | |
| | | |
| | | - lib/jsr250-api-1.0.jar: javax.annotation:jsr250-api:jar:1.0 |
| | | JSR-250 Common Annotations for the JavaTM Platform |
| | | Project URL: http://jcp.org/aboutJava/communityprocess/final/jsr250/index.html |
| | | License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 (CDDL-1.0) https://glassfish.dev.java.net/public/CDDLv1.0.html (lib/jsr250-api.license) |
| | | |
| | | |
| | | - lib/cdi-api-1.0.jar: javax.enterprise:cdi-api:jar:1.0 |
| | | CDI APIs |
| | | Project URL: http://www.seamframework.org/Weld/cdi-api |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0 (lib/cdi-api.license) |
| | | |
| | | |
| | | - lib/javax.inject-1.jar: javax.inject:javax.inject:jar:1 |
| | | javax.inject |
| | | Project URL: http://code.google.com/p/atinject/ |
| | | License: The Apache Software License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/javax.inject.license) |
| | | |
| | | |
| | | - lib/commons-lang3-3.8.1.jar: org.apache.commons:commons-lang3:jar:3.8.1 |
| | | Apache Commons Lang |
| | | Project URL: http://commons.apache.org/proper/commons-lang/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) https://www.apache.org/licenses/LICENSE-2.0.txt (lib/commons-lang3.license) |
| | | |
| | | |
| | | - boot/plexus-classworlds-2.6.0.jar: org.codehaus.plexus:plexus-classworlds:bundle:2.6.0 |
| | | Plexus Classworlds |
| | | Project URL: http://codehaus-plexus.github.io/plexus-classworlds/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (boot/plexus-classworlds.license) |
| | | |
| | | |
| | | - lib/plexus-component-annotations-2.1.0.jar: org.codehaus.plexus:plexus-component-annotations:jar:2.1.0 |
| | | Plexus :: Component Annotations |
| | | Project URL: http://codehaus-plexus.github.io/plexus-containers/plexus-component-annotations/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/plexus-component-annotations.license) |
| | | |
| | | |
| | | - lib/plexus-interpolation-1.25.jar: org.codehaus.plexus:plexus-interpolation:bundle:1.25 |
| | | Plexus Interpolation API |
| | | Project URL: http://codehaus-plexus.github.io/plexus-interpolation/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/plexus-interpolation.license) |
| | | |
| | | |
| | | - lib/plexus-utils-3.2.1.jar: org.codehaus.plexus:plexus-utils:jar:3.2.1 |
| | | Plexus Common Utilities |
| | | Project URL: http://codehaus-plexus.github.io/plexus-utils/ |
| | | License: Apache License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/plexus-utils.license) |
| | | |
| | | |
| | | - lib/org.eclipse.sisu.inject-0.3.4.jar: org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4 |
| | | org.eclipse.sisu.inject |
| | | Project URL: https://www.eclipse.org/sisu/ |
| | | License: Eclipse Public License, Version 1.0 (EPL-1.0) http://www.eclipse.org/legal/epl-v10.html (lib/org.eclipse.sisu.inject.license) |
| | | |
| | | |
| | | - lib/org.eclipse.sisu.plexus-0.3.4.jar: org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.4 |
| | | org.eclipse.sisu.plexus |
| | | Project URL: https://www.eclipse.org/sisu/ |
| | | License: Eclipse Public License, Version 1.0 (EPL-1.0) http://www.eclipse.org/legal/epl-v10.html (lib/org.eclipse.sisu.plexus.license) |
| | | |
| | | |
| | | - lib/jansi-1.17.1.jar: org.fusesource.jansi:jansi:jar:1.17.1 |
| | | jansi |
| | | Project URL: http://fusesource.github.io/jansi/jansi |
| | | License: The Apache Software License, Version 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0.txt (lib/jansi.license) |
| | | |
| | | |
| | | - lib/jsoup-1.12.1.jar: org.jsoup:jsoup:jar:1.12.1 |
| | | jsoup Java HTML Parser |
| | | Project URL: https://jsoup.org/ |
| | | License: The MIT License (MIT) https://jsoup.org/license (lib/jsoup.license) |
| | | |
| | | |
| | | - lib/jcl-over-slf4j-1.7.29.jar: org.slf4j:jcl-over-slf4j:jar:1.7.29 |
| | | JCL 1.2 implemented over SLF4J |
| | | Project URL: http://www.slf4j.org |
| | | License: Apache License, Version 2.0 (ASL-2.0) https://www.apache.org/licenses/LICENSE-2.0.txt (lib/jcl-over-slf4j.license) |
| | | |
| | | |
| | | - lib/slf4j-api-1.7.29.jar: org.slf4j:slf4j-api:jar:1.7.29 |
| | | SLF4J API Module |
| | | Project URL: http://www.slf4j.org |
| | | License: MIT License (MIT) http://www.opensource.org/licenses/mit-license.php (lib/slf4j-api.license) |
| | | |
| | | |
| | | - lib/plexus-cipher-1.7.jar: org.sonatype.plexus:plexus-cipher:jar:1.7 |
| | | Plexus Cipher: encryption/decryption Component |
| | | Project URL: http://spice.sonatype.org/plexus-cipher |
| | | License: Apache Public License 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0 (lib/plexus-cipher.license) |
| | | |
| | | |
| | | - lib/plexus-sec-dispatcher-1.4.jar: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4 |
| | | Plexus Security Dispatcher Component |
| | | Project URL: http://spice.sonatype.org/plexus-sec-dispatcher |
| | | License: Apache Public License 2.0 (ASL-2.0) http://www.apache.org/licenses/LICENSE-2.0 (lib/plexus-sec-dispatcher.license) |
| | | |
New file |
| | |
| | | |
| | | Apache Maven Distribution |
| | | Copyright 2001-2019 The Apache Software Foundation |
| | | |
| | | This product includes software developed at |
| | | The Apache Software Foundation (http://www.apache.org/). |
| | | |
| | | |
| | | This software bundles the following NOTICE files from third party library providers: |
| | | |
| | | META-INF/NOTICE in archive lib/guice-4.2.1-no_aop.jar |
| | | Google Guice - Core Library |
| | | Copyright 2006-2018 Google, Inc. |
| | | This product includes software developed at |
| | | The Apache Software Foundation (http://www.apache.org/). |
| | | |
| | | META-INF/NOTICE in archive lib/plexus-utils-3.2.1.jar |
| | | This product includes software developed by the Indiana University |
| | | Extreme! Lab (http://www.extreme.indiana.edu/). |
| | | This product includes software developed by |
| | | The Apache Software Foundation (http://www.apache.org/). |
| | | This product includes software developed by |
| | | ThoughtWorks (http://www.thoughtworks.com). |
| | | This product includes software developed by |
| | | javolution (http://javolution.org/). |
| | | This product includes software developed by |
| | | Rome (https://rome.dev.java.net/). |
| | | |
| | | about.html in archive lib/org.eclipse.sisu.inject-0.3.4.jar |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| | | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> |
| | | <title>About org.eclipse.sisu.inject</title> |
| | | </head> |
| | | <body lang="EN-US"> |
| | | <h2>About org.eclipse.sisu.inject</h2> |
| | | |
| | | <p>November 5, 2013</p> |
| | | <h3>License</h3> |
| | | |
| | | <p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise |
| | | indicated below, the Content is provided to you under the terms and conditions of the |
| | | Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available |
| | | at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. |
| | | For purposes of the EPL, "Program" will mean the Content.</p> |
| | | |
| | | <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is |
| | | being redistributed by another party ("Redistributor") and different terms and conditions may |
| | | apply to your use of any object code in the Content. Check the Redistributor's license that was |
| | | provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise |
| | | indicated below, the terms and conditions of the EPL still apply to any source code in the Content |
| | | and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p> |
| | | |
| | | <h3>Third Party Content</h3> |
| | | <p>The Content includes items that have been sourced from third parties as set |
| | | out below. If you did not receive this Content directly from the Eclipse Foundation, |
| | | the following is provided for informational purposes only, and you should look |
| | | to the Redistributor's license for terms and conditions of use.</p> |
| | | |
| | | <h4>ASM 4.1</h4> |
| | | <p>The plug-in includes software developed by the ObjectWeb consortium as part |
| | | of the ASM project at <a href="http://asm.ow2.org/">http://asm.ow2.org/</a>.</p> |
| | | |
| | | <p>A subset of ASM is re-packaged within the source and binary of the plug-in (org.eclipse.sisu.space.asm.*) |
| | | to avoid version collisions with other usage and is also available from the plug-in's github repository.</p> |
| | | |
| | | <p>Your use of the ASM code is subject to the terms and conditions of the ASM License |
| | | below which is also available at <a href="http://asm.ow2.org/license.html">http://asm.ow2.org/license.html</a>.</p> |
| | | |
| | | <blockquote><pre> |
| | | Copyright (c) 2000-2011 INRIA, France Telecom |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without |
| | | modification, are permitted provided that the following conditions |
| | | are met: |
| | | |
| | | 1. Redistributions of source code must retain the above copyright |
| | | notice, this list of conditions and the following disclaimer. |
| | | |
| | | 2. Redistributions in binary form must reproduce the above copyright |
| | | notice, this list of conditions and the following disclaimer in the |
| | | documentation and/or other materials provided with the distribution. |
| | | |
| | | 3. Neither the name of the copyright holders nor the names of its |
| | | contributors may be used to endorse or promote products derived from |
| | | this software without specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| | | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| | | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| | | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| | | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| | | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| | | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| | | THE POSSIBILITY OF SUCH DAMAGE. |
| | | </pre></blockquote> |
| | | |
| | | </body> |
| | | </html> |
New file |
| | |
| | | |
| | | Apache Maven |
| | | |
| | | What is it? |
| | | ----------- |
| | | |
| | | Maven is a software project management and comprehension tool. Based on |
| | | the concept of a Project Object Model (POM), Maven can manage a project's |
| | | build, reporting and documentation from a central piece of information. |
| | | |
| | | Documentation |
| | | ------------- |
| | | |
| | | The most up-to-date documentation can be found at https://maven.apache.org/. |
| | | |
| | | Release Notes |
| | | ------------- |
| | | |
| | | The full list of changes can be found at https://maven.apache.org/docs/history.html. |
| | | |
| | | System Requirements |
| | | ------------------- |
| | | |
| | | JDK: |
| | | 1.7 or above (this is to execute Maven - it still allows you to build against 1.3 |
| | | and prior JDK's). |
| | | Memory: |
| | | No minimum requirement. |
| | | Disk: |
| | | Approximately 10MB is required for the Maven installation itself. In addition to |
| | | that, additional disk space will be used for your local Maven repository. The size |
| | | of your local repository will vary depending on usage but expect at least 500MB. |
| | | Operating System: |
| | | Windows: |
| | | Windows 2000 or above. |
| | | Unix based systems (Linux, Solaris and Mac OS X) and others: |
| | | No minimum requirement. |
| | | |
| | | Installing Maven |
| | | ---------------- |
| | | |
| | | 1) Unpack the archive where you would like to store the binaries, e.g.: |
| | | |
| | | Unix-based operating systems (Linux, Solaris and Mac OS X) |
| | | tar zxvf apache-maven-3.x.y.tar.gz |
| | | Windows |
| | | unzip apache-maven-3.x.y.zip |
| | | |
| | | 2) A directory called "apache-maven-3.x.y" will be created. |
| | | |
| | | 3) Add the bin directory to your PATH, e.g.: |
| | | |
| | | Unix-based operating systems (Linux, Solaris and Mac OS X) |
| | | export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH |
| | | Windows |
| | | set PATH="c:\program files\apache-maven-3.x.y\bin";%PATH% |
| | | |
| | | 4) Make sure JAVA_HOME is set to the location of your JDK |
| | | |
| | | 5) Run "mvn --version" to verify that it is correctly installed. |
| | | |
| | | For complete documentation, see https://maven.apache.org/download.html#Installation |
| | | |
| | | Licensing |
| | | --------- |
| | | |
| | | Please see the file called LICENSE. |
| | | |
| | | Maven URLS |
| | | ---------- |
| | | |
| | | Home Page: https://maven.apache.org/ |
| | | Downloads: https://maven.apache.org/download.html |
| | | Release Notes: https://maven.apache.org/docs/history.html |
| | | Mailing Lists: https://maven.apache.org/mailing-lists.html |
| | | Source Code: https://gitbox.apache.org/repos/asf/maven.git |
| | | Issue Tracking: https://issues.apache.org/jira/browse/MNG |
| | | Wiki: https://cwiki.apache.org/confluence/display/MAVEN/ |
| | | Available Plugins: https://maven.apache.org/plugins/ |
New file |
| | |
| | | main is org.apache.maven.cli.MavenCli from plexus.core |
| | | |
| | | set maven.conf default ${maven.home}/conf |
| | | |
| | | [plexus.core] |
| | | load ${maven.conf}/logging |
| | | optionally ${maven.home}/lib/ext/*.jar |
| | | load ${maven.home}/lib/*.jar |
New file |
| | |
| | | #!/bin/sh |
| | | |
| | | # Licensed to the Apache Software Foundation (ASF) under one |
| | | # or more contributor license agreements. See the NOTICE file |
| | | # distributed with this work for additional information |
| | | # regarding copyright ownership. The ASF licenses this file |
| | | # to you under the Apache License, Version 2.0 (the |
| | | # "License"); you may not use this file except in compliance |
| | | # with the License. You may obtain a copy of the License at |
| | | # |
| | | # http://www.apache.org/licenses/LICENSE-2.0 |
| | | # |
| | | # Unless required by applicable law or agreed to in writing, |
| | | # software distributed under the License is distributed on an |
| | | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | # KIND, either express or implied. See the License for the |
| | | # specific language governing permissions and limitations |
| | | # under the License. |
| | | |
| | | # ----------------------------------------------------------------------------- |
| | | # Apache Maven Startup Script |
| | | # |
| | | # Environment Variable Prerequisites |
| | | # |
| | | # JAVA_HOME Must point at your Java Development Kit installation. |
| | | # MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. |
| | | # MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. |
| | | # ----------------------------------------------------------------------------- |
| | | |
| | | if [ -z "$MAVEN_SKIP_RC" ] ; then |
| | | |
| | | if [ -f /etc/mavenrc ] ; then |
| | | . /etc/mavenrc |
| | | fi |
| | | |
| | | if [ -f "$HOME/.mavenrc" ] ; then |
| | | . "$HOME/.mavenrc" |
| | | fi |
| | | |
| | | fi |
| | | |
| | | # OS specific support. $var _must_ be set to either true or false. |
| | | cygwin=false; |
| | | mingw=false; |
| | | case "`uname`" in |
| | | CYGWIN*) cygwin=true;; |
| | | MINGW*) mingw=true;; |
| | | esac |
| | | |
| | | ## resolve links - $0 may be a link to Maven's home |
| | | PRG="$0" |
| | | |
| | | # need this for relative symlinks |
| | | while [ -h "$PRG" ] ; do |
| | | ls=`ls -ld "$PRG"` |
| | | link=`expr "$ls" : '.*-> \(.*\)$'` |
| | | if expr "$link" : '/.*' > /dev/null; then |
| | | PRG="$link" |
| | | else |
| | | PRG="`dirname "$PRG"`/$link" |
| | | fi |
| | | done |
| | | |
| | | saveddir=`pwd` |
| | | |
| | | MAVEN_HOME=`dirname "$PRG"`/.. |
| | | |
| | | # make it fully qualified |
| | | MAVEN_HOME=`cd "$MAVEN_HOME" && pwd` |
| | | |
| | | cd "$saveddir" |
| | | |
| | | # For Cygwin, ensure paths are in Unix format before anything is touched |
| | | if $cygwin ; then |
| | | [ -n "$MAVEN_HOME" ] && |
| | | MAVEN_HOME=`cygpath --unix "$MAVEN_HOME"` |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` |
| | | [ -n "$CLASSPATH" ] && |
| | | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` |
| | | fi |
| | | |
| | | # For MinGW, ensure paths are in Unix format before anything is touched |
| | | if $mingw ; then |
| | | [ -n "$MAVEN_HOME" ] && |
| | | MAVEN_HOME=`(cd "$MAVEN_HOME"; pwd)` |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=`(cd "$JAVA_HOME"; pwd)` |
| | | # TODO classpath? |
| | | fi |
| | | |
| | | if [ -z "$JAVA_HOME" ] ; then |
| | | JAVACMD=`which java` |
| | | else |
| | | JAVACMD="$JAVA_HOME/bin/java" |
| | | fi |
| | | |
| | | if [ ! -x "$JAVACMD" ] ; then |
| | | echo "The JAVA_HOME environment variable is not defined correctly" >&2 |
| | | echo "This environment variable is needed to run this program" >&2 |
| | | echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2 |
| | | exit 1 |
| | | fi |
| | | |
| | | CLASSWORLDS_JAR=`echo "${MAVEN_HOME}"/boot/plexus-classworlds-*.jar` |
| | | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
| | | |
| | | # For Cygwin, switch paths to Windows format before running java |
| | | if $cygwin ; then |
| | | [ -n "$MAVEN_HOME" ] && |
| | | MAVEN_HOME=`cygpath --path --windows "$MAVEN_HOME"` |
| | | [ -n "$JAVA_HOME" ] && |
| | | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` |
| | | [ -n "$CLASSPATH" ] && |
| | | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` |
| | | [ -n "$CLASSWORLDS_JAR" ] && |
| | | CLASSWORLDS_JAR=`cygpath --path --windows "$CLASSWORLDS_JAR"` |
| | | fi |
| | | |
| | | # traverses directory structure from process work directory to filesystem root |
| | | # first directory with .mvn subdirectory is considered project base directory |
| | | find_maven_basedir() { |
| | | ( |
| | | basedir=`find_file_argument_basedir "$@"` |
| | | wdir="${basedir}" |
| | | while [ "$wdir" != '/' ] ; do |
| | | if [ -d "$wdir"/.mvn ] ; then |
| | | basedir=$wdir |
| | | break |
| | | fi |
| | | wdir=`cd "$wdir/.."; pwd` |
| | | done |
| | | echo "${basedir}" |
| | | ) |
| | | } |
| | | |
| | | find_file_argument_basedir() { |
| | | ( |
| | | basedir=`pwd` |
| | | |
| | | found_file_switch=0 |
| | | for arg in "$@"; do |
| | | if [ ${found_file_switch} -eq 1 ]; then |
| | | if [ -d "${arg}" ]; then |
| | | basedir=`cd "${arg}" && pwd -P` |
| | | elif [ -f "${arg}" ]; then |
| | | basedir=`dirname "${arg}"` |
| | | basedir=`cd "${basedir}" && pwd -P` |
| | | if [ ! -d "${basedir}" ]; then |
| | | echo "Directory ${basedir} extracted from the -f/--file command-line argument ${arg} does not exist" >&2 |
| | | exit 1 |
| | | fi |
| | | else |
| | | echo "POM file ${arg} specified with the -f/--file command line argument does not exist" >&2 |
| | | exit 1 |
| | | fi |
| | | break |
| | | fi |
| | | if [ "$arg" = "-f" -o "$arg" = "--file" ]; then |
| | | found_file_switch=1 |
| | | fi |
| | | done |
| | | echo "${basedir}" |
| | | ) |
| | | } |
| | | |
| | | # concatenates all lines of a file |
| | | concat_lines() { |
| | | if [ -f "$1" ]; then |
| | | echo "`tr -s '\r\n' ' ' < "$1"`" |
| | | fi |
| | | } |
| | | |
| | | MAVEN_PROJECTBASEDIR="${MAVEN_BASEDIR:-`find_maven_basedir "$@"`}" |
| | | MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS" |
| | | |
| | | # For Cygwin, switch project base directory path to Windows format before |
| | | # executing Maven otherwise this will cause Maven not to consider it. |
| | | if $cygwin ; then |
| | | [ -n "$MAVEN_PROJECTBASEDIR" ] && |
| | | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` |
| | | fi |
| | | |
| | | export MAVEN_PROJECTBASEDIR |
| | | |
| | | # Provide a "standardized" way to retrieve the CLI args that will |
| | | # work with both Windows and non-Windows executions. |
| | | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
| | | export MAVEN_CMD_LINE_ARGS |
| | | |
| | | exec "$JAVACMD" \ |
| | | $MAVEN_OPTS \ |
| | | $MAVEN_DEBUG_OPTS \ |
| | | -classpath "${CLASSWORLDS_JAR}" \ |
| | | "-Dclassworlds.conf=${MAVEN_HOME}/bin/m2.conf" \ |
| | | "-Dmaven.home=${MAVEN_HOME}" \ |
| | | "-Dlibrary.jansi.path=${MAVEN_HOME}/lib/jansi-native" \ |
| | | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
| | | ${CLASSWORLDS_LAUNCHER} "$@" |
New file |
| | |
| | | @REM Licensed to the Apache Software Foundation (ASF) under one |
| | | @REM or more contributor license agreements. See the NOTICE file |
| | | @REM distributed with this work for additional information |
| | | @REM regarding copyright ownership. The ASF licenses this file |
| | | @REM to you under the Apache License, Version 2.0 (the |
| | | @REM "License"); you may not use this file except in compliance |
| | | @REM with the License. You may obtain a copy of the License at |
| | | @REM |
| | | @REM http://www.apache.org/licenses/LICENSE-2.0 |
| | | @REM |
| | | @REM Unless required by applicable law or agreed to in writing, |
| | | @REM software distributed under the License is distributed on an |
| | | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | @REM KIND, either express or implied. See the License for the |
| | | @REM specific language governing permissions and limitations |
| | | @REM under the License. |
| | | |
| | | @REM ----------------------------------------------------------------------------- |
| | | @REM Apache Maven Startup Script |
| | | @REM |
| | | @REM Environment Variable Prerequisites |
| | | @REM |
| | | @REM JAVA_HOME Must point at your Java Development Kit installation. |
| | | @REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands. |
| | | @REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending. |
| | | @REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. |
| | | @REM MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. |
| | | @REM ----------------------------------------------------------------------------- |
| | | |
| | | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
| | | @echo off |
| | | @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' |
| | | @if "%MAVEN_BATCH_ECHO%"=="on" echo %MAVEN_BATCH_ECHO% |
| | | |
| | | @REM Execute a user defined script before this one |
| | | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPre |
| | | @REM check for pre script, once with legacy .bat ending and once with .cmd ending |
| | | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" |
| | | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" |
| | | :skipRcPre |
| | | |
| | | @setlocal |
| | | |
| | | set ERROR_CODE=0 |
| | | |
| | | @REM ==== START VALIDATION ==== |
| | | if not "%JAVA_HOME%"=="" goto OkJHome |
| | | for %%i in (java.exe) do set "JAVACMD=%%~$PATH:i" |
| | | goto checkJCmd |
| | | |
| | | :OkJHome |
| | | set "JAVACMD=%JAVA_HOME%\bin\java.exe" |
| | | |
| | | :checkJCmd |
| | | if exist "%JAVACMD%" goto chkMHome |
| | | |
| | | echo The JAVA_HOME environment variable is not defined correctly >&2 |
| | | echo This environment variable is needed to run this program >&2 |
| | | echo NB: JAVA_HOME should point to a JDK not a JRE >&2 |
| | | goto error |
| | | |
| | | :chkMHome |
| | | set "MAVEN_HOME=%~dp0.." |
| | | if not "%MAVEN_HOME%"=="" goto stripMHome |
| | | goto error |
| | | |
| | | :stripMHome |
| | | if not "_%MAVEN_HOME:~-1%"=="_\" goto checkMCmd |
| | | set "MAVEN_HOME=%MAVEN_HOME:~0,-1%" |
| | | goto stripMHome |
| | | |
| | | :checkMCmd |
| | | if exist "%MAVEN_HOME%\bin\mvn.cmd" goto init |
| | | goto error |
| | | @REM ==== END VALIDATION ==== |
| | | |
| | | :init |
| | | |
| | | set MAVEN_CMD_LINE_ARGS=%* |
| | | |
| | | @REM Find the project basedir, i.e., the directory that contains the folder ".mvn". |
| | | @REM Fallback to current working directory if not found. |
| | | |
| | | set "MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%" |
| | | if not "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
| | | |
| | | set "EXEC_DIR=%CD%" |
| | | set "WDIR=%EXEC_DIR%" |
| | | |
| | | @REM Look for the --file switch and start the search for the .mvn directory from the specified |
| | | @REM POM location, if supplied. |
| | | |
| | | set FILE_ARG= |
| | | :arg_loop |
| | | if "%~1" == "-f" ( |
| | | set "FILE_ARG=%~2" |
| | | shift |
| | | goto process_file_arg |
| | | ) |
| | | if "%~1" == "--file" ( |
| | | set "FILE_ARG=%~2" |
| | | shift |
| | | goto process_file_arg |
| | | ) |
| | | @REM If none of the above, skip the argument |
| | | shift |
| | | if not "%~1" == "" ( |
| | | goto arg_loop |
| | | ) else ( |
| | | goto findBaseDir |
| | | ) |
| | | |
| | | :process_file_arg |
| | | if "%FILE_ARG%" == "" ( |
| | | goto findBaseDir |
| | | ) |
| | | if not exist "%FILE_ARG%" ( |
| | | echo POM file "%FILE_ARG%" specified the -f/--file command-line argument does not exist >&2 |
| | | goto error |
| | | ) |
| | | if exist "%FILE_ARG%\*" ( |
| | | set "POM_DIR=%FILE_ARG%" |
| | | ) else ( |
| | | call :get_directory_from_file "%FILE_ARG%" |
| | | ) |
| | | if not exist "%POM_DIR%" ( |
| | | echo Directory "%POM_DIR%" extracted from the -f/--file command-line argument "%FILE_ARG%" does not exist >&2 |
| | | goto error |
| | | ) |
| | | set "WDIR=%POM_DIR%" |
| | | goto findBaseDir |
| | | |
| | | :get_directory_from_file |
| | | set "POM_DIR=%~dp1" |
| | | :stripPomDir |
| | | if not "_%POM_DIR:~-1%"=="_\" goto pomDirStripped |
| | | set "POM_DIR=%POM_DIR:~0,-1%" |
| | | goto stripPomDir |
| | | :pomDirStripped |
| | | exit /b |
| | | |
| | | :findBaseDir |
| | | cd /d "%WDIR%" |
| | | :findBaseDirLoop |
| | | if exist "%WDIR%\.mvn" goto baseDirFound |
| | | cd .. |
| | | IF "%WDIR%"=="%CD%" goto baseDirNotFound |
| | | set "WDIR=%CD%" |
| | | goto findBaseDirLoop |
| | | |
| | | :baseDirFound |
| | | set "MAVEN_PROJECTBASEDIR=%WDIR%" |
| | | cd /d "%EXEC_DIR%" |
| | | goto endDetectBaseDir |
| | | |
| | | :baseDirNotFound |
| | | if "_%EXEC_DIR:~-1%"=="_\" set "EXEC_DIR=%EXEC_DIR:~0,-1%" |
| | | set "MAVEN_PROJECTBASEDIR=%EXEC_DIR%" |
| | | cd "%EXEC_DIR%" |
| | | |
| | | :endDetectBaseDir |
| | | |
| | | set "jvmConfig=\.mvn\jvm.config" |
| | | if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto endReadAdditionalConfig |
| | | |
| | | @setlocal EnableExtensions EnableDelayedExpansion |
| | | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
| | | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
| | | |
| | | :endReadAdditionalConfig |
| | | |
| | | for %%i in ("%MAVEN_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i" |
| | | set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
| | | |
| | | "%JAVACMD%" ^ |
| | | %JVM_CONFIG_MAVEN_PROPS% ^ |
| | | %MAVEN_OPTS% ^ |
| | | %MAVEN_DEBUG_OPTS% ^ |
| | | -classpath %CLASSWORLDS_JAR% ^ |
| | | "-Dclassworlds.conf=%MAVEN_HOME%\bin\m2.conf" ^ |
| | | "-Dmaven.home=%MAVEN_HOME%" ^ |
| | | "-Dlibrary.jansi.path=%MAVEN_HOME%\lib\jansi-native" ^ |
| | | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ |
| | | %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS% |
| | | if ERRORLEVEL 1 goto error |
| | | goto end |
| | | |
| | | :error |
| | | set ERROR_CODE=1 |
| | | |
| | | :end |
| | | @endlocal & set ERROR_CODE=%ERROR_CODE% |
| | | |
| | | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost |
| | | @REM check for post script, once with legacy .bat ending and once with .cmd ending |
| | | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" |
| | | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" |
| | | :skipRcPost |
| | | |
| | | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
| | | if "%MAVEN_BATCH_PAUSE%"=="on" pause |
| | | |
| | | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% |
| | | |
| | | cmd /C exit /B %ERROR_CODE% |
New file |
| | |
| | | #!/bin/sh |
| | | |
| | | # Licensed to the Apache Software Foundation (ASF) under one |
| | | # or more contributor license agreements. See the NOTICE file |
| | | # distributed with this work for additional information |
| | | # regarding copyright ownership. The ASF licenses this file |
| | | # to you under the Apache License, Version 2.0 (the |
| | | # "License"); you may not use this file except in compliance |
| | | # with the License. You may obtain a copy of the License at |
| | | # |
| | | # http://www.apache.org/licenses/LICENSE-2.0 |
| | | # |
| | | # Unless required by applicable law or agreed to in writing, |
| | | # software distributed under the License is distributed on an |
| | | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | # KIND, either express or implied. See the License for the |
| | | # specific language governing permissions and limitations |
| | | # under the License. |
| | | |
| | | # ----------------------------------------------------------------------------- |
| | | # Apache Maven Debug Script |
| | | # |
| | | # Environment Variable Prerequisites |
| | | # |
| | | # JAVA_HOME Must point at your Java Development Kit installation. |
| | | # MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. |
| | | # MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. |
| | | # ----------------------------------------------------------------------------- |
| | | |
| | | MAVEN_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" |
| | | |
| | | echo Preparing to execute Maven in debug mode |
| | | |
| | | env MAVEN_OPTS="$MAVEN_OPTS" MAVEN_DEBUG_OPTS="$MAVEN_DEBUG_OPTS" "`dirname "$0"`/mvn" "$@" |
New file |
| | |
| | | @REM Licensed to the Apache Software Foundation (ASF) under one |
| | | @REM or more contributor license agreements. See the NOTICE file |
| | | @REM distributed with this work for additional information |
| | | @REM regarding copyright ownership. The ASF licenses this file |
| | | @REM to you under the Apache License, Version 2.0 (the |
| | | @REM "License"); you may not use this file except in compliance |
| | | @REM with the License. You may obtain a copy of the License at |
| | | @REM |
| | | @REM http://www.apache.org/licenses/LICENSE-2.0 |
| | | @REM |
| | | @REM Unless required by applicable law or agreed to in writing, |
| | | @REM software distributed under the License is distributed on an |
| | | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | @REM KIND, either express or implied. See the License for the |
| | | @REM specific language governing permissions and limitations |
| | | @REM under the License. |
| | | |
| | | @REM ----------------------------------------------------------------------------- |
| | | @REM Apache Maven Debug Script |
| | | @REM |
| | | @REM Environment Variable Prerequisites |
| | | @REM |
| | | @REM JAVA_HOME Must point at your Java Development Kit installation. |
| | | @REM MAVEN_BATCH_ECHO (Optional) Set to 'on' to enable the echoing of the batch commands. |
| | | @REM MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending. |
| | | @REM MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. |
| | | @REM MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. |
| | | @REM ----------------------------------------------------------------------------- |
| | | |
| | | @setlocal |
| | | @set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
| | | |
| | | @call "%~dp0"mvn.cmd %* |
New file |
| | |
| | | #!/bin/sh |
| | | |
| | | # Licensed to the Apache Software Foundation (ASF) under one |
| | | # or more contributor license agreements. See the NOTICE file |
| | | # distributed with this work for additional information |
| | | # regarding copyright ownership. The ASF licenses this file |
| | | # to you under the Apache License, Version 2.0 (the |
| | | # "License"); you may not use this file except in compliance |
| | | # with the License. You may obtain a copy of the License at |
| | | # |
| | | # http://www.apache.org/licenses/LICENSE-2.0 |
| | | # |
| | | # Unless required by applicable law or agreed to in writing, |
| | | # software distributed under the License is distributed on an |
| | | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | # KIND, either express or implied. See the License for the |
| | | # specific language governing permissions and limitations |
| | | # under the License. |
| | | |
| | | # ----------------------------------------------------------------------------- |
| | | # Apache Maven YourKit Profiler Startup Script |
| | | # |
| | | # Environment Variable Prerequisites |
| | | # |
| | | # JAVA_HOME Must point at your Java Development Kit installation. |
| | | # MAVEN_OPTS (Optional) Java runtime options used when Maven is executed. |
| | | # MAVEN_SKIP_RC (Optional) Flag to disable loading of mavenrc files. |
| | | # ----------------------------------------------------------------------------- |
| | | |
| | | if [ ! -f "$YJPLIB" ]; then |
| | | echo "Error: Unable to autodetect the YJP library location. Please set YJPLIB variable" >&2 |
| | | exit 1 |
| | | fi |
| | | |
| | | env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" "`dirname "$0"`/mvn" "$@" |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | # Licensed to the Apache Software Foundation (ASF) under one |
| | | # or more contributor license agreements. See the NOTICE file |
| | | # distributed with this work for additional information |
| | | # regarding copyright ownership. The ASF licenses this file |
| | | # to you under the Apache License, Version 2.0 (the |
| | | # "License"); you may not use this file except in compliance |
| | | # with the License. You may obtain a copy of the License at |
| | | # |
| | | # http://www.apache.org/licenses/LICENSE-2.0 |
| | | # |
| | | # Unless required by applicable law or agreed to in writing, |
| | | # software distributed under the License is distributed on an |
| | | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | # KIND, either express or implied. See the License for the |
| | | # specific language governing permissions and limitations |
| | | # under the License. |
| | | |
| | | org.slf4j.simpleLogger.defaultLogLevel=info |
| | | org.slf4j.simpleLogger.showDateTime=false |
| | | org.slf4j.simpleLogger.showThreadName=false |
| | | org.slf4j.simpleLogger.showLogName=false |
| | | org.slf4j.simpleLogger.logFile=System.out |
| | | org.slf4j.simpleLogger.cacheOutputStream=true |
| | | org.slf4j.simpleLogger.levelInBrackets=true |
| | | org.slf4j.simpleLogger.log.Sisu=info |
| | | org.slf4j.simpleLogger.warnLevelString=WARNING |
| | | |
| | | # MNG-6181: mvn -X also prints all debug logging from HttpClient |
| | | # Be aware that the shaded packages are used |
| | | # org.apache.http -> org.apache.maven.wagon.providers.http.httpclient |
| | | org.slf4j.simpleLogger.log.org.apache.maven.wagon.providers.http.httpclient=off |
| | | org.slf4j.simpleLogger.log.org.apache.maven.wagon.providers.http.httpclient.wire=off |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | |
| | | <!-- |
| | | Licensed to the Apache Software Foundation (ASF) under one |
| | | or more contributor license agreements. See the NOTICE file |
| | | distributed with this work for additional information |
| | | regarding copyright ownership. The ASF licenses this file |
| | | to you under the Apache License, Version 2.0 (the |
| | | "License"); you may not use this file except in compliance |
| | | with the License. You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, |
| | | software distributed under the License is distributed on an |
| | | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | KIND, either express or implied. See the License for the |
| | | specific language governing permissions and limitations |
| | | under the License. |
| | | --> |
| | | |
| | | <!-- |
| | | | This is the configuration file for Maven. It can be specified at two levels: |
| | | | |
| | | | 1. User Level. This settings.xml file provides configuration for a single user, |
| | | | and is normally provided in ${user.home}/.m2/settings.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -s /path/to/user/settings.xml |
| | | | |
| | | | 2. Global Level. This settings.xml file provides configuration for all Maven |
| | | | users on a machine (assuming they're all using the same Maven |
| | | | installation). It's normally provided in |
| | | | ${maven.conf}/settings.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -gs /path/to/global/settings.xml |
| | | | |
| | | | The sections in this sample file are intended to give you a running start at |
| | | | getting the most out of your Maven installation. Where appropriate, the default |
| | | | values (values used when the setting is not specified) are provided. |
| | | | |
| | | |--> |
| | | <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> |
| | | <!-- localRepository |
| | | | The path to the local repository maven will use to store artifacts. |
| | | | |
| | | | Default: ${user.home}/.m2/repository |
| | | <localRepository>/path/to/local/repo</localRepository> |
| | | --> |
| | | |
| | | <!-- interactiveMode |
| | | | This will determine whether maven prompts you when it needs input. If set to false, |
| | | | maven will use a sensible default value, perhaps based on some other setting, for |
| | | | the parameter in question. |
| | | | |
| | | | Default: true |
| | | <interactiveMode>true</interactiveMode> |
| | | --> |
| | | |
| | | <!-- offline |
| | | | Determines whether maven should attempt to connect to the network when executing a build. |
| | | | This will have an effect on artifact downloads, artifact deployment, and others. |
| | | | |
| | | | Default: false |
| | | <offline>false</offline> |
| | | --> |
| | | |
| | | <!-- pluginGroups |
| | | | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e. |
| | | | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers |
| | | | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list. |
| | | |--> |
| | | <pluginGroups> |
| | | <!-- pluginGroup |
| | | | Specifies a further group identifier to use for plugin lookup. |
| | | <pluginGroup>com.your.plugins</pluginGroup> |
| | | --> |
| | | </pluginGroups> |
| | | |
| | | <!-- proxies |
| | | | This is a list of proxies which can be used on this machine to connect to the network. |
| | | | Unless otherwise specified (by system property or command-line switch), the first proxy |
| | | | specification in this list marked as active will be used. |
| | | |--> |
| | | <proxies> |
| | | <!-- proxy |
| | | | Specification for one proxy, to be used in connecting to the network. |
| | | | |
| | | <proxy> |
| | | <id>optional</id> |
| | | <active>true</active> |
| | | <protocol>http</protocol> |
| | | <username>proxyuser</username> |
| | | <password>proxypass</password> |
| | | <host>proxy.host.net</host> |
| | | <port>80</port> |
| | | <nonProxyHosts>local.net|some.host.com</nonProxyHosts> |
| | | </proxy> |
| | | --> |
| | | </proxies> |
| | | |
| | | <!-- servers |
| | | | This is a list of authentication profiles, keyed by the server-id used within the system. |
| | | | Authentication profiles can be used whenever maven must make a connection to a remote server. |
| | | |--> |
| | | <servers> |
| | | <!-- server |
| | | | Specifies the authentication information to use when connecting to a particular server, identified by |
| | | | a unique name within the system (referred to by the 'id' attribute below). |
| | | | |
| | | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are |
| | | | used together. |
| | | | |
| | | <server> |
| | | <id>deploymentRepo</id> |
| | | <username>repouser</username> |
| | | <password>repopwd</password> |
| | | </server> |
| | | --> |
| | | |
| | | <!-- Another sample, using keys to authenticate. |
| | | <server> |
| | | <id>siteServer</id> |
| | | <privateKey>/path/to/private/key</privateKey> |
| | | <passphrase>optional; leave empty if not used.</passphrase> |
| | | </server> |
| | | --> |
| | | </servers> |
| | | |
| | | <!-- mirrors |
| | | | This is a list of mirrors to be used in downloading artifacts from remote repositories. |
| | | | |
| | | | It works like this: a POM may declare a repository to use in resolving certain artifacts. |
| | | | However, this repository may have problems with heavy traffic at times, so people have mirrored |
| | | | it to several places. |
| | | | |
| | | | That repository definition will have a unique id, so we can create a mirror reference for that |
| | | | repository, to be used as an alternate download site. The mirror site will be the preferred |
| | | | server for that repository. |
| | | |--> |
| | | <mirrors> |
| | | <!-- mirror |
| | | | Specifies a repository mirror site to use instead of a given repository. The repository that |
| | | | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used |
| | | | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. |
| | | | |
| | | <mirror> |
| | | <id>mirrorId</id> |
| | | <mirrorOf>repositoryId</mirrorOf> |
| | | <name>Human Readable Name for this Mirror.</name> |
| | | <url>http://my.repository.com/repo/path</url> |
| | | </mirror> |
| | | --> |
| | | </mirrors> |
| | | |
| | | <!-- profiles |
| | | | This is a list of profiles which can be activated in a variety of ways, and which can modify |
| | | | the build process. Profiles provided in the settings.xml are intended to provide local machine- |
| | | | specific paths and repository locations which allow the build to work in the local environment. |
| | | | |
| | | | For example, if you have an integration testing plugin - like cactus - that needs to know where |
| | | | your Tomcat instance is installed, you can provide a variable here such that the variable is |
| | | | dereferenced during the build process to configure the cactus plugin. |
| | | | |
| | | | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles |
| | | | section of this document (settings.xml) - will be discussed later. Another way essentially |
| | | | relies on the detection of a system property, either matching a particular value for the property, |
| | | | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a |
| | | | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'. |
| | | | Finally, the list of active profiles can be specified directly from the command line. |
| | | | |
| | | | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact |
| | | | repositories, plugin repositories, and free-form properties to be used as configuration |
| | | | variables for plugins in the POM. |
| | | | |
| | | |--> |
| | | <profiles> |
| | | <!-- profile |
| | | | Specifies a set of introductions to the build process, to be activated using one or more of the |
| | | | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/> |
| | | | or the command line, profiles have to have an ID that is unique. |
| | | | |
| | | | An encouraged best practice for profile identification is to use a consistent naming convention |
| | | | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc. |
| | | | This will make it more intuitive to understand what the set of introduced profiles is attempting |
| | | | to accomplish, particularly when you only have a list of profile id's for debug. |
| | | | |
| | | | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo. |
| | | <profile> |
| | | <id>jdk-1.4</id> |
| | | |
| | | <activation> |
| | | <jdk>1.4</jdk> |
| | | </activation> |
| | | |
| | | <repositories> |
| | | <repository> |
| | | <id>jdk14</id> |
| | | <name>Repository for JDK 1.4 builds</name> |
| | | <url>http://www.myhost.com/maven/jdk14</url> |
| | | <layout>default</layout> |
| | | <snapshotPolicy>always</snapshotPolicy> |
| | | </repository> |
| | | </repositories> |
| | | </profile> |
| | | --> |
| | | |
| | | <!-- |
| | | | Here is another profile, activated by the system property 'target-env' with a value of 'dev', |
| | | | which provides a specific path to the Tomcat instance. To use this, your plugin configuration |
| | | | might hypothetically look like: |
| | | | |
| | | | ... |
| | | | <plugin> |
| | | | <groupId>org.myco.myplugins</groupId> |
| | | | <artifactId>myplugin</artifactId> |
| | | | |
| | | | <configuration> |
| | | | <tomcatLocation>${tomcatPath}</tomcatLocation> |
| | | | </configuration> |
| | | | </plugin> |
| | | | ... |
| | | | |
| | | | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to |
| | | | anything, you could just leave off the <value/> inside the activation-property. |
| | | | |
| | | <profile> |
| | | <id>env-dev</id> |
| | | |
| | | <activation> |
| | | <property> |
| | | <name>target-env</name> |
| | | <value>dev</value> |
| | | </property> |
| | | </activation> |
| | | |
| | | <properties> |
| | | <tomcatPath>/path/to/tomcat/instance</tomcatPath> |
| | | </properties> |
| | | </profile> |
| | | --> |
| | | </profiles> |
| | | |
| | | <!-- activeProfiles |
| | | | List of profiles that are active for all builds. |
| | | | |
| | | <activeProfiles> |
| | | <activeProfile>alwaysActiveProfile</activeProfile> |
| | | <activeProfile>anotherAlwaysActiveProfile</activeProfile> |
| | | </activeProfiles> |
| | | --> |
| | | </settings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | |
| | | <!-- |
| | | Licensed to the Apache Software Foundation (ASF) under one |
| | | or more contributor license agreements. See the NOTICE file |
| | | distributed with this work for additional information |
| | | regarding copyright ownership. The ASF licenses this file |
| | | to you under the Apache License, Version 2.0 (the |
| | | "License"); you may not use this file except in compliance |
| | | with the License. You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, |
| | | software distributed under the License is distributed on an |
| | | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | KIND, either express or implied. See the License for the |
| | | specific language governing permissions and limitations |
| | | under the License. |
| | | --> |
| | | |
| | | <!-- |
| | | | This is the toolchains file for Maven. It can be specified at two levels: |
| | | | |
| | | | 1. User Level. This toolchains.xml file provides configuration for a single user, |
| | | | and is normally provided in ${user.home}/.m2/toolchains.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -t /path/to/user/toolchains.xml |
| | | | |
| | | | 2. Global Level. This toolchains.xml file provides configuration for all Maven |
| | | | users on a machine (assuming they're all using the same Maven |
| | | | installation). It's normally provided in |
| | | | ${maven.conf}/toolchains.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -gt /path/to/global/toolchains.xml |
| | | | |
| | | | The sections in this sample file are intended to give you a running start at |
| | | | getting the most out of your Maven installation. |
| | | |--> |
| | | <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd"> |
| | | |
| | | <!-- |
| | | | With toolchains you can refer to installations on your system. This |
| | | | way you don't have to hardcode paths in your pom.xml. |
| | | | |
| | | | Every toolchain consist of 3 elements: |
| | | | * type: the type of tool. An often used value is 'jdk'. Toolchains-aware |
| | | | plugins should document which type you must use. |
| | | | |
| | | | * provides: A list of key/value-pairs. |
| | | | Based on the toolchain-configuration in the pom.xml Maven will search for |
| | | | matching <provides/> configuration. You can decide for yourself which key-value |
| | | | pairs to use. Often used keys are 'version', 'vendor' and 'arch'. By default |
| | | | the version has a special meaning. If you configured in the pom.xml '1.5' |
| | | | Maven will search for 1.5 and above. |
| | | | |
| | | | * configuration: Additional configuration for this tool. |
| | | | Look for documentation of the toolchains-aware plugin which configuration elements |
| | | | can be used. |
| | | | |
| | | | See also https://maven.apache.org/guides/mini/guide-using-toolchains.html |
| | | | |
| | | | General example |
| | | |
| | | <toolchain> |
| | | <type/> |
| | | <provides> |
| | | <version>1.0</version> |
| | | </provides> |
| | | <configuration/> |
| | | </toolchain> |
| | | |
| | | | JDK examples |
| | | |
| | | <toolchain> |
| | | <type>jdk</type> |
| | | <provides> |
| | | <version>1.5</version> |
| | | <vendor>sun</vendor> |
| | | </provides> |
| | | <configuration> |
| | | <jdkHome>/path/to/jdk/1.5</jdkHome> |
| | | </configuration> |
| | | </toolchain> |
| | | <toolchain> |
| | | <type>jdk</type> |
| | | <provides> |
| | | <version>1.6</version> |
| | | <vendor>sun</vendor> |
| | | </provides> |
| | | <configuration> |
| | | <jdkHome>/path/to/jdk/1.6</jdkHome> |
| | | </configuration> |
| | | </toolchain> |
| | | |
| | | --> |
| | | |
| | | </toolchains> |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | Use this directory to contribute 3rd-party extensions to the Maven core. These extensions can either extend or override |
| | | Maven's default implementation. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | This directory contains Jansi native libraries, extracted from Jansi jar. |
| | | |
| | | You can add your own extensions for platforms not natively supported by |
| | | Jansi: the libraries follow HawtJNI directory and filename conventions. |
| | | See http://fusesource.github.io/hawtjni/documentation/api/org/fusesource/hawtjni/runtime/Library.html |
| | | |
| | | See https://github.com/fusesource/jansi-native for native lib source. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | https://raw.githubusercontent.com/jhy/jsoup/jsoup-1.12.1/LICENSE |
| | | |
| | | The MIT License |
| | | |
| | | Copyright (c) 2009-2019 Jonathan Hedley <jonathan@hedley.net> |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining a copy |
| | | of this software and associated documentation files (the "Software"), to deal |
| | | in the Software without restriction, including without limitation the rights |
| | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| | | copies of the Software, and to permit persons to whom the Software is |
| | | furnished to do so, subject to the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be included in all |
| | | copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| | | SOFTWARE. |
New file |
| | |
| | | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 |
| | | |
| | | |
| | | 1. Definitions. |
| | | |
| | | 1.1. "Contributor" means each individual or entity that |
| | | creates or contributes to the creation of Modifications. |
| | | |
| | | 1.2. "Contributor Version" means the combination of the |
| | | Original Software, prior Modifications used by a |
| | | Contributor (if any), and the Modifications made by that |
| | | particular Contributor. |
| | | |
| | | 1.3. "Covered Software" means (a) the Original Software, or |
| | | (b) Modifications, or (c) the combination of files |
| | | containing Original Software with files containing |
| | | Modifications, in each case including portions thereof. |
| | | |
| | | 1.4. "Executable" means the Covered Software in any form |
| | | other than Source Code. |
| | | |
| | | 1.5. "Initial Developer" means the individual or entity |
| | | that first makes Original Software available under this |
| | | License. |
| | | |
| | | 1.6. "Larger Work" means a work which combines Covered |
| | | Software or portions thereof with code not governed by the |
| | | terms of this License. |
| | | |
| | | 1.7. "License" means this document. |
| | | |
| | | 1.8. "Licensable" means having the right to grant, to the |
| | | maximum extent possible, whether at the time of the initial |
| | | grant or subsequently acquired, any and all of the rights |
| | | conveyed herein. |
| | | |
| | | 1.9. "Modifications" means the Source Code and Executable |
| | | form of any of the following: |
| | | |
| | | A. Any file that results from an addition to, |
| | | deletion from or modification of the contents of a |
| | | file containing Original Software or previous |
| | | Modifications; |
| | | |
| | | B. Any new file that contains any part of the |
| | | Original Software or previous Modification; or |
| | | |
| | | C. Any new file that is contributed or otherwise made |
| | | available under the terms of this License. |
| | | |
| | | 1.10. "Original Software" means the Source Code and |
| | | Executable form of computer software code that is |
| | | originally released under this License. |
| | | |
| | | 1.11. "Patent Claims" means any patent claim(s), now owned |
| | | or hereafter acquired, including without limitation, |
| | | method, process, and apparatus claims, in any patent |
| | | Licensable by grantor. |
| | | |
| | | 1.12. "Source Code" means (a) the common form of computer |
| | | software code in which modifications are made and (b) |
| | | associated documentation included in or with such code. |
| | | |
| | | 1.13. "You" (or "Your") means an individual or a legal |
| | | entity exercising rights under, and complying with all of |
| | | the terms of, this License. For legal entities, "You" |
| | | includes any entity which controls, is controlled by, or is |
| | | under common control with You. For purposes of this |
| | | definition, "control" means (a) the power, direct or |
| | | indirect, to cause the direction or management of such |
| | | entity, whether by contract or otherwise, or (b) ownership |
| | | of more than fifty percent (50%) of the outstanding shares |
| | | or beneficial ownership of such entity. |
| | | |
| | | 2. License Grants. |
| | | |
| | | 2.1. The Initial Developer Grant. |
| | | |
| | | Conditioned upon Your compliance with Section 3.1 below and |
| | | subject to third party intellectual property claims, the |
| | | Initial Developer hereby grants You a world-wide, |
| | | royalty-free, non-exclusive license: |
| | | |
| | | (a) under intellectual property rights (other than |
| | | patent or trademark) Licensable by Initial Developer, |
| | | to use, reproduce, modify, display, perform, |
| | | sublicense and distribute the Original Software (or |
| | | portions thereof), with or without Modifications, |
| | | and/or as part of a Larger Work; and |
| | | |
| | | (b) under Patent Claims infringed by the making, |
| | | using or selling of Original Software, to make, have |
| | | made, use, practice, sell, and offer for sale, and/or |
| | | otherwise dispose of the Original Software (or |
| | | portions thereof). |
| | | |
| | | (c) The licenses granted in Sections 2.1(a) and (b) |
| | | are effective on the date Initial Developer first |
| | | distributes or otherwise makes the Original Software |
| | | available to a third party under the terms of this |
| | | License. |
| | | |
| | | (d) Notwithstanding Section 2.1(b) above, no patent |
| | | license is granted: (1) for code that You delete from |
| | | the Original Software, or (2) for infringements |
| | | caused by: (i) the modification of the Original |
| | | Software, or (ii) the combination of the Original |
| | | Software with other software or devices. |
| | | |
| | | 2.2. Contributor Grant. |
| | | |
| | | Conditioned upon Your compliance with Section 3.1 below and |
| | | subject to third party intellectual property claims, each |
| | | Contributor hereby grants You a world-wide, royalty-free, |
| | | non-exclusive license: |
| | | |
| | | (a) under intellectual property rights (other than |
| | | patent or trademark) Licensable by Contributor to |
| | | use, reproduce, modify, display, perform, sublicense |
| | | and distribute the Modifications created by such |
| | | Contributor (or portions thereof), either on an |
| | | unmodified basis, with other Modifications, as |
| | | Covered Software and/or as part of a Larger Work; and |
| | | |
| | | |
| | | (b) under Patent Claims infringed by the making, |
| | | using, or selling of Modifications made by that |
| | | Contributor either alone and/or in combination with |
| | | its Contributor Version (or portions of such |
| | | combination), to make, use, sell, offer for sale, |
| | | have made, and/or otherwise dispose of: (1) |
| | | Modifications made by that Contributor (or portions |
| | | thereof); and (2) the combination of Modifications |
| | | made by that Contributor with its Contributor Version |
| | | (or portions of such combination). |
| | | |
| | | (c) The licenses granted in Sections 2.2(a) and |
| | | 2.2(b) are effective on the date Contributor first |
| | | distributes or otherwise makes the Modifications |
| | | available to a third party. |
| | | |
| | | (d) Notwithstanding Section 2.2(b) above, no patent |
| | | license is granted: (1) for any code that Contributor |
| | | has deleted from the Contributor Version; (2) for |
| | | infringements caused by: (i) third party |
| | | modifications of Contributor Version, or (ii) the |
| | | combination of Modifications made by that Contributor |
| | | with other software (except as part of the |
| | | Contributor Version) or other devices; or (3) under |
| | | Patent Claims infringed by Covered Software in the |
| | | absence of Modifications made by that Contributor. |
| | | |
| | | 3. Distribution Obligations. |
| | | |
| | | 3.1. Availability of Source Code. |
| | | |
| | | Any Covered Software that You distribute or otherwise make |
| | | available in Executable form must also be made available in |
| | | Source Code form and that Source Code form must be |
| | | distributed only under the terms of this License. You must |
| | | include a copy of this License with every copy of the |
| | | Source Code form of the Covered Software You distribute or |
| | | otherwise make available. You must inform recipients of any |
| | | such Covered Software in Executable form as to how they can |
| | | obtain such Covered Software in Source Code form in a |
| | | reasonable manner on or through a medium customarily used |
| | | for software exchange. |
| | | |
| | | 3.2. Modifications. |
| | | |
| | | The Modifications that You create or to which You |
| | | contribute are governed by the terms of this License. You |
| | | represent that You believe Your Modifications are Your |
| | | original creation(s) and/or You have sufficient rights to |
| | | grant the rights conveyed by this License. |
| | | |
| | | 3.3. Required Notices. |
| | | |
| | | You must include a notice in each of Your Modifications |
| | | that identifies You as the Contributor of the Modification. |
| | | You may not remove or alter any copyright, patent or |
| | | trademark notices contained within the Covered Software, or |
| | | any notices of licensing or any descriptive text giving |
| | | attribution to any Contributor or the Initial Developer. |
| | | |
| | | 3.4. Application of Additional Terms. |
| | | |
| | | You may not offer or impose any terms on any Covered |
| | | Software in Source Code form that alters or restricts the |
| | | applicable version of this License or the recipients" |
| | | rights hereunder. You may choose to offer, and to charge a |
| | | fee for, warranty, support, indemnity or liability |
| | | obligations to one or more recipients of Covered Software. |
| | | However, you may do so only on Your own behalf, and not on |
| | | behalf of the Initial Developer or any Contributor. You |
| | | must make it absolutely clear that any such warranty, |
| | | support, indemnity or liability obligation is offered by |
| | | You alone, and You hereby agree to indemnify the Initial |
| | | Developer and every Contributor for any liability incurred |
| | | by the Initial Developer or such Contributor as a result of |
| | | warranty, support, indemnity or liability terms You offer. |
| | | |
| | | |
| | | 3.5. Distribution of Executable Versions. |
| | | |
| | | You may distribute the Executable form of the Covered |
| | | Software under the terms of this License or under the terms |
| | | of a license of Your choice, which may contain terms |
| | | different from this License, provided that You are in |
| | | compliance with the terms of this License and that the |
| | | license for the Executable form does not attempt to limit |
| | | or alter the recipient"s rights in the Source Code form |
| | | from the rights set forth in this License. If You |
| | | distribute the Covered Software in Executable form under a |
| | | different license, You must make it absolutely clear that |
| | | any terms which differ from this License are offered by You |
| | | alone, not by the Initial Developer or Contributor. You |
| | | hereby agree to indemnify the Initial Developer and every |
| | | Contributor for any liability incurred by the Initial |
| | | Developer or such Contributor as a result of any such terms |
| | | You offer. |
| | | |
| | | 3.6. Larger Works. |
| | | |
| | | You may create a Larger Work by combining Covered Software |
| | | with other code not governed by the terms of this License |
| | | and distribute the Larger Work as a single product. In such |
| | | a case, You must make sure the requirements of this License |
| | | are fulfilled for the Covered Software. |
| | | |
| | | 4. Versions of the License. |
| | | |
| | | 4.1. New Versions. |
| | | |
| | | Sun Microsystems, Inc. is the initial license steward and |
| | | may publish revised and/or new versions of this License |
| | | from time to time. Each version will be given a |
| | | distinguishing version number. Except as provided in |
| | | Section 4.3, no one other than the license steward has the |
| | | right to modify this License. |
| | | |
| | | 4.2. Effect of New Versions. |
| | | |
| | | You may always continue to use, distribute or otherwise |
| | | make the Covered Software available under the terms of the |
| | | version of the License under which You originally received |
| | | the Covered Software. If the Initial Developer includes a |
| | | notice in the Original Software prohibiting it from being |
| | | distributed or otherwise made available under any |
| | | subsequent version of the License, You must distribute and |
| | | make the Covered Software available under the terms of the |
| | | version of the License under which You originally received |
| | | the Covered Software. Otherwise, You may also choose to |
| | | use, distribute or otherwise make the Covered Software |
| | | available under the terms of any subsequent version of the |
| | | License published by the license steward. |
| | | |
| | | 4.3. Modified Versions. |
| | | |
| | | When You are an Initial Developer and You want to create a |
| | | new license for Your Original Software, You may create and |
| | | use a modified version of this License if You: (a) rename |
| | | the license and remove any references to the name of the |
| | | license steward (except to note that the license differs |
| | | from this License); and (b) otherwise make it clear that |
| | | the license contains terms which differ from this License. |
| | | |
| | | |
| | | 5. DISCLAIMER OF WARRANTY. |
| | | |
| | | COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" |
| | | BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, |
| | | INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED |
| | | SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR |
| | | PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND |
| | | PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY |
| | | COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE |
| | | INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF |
| | | ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF |
| | | WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF |
| | | ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS |
| | | DISCLAIMER. |
| | | |
| | | 6. TERMINATION. |
| | | |
| | | 6.1. This License and the rights granted hereunder will |
| | | terminate automatically if You fail to comply with terms |
| | | herein and fail to cure such breach within 30 days of |
| | | becoming aware of the breach. Provisions which, by their |
| | | nature, must remain in effect beyond the termination of |
| | | this License shall survive. |
| | | |
| | | 6.2. If You assert a patent infringement claim (excluding |
| | | declaratory judgment actions) against Initial Developer or |
| | | a Contributor (the Initial Developer or Contributor against |
| | | whom You assert such claim is referred to as "Participant") |
| | | alleging that the Participant Software (meaning the |
| | | Contributor Version where the Participant is a Contributor |
| | | or the Original Software where the Participant is the |
| | | Initial Developer) directly or indirectly infringes any |
| | | patent, then any and all rights granted directly or |
| | | indirectly to You by such Participant, the Initial |
| | | Developer (if the Initial Developer is not the Participant) |
| | | and all Contributors under Sections 2.1 and/or 2.2 of this |
| | | License shall, upon 60 days notice from Participant |
| | | terminate prospectively and automatically at the expiration |
| | | of such 60 day notice period, unless if within such 60 day |
| | | period You withdraw Your claim with respect to the |
| | | Participant Software against such Participant either |
| | | unilaterally or pursuant to a written agreement with |
| | | Participant. |
| | | |
| | | 6.3. In the event of termination under Sections 6.1 or 6.2 |
| | | above, all end user licenses that have been validly granted |
| | | by You or any distributor hereunder prior to termination |
| | | (excluding licenses granted to You by any distributor) |
| | | shall survive termination. |
| | | |
| | | 7. LIMITATION OF LIABILITY. |
| | | |
| | | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT |
| | | (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE |
| | | INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF |
| | | COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE |
| | | LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR |
| | | CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT |
| | | LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK |
| | | STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER |
| | | COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN |
| | | INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF |
| | | LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL |
| | | INJURY RESULTING FROM SUCH PARTY"S NEGLIGENCE TO THE EXTENT |
| | | APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO |
| | | NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR |
| | | CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT |
| | | APPLY TO YOU. |
| | | |
| | | 8. U.S. GOVERNMENT END USERS. |
| | | |
| | | The Covered Software is a "commercial item," as that term is |
| | | defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial |
| | | computer software" (as that term is defined at 48 C.F.R. " |
| | | 252.227-7014(a)(1)) and "commercial computer software |
| | | documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. |
| | | 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 |
| | | through 227.7202-4 (June 1995), all U.S. Government End Users |
| | | acquire Covered Software with only those rights set forth herein. |
| | | This U.S. Government Rights clause is in lieu of, and supersedes, |
| | | any other FAR, DFAR, or other clause or provision that addresses |
| | | Government rights in computer software under this License. |
| | | |
| | | 9. MISCELLANEOUS. |
| | | |
| | | This License represents the complete agreement concerning subject |
| | | matter hereof. If any provision of this License is held to be |
| | | unenforceable, such provision shall be reformed only to the |
| | | extent necessary to make it enforceable. This License shall be |
| | | governed by the law of the jurisdiction specified in a notice |
| | | contained within the Original Software (except to the extent |
| | | applicable law, if any, provides otherwise), excluding such |
| | | jurisdiction"s conflict-of-law provisions. Any litigation |
| | | relating to this License shall be subject to the jurisdiction of |
| | | the courts located in the jurisdiction and venue specified in a |
| | | notice contained within the Original Software, with the losing |
| | | party responsible for costs, including, without limitation, court |
| | | costs and reasonable attorneys" fees and expenses. The |
| | | application of the United Nations Convention on Contracts for the |
| | | International Sale of Goods is expressly excluded. Any law or |
| | | regulation which provides that the language of a contract shall |
| | | be construed against the drafter shall not apply to this License. |
| | | You agree that You alone are responsible for compliance with the |
| | | United States export administration regulations (and the export |
| | | control laws and regulation of any other countries) when You use, |
| | | distribute or otherwise make available any Covered Software. |
| | | |
| | | 10. RESPONSIBILITY FOR CLAIMS. |
| | | |
| | | As between Initial Developer and the Contributors, each party is |
| | | responsible for claims and damages arising, directly or |
| | | indirectly, out of its utilization of rights under this License |
| | | and You agree to work with Initial Developer and Contributors to |
| | | distribute such responsibility on an equitable basis. Nothing |
| | | herein is intended or shall be deemed to constitute any admission |
| | | of liability. |
New file |
| | |
| | | Eclipse Public License - v 1.0 |
| | | |
| | | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC |
| | | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM |
| | | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. |
| | | |
| | | 1. DEFINITIONS |
| | | |
| | | "Contribution" means: |
| | | |
| | | a) in the case of the initial Contributor, the initial code and documentation |
| | | distributed under this Agreement, and |
| | | |
| | | b) in the case of each subsequent Contributor: |
| | | |
| | | i) changes to the Program, and |
| | | |
| | | ii) additions to the Program; |
| | | |
| | | where such changes and/or additions to the Program originate from and are |
| | | distributed by that particular Contributor. A Contribution 'originates' from |
| | | a Contributor if it was added to the Program by such Contributor itself or |
| | | anyone acting on such Contributor's behalf. Contributions do not include additions |
| | | to the Program which: (i) are separate modules of software distributed in |
| | | conjunction with the Program under their own license agreement, and (ii) are |
| | | not derivative works of the Program. |
| | | |
| | | "Contributor" means any person or entity that distributes the Program. |
| | | |
| | | "Licensed Patents" mean patent claims licensable by a Contributor which are |
| | | necessarily infringed by the use or sale of its Contribution alone or when |
| | | combined with the Program. |
| | | |
| | | "Program" means the Contributions distributed in accordance with this Agreement. |
| | | |
| | | "Recipient" means anyone who receives the Program under this Agreement, including |
| | | all Contributors. |
| | | |
| | | 2. GRANT OF RIGHTS |
| | | |
| | | a) Subject to the terms of this Agreement, each Contributor hereby grants |
| | | Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, |
| | | prepare derivative works of, publicly display, publicly perform, distribute |
| | | and sublicense the Contribution of such Contributor, if any, and such derivative |
| | | works, in source code and object code form. |
| | | |
| | | b) Subject to the terms of this Agreement, each Contributor hereby grants |
| | | Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed |
| | | Patents to make, use, sell, offer to sell, import and otherwise transfer the |
| | | Contribution of such Contributor, if any, in source code and object code form. |
| | | This patent license shall apply to the combination of the Contribution and |
| | | the Program if, at the time the Contribution is added by the Contributor, |
| | | such addition of the Contribution causes such combination to be covered by |
| | | the Licensed Patents. The patent license shall not apply to any other combinations |
| | | which include the Contribution. No hardware per se is licensed hereunder. |
| | | |
| | | c) Recipient understands that although each Contributor grants the licenses |
| | | to its Contributions set forth herein, no assurances are provided by any Contributor |
| | | that the Program does not infringe the patent or other intellectual property |
| | | rights of any other entity. Each Contributor disclaims any liability to Recipient |
| | | for claims brought by any other entity based on infringement of intellectual |
| | | property rights or otherwise. As a condition to exercising the rights and |
| | | licenses granted hereunder, each Recipient hereby assumes sole responsibility |
| | | to secure any other intellectual property rights needed, if any. For example, |
| | | if a third party patent license is required to allow Recipient to distribute |
| | | the Program, it is Recipient's responsibility to acquire that license before |
| | | distributing the Program. |
| | | |
| | | d) Each Contributor represents that to its knowledge it has sufficient copyright |
| | | rights in its Contribution, if any, to grant the copyright license set forth |
| | | in this Agreement. |
| | | |
| | | 3. REQUIREMENTS |
| | | |
| | | A Contributor may choose to distribute the Program in object code form under |
| | | its own license agreement, provided that: |
| | | |
| | | a) it complies with the terms and conditions of this Agreement; and |
| | | |
| | | b) its license agreement: |
| | | |
| | | i) effectively disclaims on behalf of all Contributors all warranties and |
| | | conditions, express and implied, including warranties or conditions of title |
| | | and non-infringement, and implied warranties or conditions of merchantability |
| | | and fitness for a particular purpose; |
| | | |
| | | ii) effectively excludes on behalf of all Contributors all liability for damages, |
| | | including direct, indirect, special, incidental and consequential damages, |
| | | such as lost profits; |
| | | |
| | | iii) states that any provisions which differ from this Agreement are offered |
| | | by that Contributor alone and not by any other party; and |
| | | |
| | | iv) states that source code for the Program is available from such Contributor, |
| | | and informs licensees how to obtain it in a reasonable manner on or through |
| | | a medium customarily used for software exchange. |
| | | |
| | | When the Program is made available in source code form: |
| | | |
| | | a) it must be made available under this Agreement; and |
| | | |
| | | b) a copy of this Agreement must be included with each copy of the Program. |
| | | |
| | | Contributors may not remove or alter any copyright notices contained within |
| | | the Program. |
| | | |
| | | Each Contributor must identify itself as the originator of its Contribution, |
| | | if any, in a manner that reasonably allows subsequent Recipients to identify |
| | | the originator of the Contribution. |
| | | |
| | | 4. COMMERCIAL DISTRIBUTION |
| | | |
| | | Commercial distributors of software may accept certain responsibilities with |
| | | respect to end users, business partners and the like. While this license is |
| | | intended to facilitate the commercial use of the Program, the Contributor |
| | | who includes the Program in a commercial product offering should do so in |
| | | a manner which does not create potential liability for other Contributors. |
| | | Therefore, if a Contributor includes the Program in a commercial product offering, |
| | | such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify |
| | | every other Contributor ("Indemnified Contributor") against any losses, damages |
| | | and costs (collectively "Losses") arising from claims, lawsuits and other |
| | | legal actions brought by a third party against the Indemnified Contributor |
| | | to the extent caused by the acts or omissions of such Commercial Contributor |
| | | in connection with its distribution of the Program in a commercial product |
| | | offering. The obligations in this section do not apply to any claims or Losses |
| | | relating to any actual or alleged intellectual property infringement. In order |
| | | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial |
| | | Contributor in writing of such claim, and b) allow the Commercial Contributor |
| | | to control, and cooperate with the Commercial Contributor in, the defense |
| | | and any related settlement negotiations. The Indemnified Contributor may participate |
| | | in any such claim at its own expense. |
| | | |
| | | For example, a Contributor might include the Program in a commercial product |
| | | offering, Product X. That Contributor is then a Commercial Contributor. If |
| | | that Commercial Contributor then makes performance claims, or offers warranties |
| | | related to Product X, those performance claims and warranties are such Commercial |
| | | Contributor's responsibility alone. Under this section, the Commercial Contributor |
| | | would have to defend claims against the other Contributors related to those |
| | | performance claims and warranties, and if a court requires any other Contributor |
| | | to pay any damages as a result, the Commercial Contributor must pay those |
| | | damages. |
| | | |
| | | 5. NO WARRANTY |
| | | |
| | | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON |
| | | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS |
| | | OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF |
| | | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. |
| | | Each Recipient is solely responsible for determining the appropriateness of |
| | | using and distributing the Program and assumes all risks associated with its |
| | | exercise of rights under this Agreement, including but not limited to the |
| | | risks and costs of program errors, compliance with applicable laws, damage |
| | | to or loss of data, programs or equipment, and unavailability or interruption |
| | | of operations. |
| | | |
| | | 6. DISCLAIMER OF LIABILITY |
| | | |
| | | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY |
| | | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| | | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION |
| | | LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| | | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY |
| | | WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS |
| | | GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| | | |
| | | 7. GENERAL |
| | | |
| | | If any provision of this Agreement is invalid or unenforceable under applicable |
| | | law, it shall not affect the validity or enforceability of the remainder of |
| | | the terms of this Agreement, and without further action by the parties hereto, |
| | | such provision shall be reformed to the minimum extent necessary to make such |
| | | provision valid and enforceable. |
| | | |
| | | If Recipient institutes patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Program itself |
| | | (excluding combinations of the Program with other software or hardware) infringes |
| | | such Recipient's patent(s), then such Recipient's rights granted under Section |
| | | 2(b) shall terminate as of the date such litigation is filed. |
| | | |
| | | All Recipient's rights under this Agreement shall terminate if it fails to |
| | | comply with any of the material terms or conditions of this Agreement and |
| | | does not cure such failure in a reasonable period of time after becoming aware |
| | | of such noncompliance. If all Recipient's rights under this Agreement terminate, |
| | | Recipient agrees to cease use and distribution of the Program as soon as reasonably |
| | | practicable. However, Recipient's obligations under this Agreement and any |
| | | licenses granted by Recipient relating to the Program shall continue and survive. |
| | | |
| | | Everyone is permitted to copy and distribute copies of this Agreement, but |
| | | in order to avoid inconsistency the Agreement is copyrighted and may only |
| | | be modified in the following manner. The Agreement Steward reserves the right |
| | | to publish new versions (including revisions) of this Agreement from time |
| | | to time. No one other than the Agreement Steward has the right to modify this |
| | | Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse |
| | | Foundation may assign the responsibility to serve as the Agreement Steward |
| | | to a suitable separate entity. Each new version of the Agreement will be given |
| | | a distinguishing version number. The Program (including Contributions) may |
| | | always be distributed subject to the version of the Agreement under which |
| | | it was received. In addition, after a new version of the Agreement is published, |
| | | Contributor may elect to distribute the Program (including its Contributions) |
| | | under the new version. Except as expressly stated in Sections 2(a) and 2(b) |
| | | above, Recipient receives no rights or licenses to the intellectual property |
| | | of any Contributor under this Agreement, whether expressly, by implication, |
| | | estoppel or otherwise. All rights in the Program not expressly granted under |
| | | this Agreement are reserved. |
| | | |
| | | This Agreement is governed by the laws of the State of New York and the intellectual |
| | | property laws of the United States of America. No party to this Agreement |
| | | will bring a legal action under this Agreement more than one year after the |
| | | cause of action arose. Each party waives its rights to a jury trial in any |
| | | resulting litigation. |
New file |
| | |
| | | Eclipse Public License - v 1.0 |
| | | |
| | | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC |
| | | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM |
| | | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. |
| | | |
| | | 1. DEFINITIONS |
| | | |
| | | "Contribution" means: |
| | | |
| | | a) in the case of the initial Contributor, the initial code and documentation |
| | | distributed under this Agreement, and |
| | | |
| | | b) in the case of each subsequent Contributor: |
| | | |
| | | i) changes to the Program, and |
| | | |
| | | ii) additions to the Program; |
| | | |
| | | where such changes and/or additions to the Program originate from and are |
| | | distributed by that particular Contributor. A Contribution 'originates' from |
| | | a Contributor if it was added to the Program by such Contributor itself or |
| | | anyone acting on such Contributor's behalf. Contributions do not include additions |
| | | to the Program which: (i) are separate modules of software distributed in |
| | | conjunction with the Program under their own license agreement, and (ii) are |
| | | not derivative works of the Program. |
| | | |
| | | "Contributor" means any person or entity that distributes the Program. |
| | | |
| | | "Licensed Patents" mean patent claims licensable by a Contributor which are |
| | | necessarily infringed by the use or sale of its Contribution alone or when |
| | | combined with the Program. |
| | | |
| | | "Program" means the Contributions distributed in accordance with this Agreement. |
| | | |
| | | "Recipient" means anyone who receives the Program under this Agreement, including |
| | | all Contributors. |
| | | |
| | | 2. GRANT OF RIGHTS |
| | | |
| | | a) Subject to the terms of this Agreement, each Contributor hereby grants |
| | | Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, |
| | | prepare derivative works of, publicly display, publicly perform, distribute |
| | | and sublicense the Contribution of such Contributor, if any, and such derivative |
| | | works, in source code and object code form. |
| | | |
| | | b) Subject to the terms of this Agreement, each Contributor hereby grants |
| | | Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed |
| | | Patents to make, use, sell, offer to sell, import and otherwise transfer the |
| | | Contribution of such Contributor, if any, in source code and object code form. |
| | | This patent license shall apply to the combination of the Contribution and |
| | | the Program if, at the time the Contribution is added by the Contributor, |
| | | such addition of the Contribution causes such combination to be covered by |
| | | the Licensed Patents. The patent license shall not apply to any other combinations |
| | | which include the Contribution. No hardware per se is licensed hereunder. |
| | | |
| | | c) Recipient understands that although each Contributor grants the licenses |
| | | to its Contributions set forth herein, no assurances are provided by any Contributor |
| | | that the Program does not infringe the patent or other intellectual property |
| | | rights of any other entity. Each Contributor disclaims any liability to Recipient |
| | | for claims brought by any other entity based on infringement of intellectual |
| | | property rights or otherwise. As a condition to exercising the rights and |
| | | licenses granted hereunder, each Recipient hereby assumes sole responsibility |
| | | to secure any other intellectual property rights needed, if any. For example, |
| | | if a third party patent license is required to allow Recipient to distribute |
| | | the Program, it is Recipient's responsibility to acquire that license before |
| | | distributing the Program. |
| | | |
| | | d) Each Contributor represents that to its knowledge it has sufficient copyright |
| | | rights in its Contribution, if any, to grant the copyright license set forth |
| | | in this Agreement. |
| | | |
| | | 3. REQUIREMENTS |
| | | |
| | | A Contributor may choose to distribute the Program in object code form under |
| | | its own license agreement, provided that: |
| | | |
| | | a) it complies with the terms and conditions of this Agreement; and |
| | | |
| | | b) its license agreement: |
| | | |
| | | i) effectively disclaims on behalf of all Contributors all warranties and |
| | | conditions, express and implied, including warranties or conditions of title |
| | | and non-infringement, and implied warranties or conditions of merchantability |
| | | and fitness for a particular purpose; |
| | | |
| | | ii) effectively excludes on behalf of all Contributors all liability for damages, |
| | | including direct, indirect, special, incidental and consequential damages, |
| | | such as lost profits; |
| | | |
| | | iii) states that any provisions which differ from this Agreement are offered |
| | | by that Contributor alone and not by any other party; and |
| | | |
| | | iv) states that source code for the Program is available from such Contributor, |
| | | and informs licensees how to obtain it in a reasonable manner on or through |
| | | a medium customarily used for software exchange. |
| | | |
| | | When the Program is made available in source code form: |
| | | |
| | | a) it must be made available under this Agreement; and |
| | | |
| | | b) a copy of this Agreement must be included with each copy of the Program. |
| | | |
| | | Contributors may not remove or alter any copyright notices contained within |
| | | the Program. |
| | | |
| | | Each Contributor must identify itself as the originator of its Contribution, |
| | | if any, in a manner that reasonably allows subsequent Recipients to identify |
| | | the originator of the Contribution. |
| | | |
| | | 4. COMMERCIAL DISTRIBUTION |
| | | |
| | | Commercial distributors of software may accept certain responsibilities with |
| | | respect to end users, business partners and the like. While this license is |
| | | intended to facilitate the commercial use of the Program, the Contributor |
| | | who includes the Program in a commercial product offering should do so in |
| | | a manner which does not create potential liability for other Contributors. |
| | | Therefore, if a Contributor includes the Program in a commercial product offering, |
| | | such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify |
| | | every other Contributor ("Indemnified Contributor") against any losses, damages |
| | | and costs (collectively "Losses") arising from claims, lawsuits and other |
| | | legal actions brought by a third party against the Indemnified Contributor |
| | | to the extent caused by the acts or omissions of such Commercial Contributor |
| | | in connection with its distribution of the Program in a commercial product |
| | | offering. The obligations in this section do not apply to any claims or Losses |
| | | relating to any actual or alleged intellectual property infringement. In order |
| | | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial |
| | | Contributor in writing of such claim, and b) allow the Commercial Contributor |
| | | to control, and cooperate with the Commercial Contributor in, the defense |
| | | and any related settlement negotiations. The Indemnified Contributor may participate |
| | | in any such claim at its own expense. |
| | | |
| | | For example, a Contributor might include the Program in a commercial product |
| | | offering, Product X. That Contributor is then a Commercial Contributor. If |
| | | that Commercial Contributor then makes performance claims, or offers warranties |
| | | related to Product X, those performance claims and warranties are such Commercial |
| | | Contributor's responsibility alone. Under this section, the Commercial Contributor |
| | | would have to defend claims against the other Contributors related to those |
| | | performance claims and warranties, and if a court requires any other Contributor |
| | | to pay any damages as a result, the Commercial Contributor must pay those |
| | | damages. |
| | | |
| | | 5. NO WARRANTY |
| | | |
| | | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON |
| | | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS |
| | | OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF |
| | | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. |
| | | Each Recipient is solely responsible for determining the appropriateness of |
| | | using and distributing the Program and assumes all risks associated with its |
| | | exercise of rights under this Agreement, including but not limited to the |
| | | risks and costs of program errors, compliance with applicable laws, damage |
| | | to or loss of data, programs or equipment, and unavailability or interruption |
| | | of operations. |
| | | |
| | | 6. DISCLAIMER OF LIABILITY |
| | | |
| | | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY |
| | | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| | | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION |
| | | LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| | | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY |
| | | WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS |
| | | GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| | | |
| | | 7. GENERAL |
| | | |
| | | If any provision of this Agreement is invalid or unenforceable under applicable |
| | | law, it shall not affect the validity or enforceability of the remainder of |
| | | the terms of this Agreement, and without further action by the parties hereto, |
| | | such provision shall be reformed to the minimum extent necessary to make such |
| | | provision valid and enforceable. |
| | | |
| | | If Recipient institutes patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Program itself |
| | | (excluding combinations of the Program with other software or hardware) infringes |
| | | such Recipient's patent(s), then such Recipient's rights granted under Section |
| | | 2(b) shall terminate as of the date such litigation is filed. |
| | | |
| | | All Recipient's rights under this Agreement shall terminate if it fails to |
| | | comply with any of the material terms or conditions of this Agreement and |
| | | does not cure such failure in a reasonable period of time after becoming aware |
| | | of such noncompliance. If all Recipient's rights under this Agreement terminate, |
| | | Recipient agrees to cease use and distribution of the Program as soon as reasonably |
| | | practicable. However, Recipient's obligations under this Agreement and any |
| | | licenses granted by Recipient relating to the Program shall continue and survive. |
| | | |
| | | Everyone is permitted to copy and distribute copies of this Agreement, but |
| | | in order to avoid inconsistency the Agreement is copyrighted and may only |
| | | be modified in the following manner. The Agreement Steward reserves the right |
| | | to publish new versions (including revisions) of this Agreement from time |
| | | to time. No one other than the Agreement Steward has the right to modify this |
| | | Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse |
| | | Foundation may assign the responsibility to serve as the Agreement Steward |
| | | to a suitable separate entity. Each new version of the Agreement will be given |
| | | a distinguishing version number. The Program (including Contributions) may |
| | | always be distributed subject to the version of the Agreement under which |
| | | it was received. In addition, after a new version of the Agreement is published, |
| | | Contributor may elect to distribute the Program (including its Contributions) |
| | | under the new version. Except as expressly stated in Sections 2(a) and 2(b) |
| | | above, Recipient receives no rights or licenses to the intellectual property |
| | | of any Contributor under this Agreement, whether expressly, by implication, |
| | | estoppel or otherwise. All rights in the Program not expressly granted under |
| | | this Agreement are reserved. |
| | | |
| | | This Agreement is governed by the laws of the State of New York and the intellectual |
| | | property laws of the United States of America. No party to this Agreement |
| | | will bring a legal action under this Agreement more than one year after the |
| | | cause of action arose. Each party waives its rights to a jury trial in any |
| | | resulting litigation. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | |
| | | Apache License |
| | | Version 2.0, January 2004 |
| | | http://www.apache.org/licenses/ |
| | | |
| | | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
| | | |
| | | 1. Definitions. |
| | | |
| | | "License" shall mean the terms and conditions for use, reproduction, |
| | | and distribution as defined by Sections 1 through 9 of this document. |
| | | |
| | | "Licensor" shall mean the copyright owner or entity authorized by |
| | | the copyright owner that is granting the License. |
| | | |
| | | "Legal Entity" shall mean the union of the acting entity and all |
| | | other entities that control, are controlled by, or are under common |
| | | control with that entity. For the purposes of this definition, |
| | | "control" means (i) the power, direct or indirect, to cause the |
| | | direction or management of such entity, whether by contract or |
| | | otherwise, or (ii) ownership of fifty percent (50%) or more of the |
| | | outstanding shares, or (iii) beneficial ownership of such entity. |
| | | |
| | | "You" (or "Your") shall mean an individual or Legal Entity |
| | | exercising permissions granted by this License. |
| | | |
| | | "Source" form shall mean the preferred form for making modifications, |
| | | including but not limited to software source code, documentation |
| | | source, and configuration files. |
| | | |
| | | "Object" form shall mean any form resulting from mechanical |
| | | transformation or translation of a Source form, including but |
| | | not limited to compiled object code, generated documentation, |
| | | and conversions to other media types. |
| | | |
| | | "Work" shall mean the work of authorship, whether in Source or |
| | | Object form, made available under the License, as indicated by a |
| | | copyright notice that is included in or attached to the work |
| | | (an example is provided in the Appendix below). |
| | | |
| | | "Derivative Works" shall mean any work, whether in Source or Object |
| | | form, that is based on (or derived from) the Work and for which the |
| | | editorial revisions, annotations, elaborations, or other modifications |
| | | represent, as a whole, an original work of authorship. For the purposes |
| | | of this License, Derivative Works shall not include works that remain |
| | | separable from, or merely link (or bind by name) to the interfaces of, |
| | | the Work and Derivative Works thereof. |
| | | |
| | | "Contribution" shall mean any work of authorship, including |
| | | the original version of the Work and any modifications or additions |
| | | to that Work or Derivative Works thereof, that is intentionally |
| | | submitted to Licensor for inclusion in the Work by the copyright owner |
| | | or by an individual or Legal Entity authorized to submit on behalf of |
| | | the copyright owner. For the purposes of this definition, "submitted" |
| | | means any form of electronic, verbal, or written communication sent |
| | | to the Licensor or its representatives, including but not limited to |
| | | communication on electronic mailing lists, source code control systems, |
| | | and issue tracking systems that are managed by, or on behalf of, the |
| | | Licensor for the purpose of discussing and improving the Work, but |
| | | excluding communication that is conspicuously marked or otherwise |
| | | designated in writing by the copyright owner as "Not a Contribution." |
| | | |
| | | "Contributor" shall mean Licensor and any individual or Legal Entity |
| | | on behalf of whom a Contribution has been received by Licensor and |
| | | subsequently incorporated within the Work. |
| | | |
| | | 2. Grant of Copyright License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | copyright license to reproduce, prepare Derivative Works of, |
| | | publicly display, publicly perform, sublicense, and distribute the |
| | | Work and such Derivative Works in Source or Object form. |
| | | |
| | | 3. Grant of Patent License. Subject to the terms and conditions of |
| | | this License, each Contributor hereby grants to You a perpetual, |
| | | worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
| | | (except as stated in this section) patent license to make, have made, |
| | | use, offer to sell, sell, import, and otherwise transfer the Work, |
| | | where such license applies only to those patent claims licensable |
| | | by such Contributor that are necessarily infringed by their |
| | | Contribution(s) alone or by combination of their Contribution(s) |
| | | with the Work to which such Contribution(s) was submitted. If You |
| | | institute patent litigation against any entity (including a |
| | | cross-claim or counterclaim in a lawsuit) alleging that the Work |
| | | or a Contribution incorporated within the Work constitutes direct |
| | | or contributory patent infringement, then any patent licenses |
| | | granted to You under this License for that Work shall terminate |
| | | as of the date such litigation is filed. |
| | | |
| | | 4. Redistribution. You may reproduce and distribute copies of the |
| | | Work or Derivative Works thereof in any medium, with or without |
| | | modifications, and in Source or Object form, provided that You |
| | | meet the following conditions: |
| | | |
| | | (a) You must give any other recipients of the Work or |
| | | Derivative Works a copy of this License; and |
| | | |
| | | (b) You must cause any modified files to carry prominent notices |
| | | stating that You changed the files; and |
| | | |
| | | (c) You must retain, in the Source form of any Derivative Works |
| | | that You distribute, all copyright, patent, trademark, and |
| | | attribution notices from the Source form of the Work, |
| | | excluding those notices that do not pertain to any part of |
| | | the Derivative Works; and |
| | | |
| | | (d) If the Work includes a "NOTICE" text file as part of its |
| | | distribution, then any Derivative Works that You distribute must |
| | | include a readable copy of the attribution notices contained |
| | | within such NOTICE file, excluding those notices that do not |
| | | pertain to any part of the Derivative Works, in at least one |
| | | of the following places: within a NOTICE text file distributed |
| | | as part of the Derivative Works; within the Source form or |
| | | documentation, if provided along with the Derivative Works; or, |
| | | within a display generated by the Derivative Works, if and |
| | | wherever such third-party notices normally appear. The contents |
| | | of the NOTICE file are for informational purposes only and |
| | | do not modify the License. You may add Your own attribution |
| | | notices within Derivative Works that You distribute, alongside |
| | | or as an addendum to the NOTICE text from the Work, provided |
| | | that such additional attribution notices cannot be construed |
| | | as modifying the License. |
| | | |
| | | You may add Your own copyright statement to Your modifications and |
| | | may provide additional or different license terms and conditions |
| | | for use, reproduction, or distribution of Your modifications, or |
| | | for any such Derivative Works as a whole, provided Your use, |
| | | reproduction, and distribution of the Work otherwise complies with |
| | | the conditions stated in this License. |
| | | |
| | | 5. Submission of Contributions. Unless You explicitly state otherwise, |
| | | any Contribution intentionally submitted for inclusion in the Work |
| | | by You to the Licensor shall be under the terms and conditions of |
| | | this License, without any additional terms or conditions. |
| | | Notwithstanding the above, nothing herein shall supersede or modify |
| | | the terms of any separate license agreement you may have executed |
| | | with Licensor regarding such Contributions. |
| | | |
| | | 6. Trademarks. This License does not grant permission to use the trade |
| | | names, trademarks, service marks, or product names of the Licensor, |
| | | except as required for reasonable and customary use in describing the |
| | | origin of the Work and reproducing the content of the NOTICE file. |
| | | |
| | | 7. Disclaimer of Warranty. Unless required by applicable law or |
| | | agreed to in writing, Licensor provides the Work (and each |
| | | Contributor provides its Contributions) on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| | | implied, including, without limitation, any warranties or conditions |
| | | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
| | | PARTICULAR PURPOSE. You are solely responsible for determining the |
| | | appropriateness of using or redistributing the Work and assume any |
| | | risks associated with Your exercise of permissions under this License. |
| | | |
| | | 8. Limitation of Liability. In no event and under no legal theory, |
| | | whether in tort (including negligence), contract, or otherwise, |
| | | unless required by applicable law (such as deliberate and grossly |
| | | negligent acts) or agreed to in writing, shall any Contributor be |
| | | liable to You for damages, including any direct, indirect, special, |
| | | incidental, or consequential damages of any character arising as a |
| | | result of this License or out of the use or inability to use the |
| | | Work (including but not limited to damages for loss of goodwill, |
| | | work stoppage, computer failure or malfunction, or any and all |
| | | other commercial damages or losses), even if such Contributor |
| | | has been advised of the possibility of such damages. |
| | | |
| | | 9. Accepting Warranty or Additional Liability. While redistributing |
| | | the Work or Derivative Works thereof, You may choose to offer, |
| | | and charge a fee for, acceptance of support, warranty, indemnity, |
| | | or other liability obligations and/or rights consistent with this |
| | | License. However, in accepting such obligations, You may act only |
| | | on Your own behalf and on Your sole responsibility, not on behalf |
| | | of any other Contributor, and only if You agree to indemnify, |
| | | defend, and hold each Contributor harmless for any liability |
| | | incurred by, or claims asserted against, such Contributor by reason |
| | | of your accepting any such warranty or additional liability. |
| | | |
| | | END OF TERMS AND CONDITIONS |
| | | |
| | | APPENDIX: How to apply the Apache License to your work. |
| | | |
| | | To apply the Apache License to your work, attach the following |
| | | boilerplate notice, with the fields enclosed by brackets "[]" |
| | | replaced with your own identifying information. (Don't include |
| | | the brackets!) The text should be enclosed in the appropriate |
| | | comment syntax for the file format. We also recommend that a |
| | | file or class name and description of purpose be included on the |
| | | same "printed page" as the copyright notice for easier |
| | | identification within third-party archives. |
| | | |
| | | Copyright [yyyy] [name of copyright owner] |
| | | |
| | | Licensed under the Apache License, Version 2.0 (the "License"); |
| | | you may not use this file except in compliance with the License. |
| | | You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, software |
| | | distributed under the License is distributed on an "AS IS" BASIS, |
| | | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | See the License for the specific language governing permissions and |
| | | limitations under the License. |
New file |
| | |
| | | https://raw.githubusercontent.com/qos-ch/slf4j/v_1.7.29/LICENSE.txt |
| | | |
| | | Copyright (c) 2004-2017 QOS.ch |
| | | All rights reserved. |
| | | |
| | | Permission is hereby granted, free of charge, to any person obtaining |
| | | a copy of this software and associated documentation files (the |
| | | "Software"), to deal in the Software without restriction, including |
| | | without limitation the rights to use, copy, modify, merge, publish, |
| | | distribute, sublicense, and/or sell copies of the Software, and to |
| | | permit persons to whom the Software is furnished to do so, subject to |
| | | the following conditions: |
| | | |
| | | The above copyright notice and this permission notice shall be |
| | | included in all copies or substantial portions of the Software. |
| | | |
| | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| | | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| | | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| | | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| | | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| | | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| | | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | |
| | | <!-- |
| | | Licensed to the Apache Software Foundation (ASF) under one |
| | | or more contributor license agreements. See the NOTICE file |
| | | distributed with this work for additional information |
| | | regarding copyright ownership. The ASF licenses this file |
| | | to you under the Apache License, Version 2.0 (the |
| | | "License"); you may not use this file except in compliance |
| | | with the License. You may obtain a copy of the License at |
| | | |
| | | http://www.apache.org/licenses/LICENSE-2.0 |
| | | |
| | | Unless required by applicable law or agreed to in writing, |
| | | software distributed under the License is distributed on an |
| | | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | KIND, either express or implied. See the License for the |
| | | specific language governing permissions and limitations |
| | | under the License. |
| | | --> |
| | | |
| | | <!-- |
| | | | This is the configuration file for Maven. It can be specified at two levels: |
| | | | |
| | | | 1. User Level. This settings.xml file provides configuration for a single user, |
| | | | and is normally provided in ${user.home}/.m2/settings.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -s /path/to/user/settings.xml |
| | | | |
| | | | 2. Global Level. This settings.xml file provides configuration for all Maven |
| | | | users on a machine (assuming they're all using the same Maven |
| | | | installation). It's normally provided in |
| | | | ${maven.conf}/settings.xml. |
| | | | |
| | | | NOTE: This location can be overridden with the CLI option: |
| | | | |
| | | | -gs /path/to/global/settings.xml |
| | | | |
| | | | The sections in this sample file are intended to give you a running start at |
| | | | getting the most out of your Maven installation. Where appropriate, the default |
| | | | values (values used when the setting is not specified) are provided. |
| | | | |
| | | |--> |
| | | <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> |
| | | <!-- localRepository |
| | | | The path to the local repository maven will use to store artifacts. |
| | | | |
| | | | Default: ${user.home}/.m2/repository |
| | | --> |
| | | <localRepository>D:\tools\repository</localRepository> |
| | | |
| | | |
| | | <!-- interactiveMode |
| | | | This will determine whether maven prompts you when it needs input. If set to false, |
| | | | maven will use a sensible default value, perhaps based on some other setting, for |
| | | | the parameter in question. |
| | | | |
| | | | Default: true |
| | | <interactiveMode>true</interactiveMode> |
| | | --> |
| | | |
| | | <!-- offline |
| | | | Determines whether maven should attempt to connect to the network when executing a build. |
| | | | This will have an effect on artifact downloads, artifact deployment, and others. |
| | | | |
| | | | Default: false |
| | | <offline>false</offline> |
| | | --> |
| | | |
| | | <!-- pluginGroups |
| | | | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e. |
| | | | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers |
| | | | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list. |
| | | |--> |
| | | <pluginGroups> |
| | | <!-- pluginGroup |
| | | | Specifies a further group identifier to use for plugin lookup. |
| | | <pluginGroup>com.your.plugins</pluginGroup> |
| | | --> |
| | | </pluginGroups> |
| | | |
| | | <!-- proxies |
| | | | This is a list of proxies which can be used on this machine to connect to the network. |
| | | | Unless otherwise specified (by system property or command-line switch), the first proxy |
| | | | specification in this list marked as active will be used. |
| | | |--> |
| | | <proxies> |
| | | <!-- proxy |
| | | | Specification for one proxy, to be used in connecting to the network. |
| | | | |
| | | <proxy> |
| | | <id>optional</id> |
| | | <active>true</active> |
| | | <protocol>http</protocol> |
| | | <username>proxyuser</username> |
| | | <password>proxypass</password> |
| | | <host>proxy.host.net</host> |
| | | <port>80</port> |
| | | <nonProxyHosts>local.net|some.host.com</nonProxyHosts> |
| | | </proxy> |
| | | --> |
| | | </proxies> |
| | | |
| | | <!-- servers |
| | | | This is a list of authentication profiles, keyed by the server-id used within the system. |
| | | | Authentication profiles can be used whenever maven must make a connection to a remote server. |
| | | |--> |
| | | <servers> |
| | | <!-- server |
| | | | Specifies the authentication information to use when connecting to a particular server, identified by |
| | | | a unique name within the system (referred to by the 'id' attribute below). |
| | | | |
| | | | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are |
| | | | used together. |
| | | | |
| | | <server> |
| | | <id>deploymentRepo</id> |
| | | <username>repouser</username> |
| | | <password>repopwd</password> |
| | | </server> |
| | | --> |
| | | |
| | | <!-- Another sample, using keys to authenticate. |
| | | <server> |
| | | <id>siteServer</id> |
| | | <privateKey>/path/to/private/key</privateKey> |
| | | <passphrase>optional; leave empty if not used.</passphrase> |
| | | </server> |
| | | --> |
| | | </servers> |
| | | |
| | | <!-- mirrors |
| | | | This is a list of mirrors to be used in downloading artifacts from remote repositories. |
| | | | |
| | | | It works like this: a POM may declare a repository to use in resolving certain artifacts. |
| | | | However, this repository may have problems with heavy traffic at times, so people have mirrored |
| | | | it to several places. |
| | | | |
| | | | That repository definition will have a unique id, so we can create a mirror reference for that |
| | | | repository, to be used as an alternate download site. The mirror site will be the preferred |
| | | | server for that repository. |
| | | |--> |
| | | <mirrors> |
| | | <!-- mirror |
| | | | Specifies a repository mirror site to use instead of a given repository. The repository that |
| | | | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used |
| | | | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. |
| | | | |
| | | <mirror> |
| | | <id>mirrorId</id> |
| | | <mirrorOf>repositoryId</mirrorOf> |
| | | <name>Human Readable Name for this Mirror.</name> |
| | | <url>http://my.repository.com/repo/path</url> |
| | | </mirror> |
| | | --> |
| | | |
| | | <mirror> |
| | | <id>nexus-aliyun</id> |
| | | <name>nexus-aliyun</name> |
| | | <url>http://maven.aliyun.com/nexus/content/groups/public</url> |
| | | <mirrorOf>central</mirrorOf> |
| | | </mirror> |
| | | </mirrors> |
| | | |
| | | <!-- profiles |
| | | | This is a list of profiles which can be activated in a variety of ways, and which can modify |
| | | | the build process. Profiles provided in the settings.xml are intended to provide local machine- |
| | | | specific paths and repository locations which allow the build to work in the local environment. |
| | | | |
| | | | For example, if you have an integration testing plugin - like cactus - that needs to know where |
| | | | your Tomcat instance is installed, you can provide a variable here such that the variable is |
| | | | dereferenced during the build process to configure the cactus plugin. |
| | | | |
| | | | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles |
| | | | section of this document (settings.xml) - will be discussed later. Another way essentially |
| | | | relies on the detection of a system property, either matching a particular value for the property, |
| | | | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a |
| | | | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'. |
| | | | Finally, the list of active profiles can be specified directly from the command line. |
| | | | |
| | | | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact |
| | | | repositories, plugin repositories, and free-form properties to be used as configuration |
| | | | variables for plugins in the POM. |
| | | | |
| | | |--> |
| | | <profiles> |
| | | <!-- profile |
| | | | Specifies a set of introductions to the build process, to be activated using one or more of the |
| | | | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/> |
| | | | or the command line, profiles have to have an ID that is unique. |
| | | | |
| | | | An encouraged best practice for profile identification is to use a consistent naming convention |
| | | | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc. |
| | | | This will make it more intuitive to understand what the set of introduced profiles is attempting |
| | | | to accomplish, particularly when you only have a list of profile id's for debug. |
| | | | |
| | | | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo. |
| | | <profile> |
| | | <id>jdk-1.4</id> |
| | | |
| | | <activation> |
| | | <jdk>1.4</jdk> |
| | | </activation> |
| | | |
| | | <repositories> |
| | | <repository> |
| | | <id>jdk14</id> |
| | | <name>Repository for JDK 1.4 builds</name> |
| | | <url>http://www.myhost.com/maven/jdk14</url> |
| | | <layout>default</layout> |
| | | <snapshotPolicy>always</snapshotPolicy> |
| | | </repository> |
| | | </repositories> |
| | | </profile> |
| | | --> |
| | | |
| | | <!-- |
| | | | Here is another profile, activated by the system property 'target-env' with a value of 'dev', |
| | | | which provides a specific path to the Tomcat instance. To use this, your plugin configuration |
| | | | might hypothetically look like: |
| | | | |
| | | | ... |
| | | | <plugin> |
| | | | <groupId>org.myco.myplugins</groupId> |
| | | | <artifactId>myplugin</artifactId> |
| | | | |
| | | | <configuration> |
| | | | <tomcatLocation>${tomcatPath}</tomcatLocation> |
| | | | </configuration> |
| | | | </plugin> |
| | | | ... |
| | | | |
| | | | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to |
| | | | anything, you could just leave off the <value/> inside the activation-property. |
| | | | |
| | | <profile> |
| | | <id>env-dev</id> |
| | | |
| | | <activation> |
| | | <property> |
| | | <name>target-env</name> |
| | | <value>dev</value> |
| | | </property> |
| | | </activation> |
| | | |
| | | <properties> |
| | | <tomcatPath>/path/to/tomcat/instance</tomcatPath> |
| | | </properties> |
| | | </profile> |
| | | --> |
| | | |
| | | |
| | | <profile> |
| | | <id>jdk-1.8</id> |
| | | <activation> |
| | | <activeByDefault>true</activeByDefault> |
| | | <jdk>1.8</jdk> |
| | | </activation> |
| | | <properties> |
| | | <maven.compiler.source>1.8</maven.compiler.source> |
| | | <maven.compiler.target>1.8</maven.compiler.target> |
| | | <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> |
| | | </properties> |
| | | </profile> |
| | | </profiles> |
| | | |
| | | <!-- activeProfiles |
| | | | List of profiles that are active for all builds. |
| | | | |
| | | <activeProfiles> |
| | | <activeProfile>alwaysActiveProfile</activeProfile> |
| | | <activeProfile>anotherAlwaysActiveProfile</activeProfile> |
| | | </activeProfiles> |
| | | --> |
| | | </settings> |
| | |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join-boot-starter</artifactId> |
| | | <version>1.4.8</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>dynamic-datasource-spring-boot-starter</artifactId> |
| | | <version>3.3.1</version> |
| | |
| | | <version>1.2.33</version> |
| | | </dependency> |
| | | |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join</artifactId>--> |
| | | <!-- <version>1.2.4</version>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join-boot-starter</artifactId> |
| | | <version>1.4.12</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.schema.ModelRef; |
| | | import springfox.documentation.service.*; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.service.Contact; |
| | | import springfox.documentation.service.Parameter; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spi.service.contexts.SecurityContext; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | .apis(RequestHandlerSelectors.basePackage("com.mes")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .globalOperationParameters(pars) |
| | | .securitySchemes(Collections.EMPTY_LIST) |
| | | .securityContexts(Arrays.asList(securityContext())); |
| | | .globalOperationParameters(pars); |
| | | } |
| | | |
| | | private SecurityContext securityContext() { |
| | | return SecurityContext.builder() |
| | | .securityReferences(defaultAuth()) |
| | | .forPaths(PathSelectors.any()) |
| | | @Bean |
| | | public Docket adminApiConfig() { |
| | | List<Parameter> pars = new ArrayList<>(); |
| | | ParameterBuilder tokenPar = new ParameterBuilder(); |
| | | tokenPar.name("adminId") |
| | | .description("用户token") |
| | | .defaultValue("1") |
| | | .modelRef(new ModelRef("string")) |
| | | .parameterType("header") |
| | | .required(false) |
| | | .build(); |
| | | } |
| | | pars.add(tokenPar.build()); |
| | | |
| | | private List<SecurityReference> defaultAuth() { |
| | | AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); |
| | | AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; |
| | | authorizationScopes[0] = authorizationScope; |
| | | return Arrays.asList(new SecurityReference("Authorization", authorizationScopes)); |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .groupName("adminApi") |
| | | .apiInfo(adminApiInfo()) |
| | | .select() |
| | | //只显示admin路径下的页面 |
| | | .apis(RequestHandlerSelectors.basePackage("com.mes")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .globalOperationParameters(pars); |
| | | } |
| | | |
| | | |
| | | private ApiInfo webApiInfo() { |
| | | return new ApiInfoBuilder() |
| | |
| | | .contact(new Contact("zhan_py", "", "")) |
| | | .build(); |
| | | } |
| | | |
| | | private ApiInfo adminApiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("后台管理系统-API文档") |
| | | .description("本文档描述了mes后台系统服务接口定义") |
| | | .version("1.0") |
| | | .contact(new Contact("zhan_py", "", "")) |
| | | .build(); |
| | | } |
| | | } |
| | |
| | | // 2、全局配置 |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent2\\"); |
| | | gc.setOutputDir("D:\\Documents\\hangzhoumesParent3\\"); |
| | | |
| | | gc.setServiceName("%sService"); //去掉Service接口的首字母I |
| | | gc.setAuthor("wu"); |
| | |
| | | // 4、包配置 |
| | | PackageConfig pc = new PackageConfig(); |
| | | pc.setParent("com.mes"); |
| | | pc.setModuleName("engineering"); //模块名 |
| | | pc.setModuleName("glassinfo"); //模块名 |
| | | pc.setController("controller"); |
| | | pc.setService("service"); |
| | | pc.setMapper("mapper"); |
| | |
| | | // 5、策略配置 |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | |
| | | strategy.setInclude("engineering"); |
| | | strategy.setInclude("glass_info"); |
| | | |
| | | strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 |
| | | |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | |
| | | |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | |
| | | |
| | | @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | public Result<Integer> saveUpPattenUsage(@RequestBody String engineeringId) { |
| | | //List<OptimizeUpPattenUsage> glass = upPattenUsageService.saveUpPattenUsage(engineeringId); |
| | | log.info("显示工位上的玻璃信息:{}", 200); |
| | | public Result<Integer> saveUpPattenUsage(String engineeringId) { |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineeringId); |
| | | log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | | upPattenUsageService.saveUpPattenUsage(upPattenUsages); |
| | | log.info("从PP表查询glassinfo的数据并保存到表里"); |
| | | List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineeringId); |
| | | return Result.build(200, "", 200); |
| | | } |
| | | } |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | | */ |
| | | @Setter |
| | | @Getter |
| | | public class OptimizeUpPattenUsage { |
| | | |
| | | // Getter methods |
| | | // Setter methods |
| | | /** |
| | | * 工程号 |
| | | */ |
| | |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | // Getter methods |
| | | public String getProjectNo() { |
| | | return projectNo; |
| | | } |
| | | |
| | | public String getGlassType() { |
| | | return glassType; |
| | | } |
| | | |
| | | public Double getWidth() { |
| | | return width; |
| | | } |
| | | |
| | | public Double getHeight() { |
| | | return height; |
| | | } |
| | | |
| | | public Double getGlassThickness() { |
| | | return glassThickness; |
| | | } |
| | | |
| | | public Integer getHeatLayoutSort() { |
| | | return heatLayoutSort; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | } |
| | | |
| | | // Setter methods |
| | | public void setProjectNo(String projectNo) { |
| | | this.projectNo = projectNo; |
| | | } |
| | | |
| | | public void setGlassType(String glassType) { |
| | | this.glassType = glassType; |
| | | } |
| | | |
| | | public void setWidth(Double width) { |
| | | this.width = width; |
| | | } |
| | | |
| | | public void setHeight(Double height) { |
| | | this.height = height; |
| | | } |
| | | |
| | | public void setGlassThickness(Double glassThickness) { |
| | | this.glassThickness = glassThickness; |
| | | } |
| | | |
| | | public void setHeatLayoutSort(Integer heatLayoutSort) { |
| | | this.heatLayoutSort = heatLayoutSort; |
| | | } |
| | | |
| | | public void setState(Integer state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | } |
| | |
| | | public interface UpPattenUsageService extends MPJBaseService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | |
| | | List<Map> saveUpPattenUsage(String engineeringId); |
| | | List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId); |
| | | |
| | | void saveUpPattenUsage(List<UpPattenUsage> upPattenUsages); |
| | | } |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Override |
| | | @DS("pp") |
| | | public List<Map> saveUpPattenUsage(String engineeringId) { |
| | | public List<UpPattenUsage> selectSaveUpPattenUsage(String engineeringId) { |
| | | |
| | | List<OptimizeUpPattenUsage> upPattenUsageList = null; |
| | | if (engineeringId != null) { |
| | | |
| | | List<Map> upPattenUsageList=optimizeProjectMapper.selectJoinList(Map.class,new MPJQueryWrapper<OptimizeProject>() |
| | | upPattenUsageList = optimizeProjectMapper.selectJoinList(OptimizeUpPattenUsage.class, new MPJQueryWrapper<OptimizeProject>() |
| | | .select("t.project_no,t.glass_type,b.width,b.height,REGEXP_REPLACE(t.glass_thickness,'\\D','')as glass_thickness,b.heat_layout_sort") |
| | | .leftJoin("optimize_layout b on t.project_no=b.project_no") |
| | | .eq("b.project_no",engineeringId)); |
| | | .eq("b.project_no", engineeringId)); |
| | | } |
| | | return Collections.emptyList(); |
| | | // 创建一个 List 用于保存映射后的实体对象 |
| | | List<UpPattenUsage> resultList = new ArrayList<>(); |
| | | |
| | | // 遍历查询结果中的每个 Map 对象 |
| | | if (upPattenUsageList != null) { |
| | | for (OptimizeUpPattenUsage map : upPattenUsageList) { |
| | | // 创建一个新的 OptimizeProject 对象 |
| | | UpPattenUsage optimizeProject = new UpPattenUsage(); |
| | | // 将 Map 中的每个键值对映射到 OptimizeProject 对象的相应字段上 |
| | | optimizeProject.setEngineeringId((String) map.getProjectNo()); |
| | | optimizeProject.setFilmsId((String) map.getGlassType()); |
| | | optimizeProject.setWidth((Double) map.getWidth()); |
| | | optimizeProject.setHeight((Double) map.getHeight()); |
| | | optimizeProject.setThickness((Double)map.getHeight()); |
| | | optimizeProject.setLayoutSequence((Integer) map.getHeatLayoutSort()); |
| | | optimizeProject.setState(0); |
| | | // 将映射后的对象添加到结果列表中 |
| | | resultList.add(optimizeProject); |
| | | } |
| | | } |
| | | log.info("查询出上片顺序集合保存到实体类{}",resultList); |
| | | return resultList; |
| | | } |
| | | |
| | | @Override |
| | | public void saveUpPattenUsage(List<UpPattenUsage> upPattenUsage) { |
| | | this.saveBatch(upPattenUsage); |
| | | //保存原片使用详情表 |
| | | } |
| | | |
| | | //@Override |
| | | public void selectSaveGlassinfo(String engineeringId) { |
| | | //保存玻璃信息表 |
| | | //optimizeProjectMapper.selectJoinList(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | import com.mes.common.filter.JwtAuthenticationTokenFilter; |
| | | import com.mes.common.handler.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.security.authentication.AuthenticationManager; |
| | | import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; |
| | | import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| | | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; |
| | | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; |
| | | import org.springframework.security.config.http.SessionCreationPolicy; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; |
| | | |
| | | @Configuration |
| | | @EnableWebSecurity |
| | | //@EnableWebSecurity |
| | | @EnableGlobalMethodSecurity(prePostEnabled = true) |
| | | public class TokenWebSecurityConfig extends WebSecurityConfigurerAdapter { |
| | | @Autowired |
| | | private JwtAuthenticationTokenFilter jwtAuthenticationTokenFilter; |
| | | @Autowired |
| | | LoginFailureHandler loginFailureHandler; |
| | | |
| | | @Autowired |
| | | LoginSuccessHandler loginSuccessHandler; |
| | | |
| | | @Autowired |
| | | JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint; |
| | | |
| | | @Autowired |
| | | JwtAccessDeniedHandler jwtAccessDeniedHandler; |
| | | |
| | | @Autowired |
| | | JwtLogoutSuccessHandler jwtLogoutSuccessHandler; |
| | | |
| | | @Bean |
| | | public PasswordEncoder passwordEncoder() { |
| | |
| | | */ |
| | | @Override |
| | | protected void configure(HttpSecurity http) throws Exception { |
| | | |
| | | http.cors().and().csrf().disable() |
| | | |
| | | // 登录配置 |
| | | .formLogin() |
| | | .successHandler(loginSuccessHandler) |
| | | .failureHandler(loginFailureHandler) |
| | | |
| | | .and() |
| | | .logout() |
| | | .logoutSuccessHandler(jwtLogoutSuccessHandler) |
| | | |
| | | // 禁用session |
| | | .and() |
| | | .sessionManagement() |
| | | .sessionCreationPolicy(SessionCreationPolicy.STATELESS) |
| | | |
| | | // 配置拦截规则 |
| | | http |
| | | //关闭csrf |
| | | .csrf().disable() |
| | | //不通过Session获取SecurityContext |
| | | .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) |
| | | .and() |
| | | .authorizeRequests() |
| | | .antMatchers("/sys/user/login").anonymous() |
| | | .antMatchers("/swagger-ui.html").permitAll() |
| | | .antMatchers("/webjars/**").permitAll() |
| | | .antMatchers("/v2/**").permitAll() |
| | | .antMatchers("/swagger-resources/**").permitAll() |
| | | .anyRequest().authenticated() |
| | | |
| | | // 异常处理器 |
| | | .and() |
| | | .exceptionHandling() |
| | | .authenticationEntryPoint(jwtAuthenticationEntryPoint) |
| | | .accessDeniedHandler(jwtAccessDeniedHandler) |
| | | |
| | | // 配置自定义的过滤器 |
| | | .and() |
| | | .addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); |
| | | // 对于登录接口 允许匿名访问 |
| | | .antMatchers("/userinfo/login").anonymous() |
| | | .antMatchers("/hello").permitAll() |
| | | // 除上面外的所有请求全部需要鉴权认证 |
| | | .anyRequest().permitAll(); |
| | | // http.addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); |
| | | } |
| | | |
| | | @Bean |
| | |
| | | |
| | | import com.mes.common.utils.JwtUtil; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.common.utils.UserInfoUtils; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.userinfo.entity.LoginUser; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| | |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | private SysUserService sysUserService; |
| | | private SysMenuMapper menuMapper; |
| | | |
| | | @Override |
| | | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { |
| | |
| | | String redisKey = "login:" + userid; |
| | | LoginUser loginUser = redisUtil.getCacheObject(redisKey); |
| | | if (Objects.isNull(loginUser)) { |
| | | response.setHeader("token", ""); |
| | | throw new RuntimeException("用户未登录"); |
| | | } |
| | | //将用户信息放入当前线程 |
| | | UserInfoUtils.set(loginUser.getUser()); |
| | | //存入SecurityContextHolder,以供后面的过滤器使用 |
| | | List<String> permissionKeyList = sysUserService.getUserAuthorityInfo(Long.parseLong(userid)); |
| | | List<String> permissionKeyList = menuMapper.selectPermsByUserId(Long.parseLong(userid)); |
| | | List<GrantedAuthority> authorities = permissionKeyList.stream(). |
| | | map(SimpleGrantedAuthority::new) |
| | | .collect(Collectors.toList()); |
New file |
| | |
| | | package com.mes.common.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.mes.common.utils.WebUtils; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.security.access.AccessDeniedException; |
| | | import org.springframework.security.web.access.AccessDeniedHandler; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/12 10:38 |
| | | * @Description: |
| | | */ |
| | | @Component |
| | | public class AccessDeniedHandlerImpl implements AccessDeniedHandler { |
| | | @Override |
| | | public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException { |
| | | Result result = Result.error(HttpStatus.FORBIDDEN.value(), "权限不足"); |
| | | String json = JSON.toJSONString(result); |
| | | WebUtils.renderString(response, json); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.handler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.mes.common.utils.WebUtils; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.security.core.AuthenticationException; |
| | | import org.springframework.security.web.AuthenticationEntryPoint; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.ServletException; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/12 10:38 |
| | | * @Description: |
| | | */ |
| | | @Component |
| | | public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint { |
| | | @Override |
| | | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { |
| | | Result result = Result.error(HttpStatus.UNAUTHORIZED.value(), "认证失败请重新登录"); |
| | | String json = JSON.toJSONString(result); |
| | | WebUtils.renderString(response, json); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // jwt是否过期 |
| | | public static boolean isTokenExpired(Claims claims) { |
| | | public boolean isTokenExpired(Claims claims) { |
| | | return claims.getExpiration().before(new Date()); |
| | | } |
| | | |
| | |
| | | public Collection<String> keys(final String pattern) { |
| | | return redisTemplate.keys(pattern); |
| | | } |
| | | |
| | | /** |
| | | * 判断key是否存在 |
| | | * |
| | | * @param key 键 |
| | | * @return true 存在 false不存在 |
| | | */ |
| | | public boolean hasKey(String key) { |
| | | try { |
| | | return redisTemplate.hasKey(key); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | //package com.mes.config; |
| | | // |
| | | // |
| | | //import com.mes.filter.TokenAuthFilter; |
| | | //import com.mes.filter.TokenLoginFilter; |
| | | //import com.mes.security.DefaultPasswordEncoder; |
| | | //import com.mes.security.TokenLogoutHandler; |
| | | //import com.mes.security.TokenManager; |
| | | //import com.mes.security.UnauthEntryPoint; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.context.annotation.Configuration; |
| | | //import org.springframework.data.redis.core.RedisTemplate; |
| | | //import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; |
| | | //import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; |
| | | //import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| | | //import org.springframework.security.config.annotation.web.builders.WebSecurity; |
| | | //import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; |
| | | //import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; |
| | | //import org.springframework.security.core.userdetails.UserDetailsService; |
| | | // |
| | | //@Configuration |
| | | //@EnableWebSecurity |
| | | //@EnableGlobalMethodSecurity(prePostEnabled = true) |
| | | //public class TokenWebSecurityConfig extends WebSecurityConfigurerAdapter { |
| | | // |
| | | // private TokenManager tokenManager; |
| | | // private RedisTemplate redisTemplate; |
| | | // private DefaultPasswordEncoder defaultPasswordEncoder; |
| | | // private UserDetailsService userDetailsService; |
| | | // |
| | | // @Autowired |
| | | // public TokenWebSecurityConfig(UserDetailsService userDetailsService, DefaultPasswordEncoder defaultPasswordEncoder, |
| | | // TokenManager tokenManager, RedisTemplate redisTemplate) { |
| | | // this.userDetailsService = userDetailsService; |
| | | // this.defaultPasswordEncoder = defaultPasswordEncoder; |
| | | // this.tokenManager = tokenManager; |
| | | // this.redisTemplate = redisTemplate; |
| | | // } |
| | | // |
| | | // /** |
| | | // * 配置设置 |
| | | // * @param http |
| | | // * @throws Exception |
| | | // */ |
| | | // //设置退出的地址和token,redis操作地址 |
| | | // @Override |
| | | // protected void configure(HttpSecurity http) throws Exception { |
| | | // http.exceptionHandling() |
| | | // .authenticationEntryPoint(new UnauthEntryPoint())//没有权限访问 |
| | | // .and().csrf().disable() |
| | | // .authorizeRequests() |
| | | // .anyRequest().authenticated() |
| | | // .and().logout().logoutUrl("/admin/acl/index/logout")//退出路径 |
| | | // .addLogoutHandler(new TokenLogoutHandler(tokenManager,redisTemplate)).and() |
| | | // .addFilter(new TokenLoginFilter(authenticationManager(), tokenManager, redisTemplate)) |
| | | // .addFilter(new TokenAuthFilter(authenticationManager(), tokenManager, redisTemplate)).httpBasic(); |
| | | // } |
| | | // |
| | | // //调用userDetailsService和密码处理 |
| | | // @Override |
| | | // public void configure(AuthenticationManagerBuilder auth) throws Exception { |
| | | // auth.userDetailsService(userDetailsService).passwordEncoder(defaultPasswordEncoder); |
| | | // } |
| | | // //不进行认证的路径,可以直接访问 |
| | | // @Override |
| | | // public void configure(WebSecurity web) throws Exception { |
| | | // web.ignoring().antMatchers("/api/**"); |
| | | // } |
| | | //} |
New file |
| | |
| | | //package com.mes.entity; |
| | | // |
| | | //import lombok.Data; |
| | | //import org.springframework.security.core.GrantedAuthority; |
| | | //import org.springframework.security.core.authority.SimpleGrantedAuthority; |
| | | //import org.springframework.security.core.userdetails.UserDetails; |
| | | //import org.springframework.util.StringUtils; |
| | | // |
| | | //import java.util.ArrayList; |
| | | //import java.util.Collection; |
| | | //import java.util.List; |
| | | // |
| | | //@Data |
| | | //public class SecurityUser implements UserDetails { |
| | | // |
| | | // //当前登录用户 |
| | | // private transient User currentUserInfo; |
| | | // |
| | | // //当前权限 |
| | | // private List<String> permissionValueList; |
| | | // |
| | | // public SecurityUser() { |
| | | // } |
| | | // |
| | | // public SecurityUser(User user) { |
| | | // if (user != null) { |
| | | // this.currentUserInfo = user; |
| | | // } |
| | | // } |
| | | // |
| | | // @Override |
| | | // public Collection<? extends GrantedAuthority> getAuthorities() { |
| | | // Collection<GrantedAuthority> authorities = new ArrayList<>(); |
| | | // for(String permissionValue : permissionValueList) { |
| | | // if(StringUtils.isEmpty(permissionValue)) continue; |
| | | // SimpleGrantedAuthority authority = new SimpleGrantedAuthority(permissionValue); |
| | | // authorities.add(authority); |
| | | // } |
| | | // |
| | | // return authorities; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public String getPassword() { |
| | | // return currentUserInfo.getPassword(); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public String getUsername() { |
| | | // return currentUserInfo.getUsername(); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public boolean isAccountNonExpired() { |
| | | // return true; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public boolean isAccountNonLocked() { |
| | | // return true; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public boolean isCredentialsNonExpired() { |
| | | // return true; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public boolean isEnabled() { |
| | | // return true; |
| | | // } |
| | | //} |
| | | // |
New file |
| | |
| | | //package com.mes.entity; |
| | | // |
| | | //import io.swagger.annotations.ApiModel; |
| | | //import io.swagger.annotations.ApiModelProperty; |
| | | //import lombok.Data; |
| | | // |
| | | //import java.io.Serializable; |
| | | // |
| | | //@Data |
| | | //@ApiModel(description = "用户实体类") |
| | | //public class User implements Serializable { |
| | | // |
| | | // private static final long serialVersionUID = 1L; |
| | | // |
| | | // @ApiModelProperty(value = "微信openid") |
| | | // private String username; |
| | | // |
| | | // @ApiModelProperty(value = "密码") |
| | | // private String password; |
| | | // |
| | | // @ApiModelProperty(value = "昵称") |
| | | // private String nickName; |
| | | // |
| | | // @ApiModelProperty(value = "用户头像") |
| | | // private String salt; |
| | | // |
| | | // @ApiModelProperty(value = "用户签名") |
| | | // private String token; |
| | | // |
| | | //} |
| | | // |
New file |
| | |
| | | //package com.mes.filter; |
| | | // |
| | | //import com.mes.security.TokenManager; |
| | | //import org.springframework.data.redis.core.RedisTemplate; |
| | | //import org.springframework.security.authentication.AuthenticationManager; |
| | | //import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| | | //import org.springframework.security.core.GrantedAuthority; |
| | | //import org.springframework.security.core.authority.SimpleGrantedAuthority; |
| | | //import org.springframework.security.core.context.SecurityContextHolder; |
| | | //import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; |
| | | // |
| | | //import javax.servlet.FilterChain; |
| | | //import javax.servlet.ServletException; |
| | | //import javax.servlet.http.HttpServletRequest; |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | //import java.io.IOException; |
| | | //import java.util.ArrayList; |
| | | //import java.util.Collection; |
| | | //import java.util.List; |
| | | // |
| | | //public class TokenAuthFilter extends BasicAuthenticationFilter { |
| | | // |
| | | // private TokenManager tokenManager; |
| | | // private RedisTemplate redisTemplate; |
| | | // public TokenAuthFilter(AuthenticationManager authenticationManager,TokenManager tokenManager,RedisTemplate redisTemplate) { |
| | | // super(authenticationManager); |
| | | // this.tokenManager = tokenManager; |
| | | // this.redisTemplate = redisTemplate; |
| | | // } |
| | | // |
| | | // @Override |
| | | // protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { |
| | | // //获取当前认证成功用户权限信息 |
| | | // UsernamePasswordAuthenticationToken authRequest = getAuthentication(request); |
| | | // //判断如果有权限信息,放到权限上下文中 |
| | | // if(authRequest != null) { |
| | | // SecurityContextHolder.getContext().setAuthentication(authRequest); |
| | | // } |
| | | // chain.doFilter(request,response); |
| | | // } |
| | | // |
| | | // private UsernamePasswordAuthenticationToken getAuthentication(HttpServletRequest request) { |
| | | // //从header获取token |
| | | // String token = request.getHeader("token"); |
| | | // if(token != null) { |
| | | // //从token获取用户名 |
| | | // String username = tokenManager.getUserInfoFromToken(token); |
| | | // //从redis获取对应权限列表 |
| | | // List<String> permissionValueList = (List<String>)redisTemplate.opsForValue().get(username); |
| | | // Collection<GrantedAuthority> authority = new ArrayList<>(); |
| | | // for(String permissionValue : permissionValueList) { |
| | | // SimpleGrantedAuthority auth = new SimpleGrantedAuthority(permissionValue); |
| | | // authority.add(auth); |
| | | // } |
| | | // return new UsernamePasswordAuthenticationToken(username,token,authority); |
| | | // } |
| | | // return null; |
| | | // } |
| | | // |
| | | //} |
New file |
| | |
| | | //package com.mes.filter; |
| | | // |
| | | //import com.fasterxml.jackson.databind.ObjectMapper; |
| | | //import com.mes.utils.Result; |
| | | //import com.mes.entity.SecurityUser; |
| | | //import com.mes.entity.User; |
| | | //import com.mes.security.TokenManager; |
| | | //import com.mes.utils.ResponseUtil; |
| | | //import org.springframework.data.redis.core.RedisTemplate; |
| | | //import org.springframework.security.authentication.AuthenticationManager; |
| | | //import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| | | //import org.springframework.security.core.Authentication; |
| | | //import org.springframework.security.core.AuthenticationException; |
| | | //import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; |
| | | //import org.springframework.security.web.util.matcher.AntPathRequestMatcher; |
| | | // |
| | | //import javax.servlet.FilterChain; |
| | | //import javax.servlet.ServletException; |
| | | //import javax.servlet.http.HttpServletRequest; |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | //import java.io.IOException; |
| | | //import java.util.ArrayList; |
| | | // |
| | | //public class TokenLoginFilter extends UsernamePasswordAuthenticationFilter { |
| | | // |
| | | // private TokenManager tokenManager; |
| | | // private RedisTemplate redisTemplate; |
| | | // private AuthenticationManager authenticationManager; |
| | | // |
| | | // public TokenLoginFilter(AuthenticationManager authenticationManager, TokenManager tokenManager, RedisTemplate redisTemplate) { |
| | | // this.authenticationManager = authenticationManager; |
| | | // this.tokenManager = tokenManager; |
| | | // this.redisTemplate = redisTemplate; |
| | | // this.setPostOnly(false); |
| | | // this.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher("/admin/acl/login","POST")); |
| | | // } |
| | | // |
| | | // //1 获取表单提交用户名和密码 |
| | | // @Override |
| | | // public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) |
| | | // throws AuthenticationException { |
| | | // //获取表单提交数据 |
| | | // try { |
| | | // User user = new ObjectMapper().readValue(request.getInputStream(), User.class); |
| | | // return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(user.getUsername(),user.getPassword(), |
| | | // new ArrayList<>())); |
| | | // } catch (IOException e) { |
| | | // e.printStackTrace(); |
| | | // throw new RuntimeException(); |
| | | // } |
| | | // } |
| | | // |
| | | // //2 认证成功调用的方法 |
| | | // @Override |
| | | // protected void successfulAuthentication(HttpServletRequest request, |
| | | // HttpServletResponse response, FilterChain chain, Authentication authResult) |
| | | // throws IOException, ServletException { |
| | | // //认证成功,得到认证成功之后用户信息 |
| | | // SecurityUser user = (SecurityUser)authResult.getPrincipal(); |
| | | // //根据用户名生成token |
| | | // String token = tokenManager.createToken(user.getCurrentUserInfo().getUsername()); |
| | | // //把用户名称和用户权限列表放到redis |
| | | // redisTemplate.opsForValue().set(user.getCurrentUserInfo().getUsername(),user.getPermissionValueList()); |
| | | // //返回token |
| | | // ResponseUtil.out(response, Result.success(token)); |
| | | // } |
| | | // |
| | | // //3 认证失败调用的方法 |
| | | // @Override |
| | | // protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) |
| | | // throws IOException, ServletException { |
| | | // ResponseUtil.out(response, Result.error()); |
| | | // } |
| | | //} |
| | |
| | | package com.mes.menu.controller; |
| | | |
| | | import com.mes.entity.request.GeneralRequest; |
| | | |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.menu.service.SysMenuService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 菜单表 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Api(description = "菜单管理") |
| | | @ApiModel("获取菜单信息") |
| | | @RestController |
| | | @RequestMapping("/sys/menu") |
| | | @RequestMapping("/menu/sysMenu") |
| | | public class SysMenuController { |
| | | |
| | | @Autowired |
| | | private SysMenuService sysMenuService; |
| | | |
| | | @ApiOperation("新增菜单") |
| | | @PostMapping("/save") |
| | | // @PreAuthorize("hasAuthority('sys:menu:save')") |
| | | public Result save(@Validated @RequestBody SysMenu sysMenu) { |
| | | return Result.success(sysMenuService.save(sysMenu)); |
| | | } |
| | | |
| | | @ApiOperation("修改菜单信息") |
| | | @PostMapping("/updateMenu") |
| | | // @PreAuthorize("hasAuthority('sys:menu:update')") |
| | | public Result updateMenu(@Validated @RequestBody SysMenu sysMenu) { |
| | | sysMenuService.updateMenu(sysMenu); |
| | | return Result.success(sysMenu); |
| | | } |
| | | SysMenuService sysMenuService; |
| | | |
| | | @ApiOperation("获取用户有权限的所有菜单") |
| | | @GetMapping("/getMenuTree") |
| | | public Result<List<SysMenu>> getMenuTree(GeneralRequest request) { |
| | | return Result.success(sysMenuService.getMenuTree(request)); |
| | | } |
| | | |
| | | @ApiOperation("获取用户的权限") |
| | | @GetMapping("/getAuthorityInfo") |
| | | public Result<List<String>> getAuthorityInfo() { |
| | | return Result.success(sysMenuService.getAuthorityInfo()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("用户当前用户的菜单和权限信息") |
| | | @GetMapping("/nav") |
| | | public Result<Map<Object, Object>> nav() { |
| | | return Result.success(sysMenuService.nav()); |
| | | } |
| | | |
| | | @ApiOperation("删除菜单") |
| | | @PostMapping("/deleteMenu") |
| | | // @PreAuthorize("hasAuthority('sys:menu:delete')") |
| | | public Result<String> deleteMenu(Long menuId) { |
| | | return Result.success(sysMenuService.deleteMenu(menuId)); |
| | | } |
| | | |
| | | @ApiOperation("批量删除菜单") |
| | | @PostMapping("/batchDeleteMenu") |
| | | // @PreAuthorize("hasAuthority('sys:menu:delete')") |
| | | public Result<String> batchDeleteMenu(@RequestBody List<Long> menuIds) { |
| | | return Result.success(sysMenuService.batchDeleteMenu(menuIds)); |
| | | @GetMapping("/list") |
| | | public Result<List<SysMenu>> getMenuTree() { |
| | | return Result.success(sysMenuService.getMenuTree()); |
| | | } |
| | | |
| | | } |
| | |
| | | * 自增id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 父id |
| | | */ |
| | | private Long parentId; |
| | | private Integer parentId; |
| | | |
| | | /** |
| | | * 模块名称 |
| | |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 权限 |
| | | */ |
| | | private String perms; |
| | | |
| | | /** |
| | | * 子菜单 |
| | |
| | | package com.mes.menu.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | public interface SysMenuMapper extends MPJBaseMapper<SysMenu> { |
| | | public interface SysMenuMapper extends BaseMapper<SysMenu> { |
| | | |
| | | List<String> selectPermsByUserId(long parseLong); |
| | | } |
| | |
| | | package com.mes.menu.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.menu.entity.SysMenu; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SysMenuService extends IService<SysMenu> { |
| | | |
| | | /** |
| | | * 更新菜单信息 |
| | | * |
| | | * @param menu |
| | | * @return |
| | | */ |
| | | SysMenu updateMenu(SysMenu menu); |
| | | |
| | | /** |
| | | * 获取用户有权限的菜单树 |
| | | * |
| | | * @return |
| | | */ |
| | | List<SysMenu> getMenuTree(GeneralRequest request); |
| | | |
| | | /** |
| | | * 获取用户的权限 |
| | | * |
| | | * @return |
| | | */ |
| | | List<String> getAuthorityInfo(); |
| | | |
| | | |
| | | /** |
| | | * 获取用户菜单及权限信息 |
| | | * |
| | | * @return |
| | | */ |
| | | Map<Object, Object> nav(); |
| | | |
| | | /** |
| | | * 删除菜单信息 |
| | | * |
| | | * @param menuId |
| | | * @return |
| | | */ |
| | | String deleteMenu(Long menuId); |
| | | |
| | | /** |
| | | * 批量删除菜单信息 |
| | | * |
| | | * @param menuIds |
| | | * @return |
| | | */ |
| | | String batchDeleteMenu(List<Long> menuIds); |
| | | |
| | | List<SysMenu> getMenuTree(); |
| | | } |
| | |
| | | package com.mes.menu.service.impl; |
| | | |
| | | import cn.hutool.core.map.MapUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.utils.UserInfoUtils; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.menu.service.SysMenuService; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | import com.mes.role.service.SysRoleMenuService; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import com.mes.userinfo.mapper.SysUserRoleMapper; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Slf4j |
| | | public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService { |
| | | |
| | | @Autowired |
| | | SysUserService sysUserService; |
| | | |
| | | @Autowired |
| | | SysUserRoleMapper sysUserRoleMapper; |
| | | |
| | | @Autowired |
| | | SysRoleMenuService sysRoleMenuService; |
| | | |
| | | @Override |
| | | public SysMenu updateMenu(SysMenu menu) { |
| | | baseMapper.updateById(menu); |
| | | // 清除所有与该菜单相关的权限缓存 |
| | | sysUserService.clearUserAuthorityInfoByMenuId(menu.getId()); |
| | | return menu; |
| | | } |
| | | |
| | | @Override |
| | | public List<SysMenu> getMenuTree(GeneralRequest request) { |
| | | //todo:需要先获取用户的角色,角色下的菜单权限,拿到菜单id获取所有菜单 |
| | | SysUser user = UserInfoUtils.get(); |
| | | MPJLambdaWrapper<SysUserRole> wrapper = new MPJLambdaWrapper<>(); |
| | | |
| | | wrapper.selectAll(SysMenu.class).distinct() |
| | | .leftJoin(SysUser.class, SysUser::getId, SysUserRole::getUserId) |
| | | .leftJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysUserRole::getRoleId) |
| | | .leftJoin(SysMenu.class, SysMenu::getId, SysRoleMenu::getMenuId) |
| | | .eq(SysUser::getId, user.getId()) |
| | | .like(StringUtils.isNotBlank(request.getKey()), SysMenu::getMenuName, request.getKey()); |
| | | |
| | | List<SysMenu> menuList = sysUserRoleMapper.selectJoinList(SysMenu.class, wrapper); |
| | | public List<SysMenu> getMenuTree() { |
| | | List<SysMenu> menuList = this.baseMapper.selectList(null); |
| | | return create(menuList); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getAuthorityInfo() { |
| | | SysUser user = UserInfoUtils.get(); |
| | | log.info("获取用户信息,用户名为{}", user); |
| | | // 获取权限信息 |
| | | // ROLE_admin,ROLE_normal,sys:user:list,.... |
| | | return sysUserService.getUserAuthorityInfo(user.getId()); |
| | | } |
| | | |
| | | @Override |
| | | public Map<Object, Object> nav() { |
| | | List<SysMenu> menuTree = getMenuTree(new GeneralRequest()); |
| | | List<String> authorityInfo = getAuthorityInfo(); |
| | | return MapUtil.builder().put("authoritys", authorityInfo) |
| | | .put("tree", menuTree).map(); |
| | | } |
| | | |
| | | @Override |
| | | public String deleteMenu(Long menuId) { |
| | | int count = this.count(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId, menuId)); |
| | | if (count > 0) { |
| | | return "无法删除,请先删除子菜单"; |
| | | } |
| | | |
| | | // 清除所有与该菜单相关的权限缓存 |
| | | sysUserService.clearUserAuthorityInfoByMenuId(menuId); |
| | | |
| | | this.removeById(menuId); |
| | | |
| | | // 同步删除中间关联表 |
| | | sysRoleMenuService.remove(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId, menuId)); |
| | | return "删除成功"; |
| | | } |
| | | |
| | | @Override |
| | | public String batchDeleteMenu(List<Long> menuIds) { |
| | | menuIds.stream().forEach(e -> deleteMenu(e)); |
| | | return "批量删除成功"; |
| | | } |
| | | |
| | | |
| | |
| | | private List<SysMenu> getChildren(SysMenu menu, List<SysMenu> menus) { |
| | | List<SysMenu> res = menus.stream() |
| | | .filter(item -> item.getParentId().equals(menu.getId())) |
| | | .collect(Collectors.toList()); |
| | | .map(item -> { |
| | | item.setChildren(getChildren(item, menus)); |
| | | return item; |
| | | }).collect(Collectors.toList()); |
| | | log.info("菜单树:{}", JSONUtil.toJsonStr(res)); |
| | | return res; |
| | | } |
| | |
| | | package com.mes.role.controller; |
| | | |
| | | |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.role.entity.SysRole; |
| | | import com.mes.role.entity.vo.SysRoleVO; |
| | | import com.mes.role.service.SysRoleService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 角色表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Api(description = "角色管理") |
| | | @RestController |
| | | @RequestMapping("/sys/role") |
| | | @RequestMapping("/role/sys-role") |
| | | public class SysRoleController { |
| | | |
| | | @Autowired |
| | | private SysRoleService sysRoleService; |
| | | } |
| | | |
| | | @ApiOperation("新增角色及角色下的权限信息") |
| | | @PostMapping("/saveRole") |
| | | // @PreAuthorize("hasAuthority('sys:role:save')") |
| | | public Result<SysRole> saveRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | return Result.success(sysRoleService.saveRole(sysRoleVO)); |
| | | } |
| | | |
| | | @ApiOperation("编辑角色及角色下的权限信息") |
| | | @PostMapping("/updateRole") |
| | | // @PreAuthorize("hasAuthority('sys:role:save')") |
| | | public Result<String> updateRole(@Validated @RequestBody SysRoleVO sysRoleVO) { |
| | | return Result.success(sysRoleService.updateRole(sysRoleVO)); |
| | | } |
| | | |
| | | @ApiOperation("查询角色及角色下的权限信息") |
| | | @PostMapping("/queryRole") |
| | | // @PreAuthorize("hasAuthority('sys:role:save')") |
| | | public Result<List<SysRoleVO>> queryRole(@Validated @RequestBody GeneralRequest request) { |
| | | return Result.success(sysRoleService.queryRole(request)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("删除角色及角色下的权限信息") |
| | | @PostMapping("/delete") |
| | | // @PreAuthorize("hasAuthority('sys:role:delete')") |
| | | @Transactional |
| | | public Result<String> deleteRole(@RequestBody List<Long> ids) { |
| | | return Result.success(sysRoleService.deleteRole(ids)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/role/sys-role-menu") |
| | | public class SysRoleMenuController { |
| | | |
| | | } |
| | | |
| | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @TableId(type = IdType.NONE) |
| | | @TableId(value = "role_id", type = IdType.AUTO) |
| | | private Long roleId; |
| | | |
| | | /** |
| | |
| | | package com.mes.role.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.role.entity.SysRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | public interface SysRoleMapper extends MPJBaseMapper<SysRole> { |
| | | public interface SysRoleMapper extends BaseMapper<SysRole> { |
| | | |
| | | } |
| | |
| | | package com.mes.role.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.role.entity.SysRole; |
| | | import com.mes.role.entity.vo.SysRoleVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SysRoleService extends IService<SysRole> { |
| | | |
| | | /** |
| | | * 创建角色信息 |
| | | * |
| | | * @param sysRoleVO |
| | | * @return |
| | | */ |
| | | SysRole saveRole(SysRoleVO sysRoleVO); |
| | | |
| | | /** |
| | | * 修改角色信息及权限 |
| | | * |
| | | * @param sysRoleVO |
| | | * @return |
| | | */ |
| | | String updateRole(SysRoleVO sysRoleVO); |
| | | |
| | | /** |
| | | * 按照角色名查询角色信息 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | List<SysRoleVO> queryRole(GeneralRequest request); |
| | | |
| | | /** |
| | | * 查询角色及角色下的权限信息 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | String deleteRole(List<Long> ids); |
| | | } |
| | |
| | | package com.mes.role.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.role.entity.SysRole; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | import com.mes.role.entity.vo.SysRoleVO; |
| | | import com.mes.role.mapper.SysRoleMapper; |
| | | import com.mes.role.service.SysRoleMenuService; |
| | | import com.mes.role.service.SysRoleService; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import com.mes.userinfo.service.SysUserRoleService; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService { |
| | | |
| | | @Autowired |
| | | SysRoleMenuService sysRoleMenuService; |
| | | |
| | | @Autowired |
| | | SysUserService sysUserService; |
| | | |
| | | @Autowired |
| | | SysUserRoleService sysUserRoleService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public SysRole saveRole(SysRoleVO sysRoleVO) { |
| | | log.info("保存角色信息,生成对应的角色id"); |
| | | SysRole sysRole = new SysRole(); |
| | | BeanUtils.copyProperties(sysRoleVO, sysRole); |
| | | this.save(sysRole); |
| | | //保存角色权限信息 |
| | | saveRoleMenu(sysRole.getId(), sysRoleVO.getMenuList()); |
| | | return sysRole; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String updateRole(SysRoleVO sysRoleVO) { |
| | | log.info("保存角色信息,生成对应的角色id"); |
| | | SysRole sysRole = new SysRole(); |
| | | BeanUtils.copyProperties(sysRoleVO, sysRole); |
| | | this.updateById(sysRole); |
| | | //保存角色权限信息 |
| | | return saveRoleMenu(sysRole.getId(), sysRoleVO.getMenuList()); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysRoleVO> queryRole(GeneralRequest request) { |
| | | MPJLambdaWrapper<SysRole> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(SysRole.class) |
| | | .selectCollection(SysMenu.class, SysRoleVO::getMenuList) |
| | | .leftJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysRole::getId) |
| | | .leftJoin(SysMenu.class, SysMenu::getId, SysRoleMenu::getMenuId) |
| | | .like(StringUtils.hasText(request.getKey()), SysRole::getName, request.getKey()); |
| | | return baseMapper.selectJoinList(SysRoleVO.class, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String deleteRole(List<Long> ids) { |
| | | log.info("删除角色信息"); |
| | | this.removeByIds(ids); |
| | | |
| | | log.info("删除中间表信息"); |
| | | sysUserRoleService.remove(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getRoleId, ids)); |
| | | sysRoleMenuService.remove(new LambdaQueryWrapper<SysRoleMenu>().in(SysRoleMenu::getRoleId, ids)); |
| | | |
| | | log.info("清空缓存中的权限信息"); |
| | | ids.stream().forEach(id -> sysUserService.clearUserAuthorityInfoByRoleId(id)); |
| | | return "success"; |
| | | } |
| | | |
| | | /** |
| | | * 保存角色权限信息 |
| | | * |
| | | * @param roleId |
| | | * @param menuList |
| | | * @return |
| | | */ |
| | | private String saveRoleMenu(Long roleId, List<SysMenu> menuList) { |
| | | log.info("配置角色菜单关心"); |
| | | List<SysRoleMenu> roleMenuList = menuList.stream().map(menu -> { |
| | | SysRoleMenu roleMenu = new SysRoleMenu(); |
| | | roleMenu.setRoleId(roleId); |
| | | roleMenu.setMenuId(menu.getId()); |
| | | return roleMenu; |
| | | }).collect(Collectors.toList()); |
| | | log.info("清空角色权限表中该角色信息"); |
| | | |
| | | |
| | | // 先删除原来的记录,再保存新的 |
| | | sysRoleMenuService.remove(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, roleId)); |
| | | sysRoleMenuService.saveBatch(roleMenuList); |
| | | |
| | | // 删除缓存 |
| | | sysUserService.clearUserAuthorityInfoByRoleId(roleId); |
| | | return "success"; |
| | | } |
| | | } |
New file |
| | |
| | | //package com.mes.security; |
| | | // |
| | | //import com.mes.utils.MD5; |
| | | //import org.springframework.security.crypto.password.PasswordEncoder; |
| | | //import org.springframework.stereotype.Component; |
| | | // |
| | | //@Component |
| | | //public class DefaultPasswordEncoder implements PasswordEncoder { |
| | | // |
| | | // public DefaultPasswordEncoder() { |
| | | // this(-1); |
| | | // } |
| | | // public DefaultPasswordEncoder(int strength) { |
| | | // } |
| | | // //进行MD5加密 |
| | | // @Override |
| | | // public String encode(CharSequence charSequence) { |
| | | // return MD5.encrypt(charSequence.toString()); |
| | | // } |
| | | // //进行密码比对 |
| | | // @Override |
| | | // public boolean matches(CharSequence charSequence, String encodedPassword) { |
| | | // return encodedPassword.equals(MD5.encrypt(charSequence.toString())); |
| | | // } |
| | | //} |
New file |
| | |
| | | //package com.mes.security; |
| | | // |
| | | //import com.mes.utils.Result; |
| | | //import com.mes.utils.ResponseUtil; |
| | | //import org.springframework.data.redis.core.RedisTemplate; |
| | | //import org.springframework.security.core.Authentication; |
| | | //import org.springframework.security.web.authentication.logout.LogoutHandler; |
| | | // |
| | | //import javax.servlet.http.HttpServletRequest; |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | // |
| | | ////退出处理器 |
| | | //public class TokenLogoutHandler implements LogoutHandler { |
| | | // private TokenManager tokenManager; |
| | | // private RedisTemplate redisTemplate; |
| | | // |
| | | // public TokenLogoutHandler(TokenManager tokenManager,RedisTemplate redisTemplate) { |
| | | // this.tokenManager = tokenManager; |
| | | // this.redisTemplate = redisTemplate; |
| | | // } |
| | | // @Override |
| | | // public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { |
| | | // //1 从header里面获取token |
| | | // //2 token不为空,移除token,从redis删除token |
| | | // String token = request.getHeader("token"); |
| | | // if(token != null) { |
| | | // //移除 |
| | | // tokenManager.removeToken(token); |
| | | // //从token获取用户名 |
| | | // String username = tokenManager.getUserInfoFromToken(token); |
| | | // redisTemplate.delete(username); |
| | | // } |
| | | // ResponseUtil.out(response, Result.success()); |
| | | // } |
| | | //} |
New file |
| | |
| | | //package com.mes.security; |
| | | // |
| | | //import io.jsonwebtoken.CompressionCodecs; |
| | | //import io.jsonwebtoken.Jwts; |
| | | //import io.jsonwebtoken.SignatureAlgorithm; |
| | | //import org.springframework.stereotype.Component; |
| | | // |
| | | //import java.util.Date; |
| | | // |
| | | //@Component |
| | | //public class TokenManager { |
| | | // //token有效时长 |
| | | // private long tokenEcpiration = 24*60*60*1000; |
| | | // //编码秘钥 |
| | | // private String tokenSignKey = "123456"; |
| | | // //1 使用jwt根据用户名生成token |
| | | // public String createToken(String username) { |
| | | // String token = Jwts.builder().setSubject(username) |
| | | // .setExpiration(new Date(System.currentTimeMillis()+tokenEcpiration)) |
| | | // .signWith(SignatureAlgorithm.HS512, tokenSignKey).compressWith(CompressionCodecs.GZIP).compact(); |
| | | // return token; |
| | | // } |
| | | // //2 根据token字符串得到用户信息 |
| | | // public String getUserInfoFromToken(String token) { |
| | | // String userinfo = Jwts.parser().setSigningKey(tokenSignKey).parseClaimsJws(token).getBody().getSubject(); |
| | | // return userinfo; |
| | | // } |
| | | // //3 删除token |
| | | // public void removeToken(String token) { } |
| | | //} |
New file |
| | |
| | | //package com.mes.security; |
| | | // |
| | | //import com.mes.utils.Result; |
| | | //import com.mes.utils.ResponseUtil; |
| | | //import org.springframework.security.core.AuthenticationException; |
| | | //import org.springframework.security.web.AuthenticationEntryPoint; |
| | | // |
| | | //import javax.servlet.ServletException; |
| | | //import javax.servlet.http.HttpServletRequest; |
| | | //import javax.servlet.http.HttpServletResponse; |
| | | //import java.io.IOException; |
| | | // |
| | | //public class UnauthEntryPoint implements AuthenticationEntryPoint { |
| | | // @Override |
| | | // public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException { |
| | | // ResponseUtil.out(httpServletResponse, Result.error()); |
| | | // } |
| | | //} |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.entity.vo.SysUserVO; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Api(description = "用户管理") |
| | | @RestController |
| | | @RequestMapping("/sys/user") |
| | | @RequestMapping("/userinfo") |
| | | public class SysUserController { |
| | | |
| | | @Autowired |
| | | private SysUserService sysUserService; |
| | | |
| | | @ApiOperation("用户登录") |
| | | @PostMapping("/login") |
| | | public Result<Map<String, String>> login(@RequestBody SysUser user) { |
| | | return Result.success(sysUserService.login(user)); |
| | | public Result login(@RequestBody SysUser user) { |
| | | return sysUserService.login(user); |
| | | } |
| | | |
| | | @ApiOperation("退出登录") |
| | | @PostMapping("/logout") |
| | | // @PreAuthorize("hasRole('ROLE_admin')") |
| | | @PreAuthorize("hasAuthority('xt:yh')") |
| | | public Result<String> logout() { |
| | | return Result.success(sysUserService.logout()); |
| | | @GetMapping("/hello") |
| | | public Result hello() { |
| | | return Result.success("eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlZjMyMjQ4NDcyODE0ZWFlYWRlOTBkYmZjYWFlZmNmZSIsInN1YiI6IjEiLCJpc3MiOiJzZyIsImlhdCI6MTcxMjkwMjI0NCwiZXhwIjoxNzEyOTA1ODQ0fQ.DlJkhkiwjZSqprdLzKaTB3yuyxGukerKeF0FbJK_6HY"); |
| | | } |
| | | |
| | | @ApiOperation("新增用户信息") |
| | | @PostMapping("/saveUser") |
| | | // @PreAuthorize("hasAuthority('sys:user:save')") |
| | | public Result<String> saveUser(@Validated @RequestBody SysUserVO sysUser) { |
| | | return Result.success(sysUserService.saveUser(sysUser)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("更新用户信息") |
| | | @PostMapping("/updateUser") |
| | | // @PreAuthorize("hasAuthority('sys:user:update')") |
| | | public Result<SysUserVO> updateUser(@Validated @RequestBody SysUserVO sysUser) { |
| | | return Result.success(sysUserService.updateUser(sysUser)); |
| | | } |
| | | |
| | | @ApiOperation("重置密码") |
| | | @PostMapping("/resetPassword") |
| | | // @PreAuthorize("hasAuthority('sys:user:resetPassword')") |
| | | public Result resetPassword(String userId) { |
| | | return Result.success(sysUserService.resetPassword(Long.parseLong(userId))); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取用户列表") |
| | | @PostMapping("/listByUserName") |
| | | // @PreAuthorize("hasAuthority('sys:user:list')") |
| | | public Result<List<SysUserVO>> listByUserName(@RequestBody GeneralRequest request) { |
| | | return Result.success(sysUserService.listByUserName(request)); |
| | | } |
| | | |
| | | @ApiOperation("删除用户信息") |
| | | @PostMapping("/deleteUser") |
| | | // @PreAuthorize("hasAuthority('sys:user:delete')") |
| | | public Result<String> deleteUser(@RequestBody List<Long> ids) { |
| | | return Result.success(sysUserService.deleteUser(ids)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/sys-user-role") |
| | | public class SysUserRoleController { |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @AllArgsConstructor |
| | | public class SysUserRole implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableId(type = IdType.NONE) |
| | | @TableId(value = "user_id", type = IdType.AUTO) |
| | | private Long userId; |
| | | |
| | | /** |
| | |
| | | package com.mes.userinfo.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | public interface SysUserMapper extends MPJBaseMapper<SysUser> { |
| | | public interface SysUserMapper extends BaseMapper<SysUser> { |
| | | |
| | | } |
| | |
| | | package com.mes.userinfo.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Mapper |
| | | public interface SysUserRoleMapper extends MPJBaseMapper<SysUserRole> { |
| | | public interface SysUserRoleMapper extends BaseMapper<SysUserRole> { |
| | | |
| | | } |
| | |
| | | package com.mes.userinfo.service; |
| | | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | |
| | | /** |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysUserRoleService extends MPJBaseService<SysUserRole> { |
| | | |
| | | public interface SysUserRoleService extends IService<SysUserRole> { |
| | | |
| | | } |
| | |
| | | package com.mes.userinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.entity.vo.SysUserVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.mes.utils.Result; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SysUserService extends IService<SysUser> { |
| | | |
| | | /** |
| | | * 用户登录 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | | Map<String, String> login(SysUser user); |
| | | Result login(SysUser user); |
| | | |
| | | /** |
| | | * 退出登录 |
| | | * |
| | | * @return |
| | | */ |
| | | String logout(); |
| | | |
| | | /** |
| | | * 新增用户信息 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | | String saveUser(SysUserVO user); |
| | | |
| | | /** |
| | | * 更新用户信息 |
| | | * |
| | | * @param sysUser |
| | | * @return |
| | | */ |
| | | SysUserVO updateUser(SysUserVO sysUser); |
| | | |
| | | /** |
| | | * 重置密码 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | String resetPassword(Long userId); |
| | | |
| | | /** |
| | | * 按名称获取用户信息 |
| | | * |
| | | * @param userName |
| | | * @return |
| | | */ |
| | | SysUser queryByUserName(String userName); |
| | | |
| | | /** |
| | | * 按关键字获取用户信息列表 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | List<SysUserVO> listByUserName(GeneralRequest request); |
| | | |
| | | /** |
| | | * 删除用户信息 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | String deleteUser(List<Long> ids); |
| | | |
| | | /** |
| | | * 获取用户角色权限信息 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<String> getUserAuthorityInfo(Long userId); |
| | | |
| | | /** |
| | | * 清空用户权限信息通过用户信息 |
| | | */ |
| | | void clearUserAuthorityInfo(String userName); |
| | | |
| | | /** |
| | | * 清空用户权限信息通过角色id |
| | | * |
| | | * @param roleId |
| | | */ |
| | | void clearUserAuthorityInfoByRoleId(Long roleId); |
| | | |
| | | /** |
| | | * 清空用户权限信息通过菜单id |
| | | * |
| | | * @param menuId |
| | | */ |
| | | void clearUserAuthorityInfoByMenuId(Long menuId); |
| | | Result logout(); |
| | | } |
| | |
| | | package com.mes.userinfo.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.common.utils.JwtUtil; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.common.utils.UserInfoUtils; |
| | | import com.mes.entity.request.GeneralRequest; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.role.entity.SysRole; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | import com.mes.role.service.SysRoleService; |
| | | import com.mes.userinfo.entity.LoginUser; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import com.mes.userinfo.entity.vo.SysUserVO; |
| | | import com.mes.userinfo.mapper.SysUserMapper; |
| | | import com.mes.userinfo.service.SysUserRoleService; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.authentication.AuthenticationManager; |
| | | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | import org.springframework.security.core.userdetails.UserDetailsService; |
| | | import org.springframework.security.core.userdetails.UsernameNotFoundException; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService, UserDetailsService { |
| | | |
| | | @Autowired |
| | | private AuthenticationManager authenticationManager; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | private SysMenuMapper sysMenuMapper; |
| | | |
| | | @Resource |
| | | private SysUserRoleService sysUserRoleService; |
| | | |
| | | @Resource |
| | | private SysRoleService sysRoleService; |
| | | |
| | | @Resource |
| | | BCryptPasswordEncoder passwordEncoder; |
| | | |
| | | @Override |
| | | public Map<String, String> login(SysUser user) { |
| | | public Result login(SysUser user) { |
| | | UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(user.getUserName(), user.getPassword()); |
| | | Authentication authenticate = authenticationManager.authenticate(authenticationToken); |
| | | if (Objects.isNull(authenticate)) { |
| | |
| | | LoginUser loginUser = (LoginUser) authenticate.getPrincipal(); |
| | | String userId = loginUser.getUser().getId().toString(); |
| | | String jwt = JwtUtil.generateToken(userId); |
| | | |
| | | //查询权限信息 |
| | | // List<String> perms = sysMenuMapper.selectPermsByUserId(userId); |
| | | //authenticate存入redis |
| | | redisUtil.setCacheObject("login:" + userId, loginUser); |
| | | //把token响应给前端 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("token", jwt); |
| | | return map; |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @Override |
| | | public String logout() { |
| | | log.info("用户退出"); |
| | | SysUser user = UserInfoUtils.get(); |
| | | redisUtil.deleteObject("login:" + user.getId()); |
| | | return "注销成功"; |
| | | public Result logout() { |
| | | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); |
| | | LoginUser loginUser = (LoginUser) authentication.getPrincipal(); |
| | | Long userid = loginUser.getUser().getId(); |
| | | redisUtil.deleteObject("login:" + userid); |
| | | return Result.success("退出成功"); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public String saveUser(SysUserVO user) { |
| | | log.info("保存用户信息"); |
| | | // 默认密码 |
| | | String password = passwordEncoder.encode(Const.DEFULT_PASSWORD); |
| | | user.setPassword(password); |
| | | SysUser sysUser = new SysUser(); |
| | | BeanUtils.copyProperties(user, sysUser); |
| | | this.save(sysUser); |
| | | saveUserRole(user.getRoleList(), sysUser.getId()); |
| | | return "success"; |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public SysUserVO updateUser(SysUserVO user) { |
| | | log.info("更新用户信息"); |
| | | SysUser sysUser = new SysUser(); |
| | | BeanUtils.copyProperties(user, sysUser); |
| | | this.updateById(sysUser); |
| | | log.info("删除用户角色信息"); |
| | | List<Long> roleIds = user.getRoleList().stream().map(SysRole::getId).collect(Collectors.toList()); |
| | | sysUserRoleService.remove(new LambdaQueryWrapper<SysUserRole>() |
| | | .eq(SysUserRole::getUserId, sysUser.getId()).in(CollectionUtil.isNotEmpty(roleIds), SysUserRole::getRoleId, roleIds)); |
| | | log.info("保存用户角色信息"); |
| | | saveUserRole(user.getRoleList(), sysUser.getId()); |
| | | return user; |
| | | } |
| | | |
| | | @Override |
| | | public String resetPassword(Long userId) { |
| | | log.info("重置密码为{}", Const.DEFULT_PASSWORD); |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setId(userId); |
| | | String password = passwordEncoder.encode(Const.DEFULT_PASSWORD); |
| | | sysUser.setPassword(password); |
| | | this.updateById(sysUser); |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public SysUser queryByUserName(String userName) { |
| | | return baseMapper.selectOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, userName)); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUserVO> listByUserName(GeneralRequest request) { |
| | | MPJLambdaWrapper<SysUser> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(SysUser.class) |
| | | .selectCollection(SysRole.class, SysUserVO::getRoleList) |
| | | .leftJoin(SysUserRole.class, SysUserRole::getUserId, SysUser::getId) |
| | | .leftJoin(SysRole.class, SysRole::getId, SysUserRole::getRoleId) |
| | | .like(StringUtils.hasText(request.getKey()), SysUser::getUserName, request.getKey()); |
| | | return baseMapper.selectJoinList(SysUserVO.class, wrapper); |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public String deleteUser(List<Long> ids) { |
| | | this.removeByIds(ids); |
| | | sysUserRoleService.remove(new QueryWrapper<SysUserRole>().in("user_id", ids)); |
| | | return "success"; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getUserAuthorityInfo(Long userId) { |
| | | SysUser sysUser = baseMapper.selectById(userId); |
| | | |
| | | // ROLE_admin,ROLE_normal,sys:user:list,.... |
| | | String authority = ""; |
| | | if (redisUtil.hasKey("GrantedAuthority:" + sysUser.getUserName())) { |
| | | authority = redisUtil.getCacheObject("GrantedAuthority:" + sysUser.getUserName()); |
| | | |
| | | } else { |
| | | // 获取角色编码 |
| | | List<SysRole> roles = sysRoleService.list(new QueryWrapper<SysRole>() |
| | | .inSql("id", "select role_id from sys_user_role where user_id = " + userId)); |
| | | |
| | | if (roles.size() > 0) { |
| | | String roleCodes = roles.stream().map(r -> "ROLE_" + r.getRoleKey()).collect(Collectors.joining(",")); |
| | | authority = roleCodes.concat(","); |
| | | } |
| | | |
| | | // 获取菜单操作编码 |
| | | List<String> perms = sysMenuMapper.selectPermsByUserId(userId); |
| | | if (perms.size() > 0) { |
| | | String menuPerms = String.join(",", perms); |
| | | authority = authority.concat(menuPerms); |
| | | } |
| | | |
| | | redisUtil.setCacheObject("GrantedAuthority:" + sysUser.getUserName(), authority, 60 * 60, TimeUnit.SECONDS); |
| | | } |
| | | return Arrays.stream(authority.split(",")).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public void clearUserAuthorityInfo(String userName) { |
| | | redisUtil.deleteObject("GrantedAuthority:" + userName); |
| | | } |
| | | |
| | | @Override |
| | | public void clearUserAuthorityInfoByRoleId(Long roleId) { |
| | | List<SysUser> sysUsers = this.list(new QueryWrapper<SysUser>() |
| | | .inSql("id", "select user_id from sys_user_role where role_id = " + roleId)); |
| | | |
| | | sysUsers.forEach(u -> { |
| | | this.clearUserAuthorityInfo(u.getUserName()); |
| | | }); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void clearUserAuthorityInfoByMenuId(Long menuId) { |
| | | MPJLambdaWrapper<SysUserRole> wrapper = new MPJLambdaWrapper<SysUserRole>().selectAll(SysUser.class).distinct() |
| | | .leftJoin(SysUser.class, SysUser::getId, SysUserRole::getUserId) |
| | | .leftJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysUserRole::getRoleId) |
| | | .eq(SysRoleMenu::getMenuId, menuId); |
| | | List<SysUser> sysUsers = sysUserRoleService.selectJoinList(SysUser.class, wrapper); |
| | | sysUsers.forEach(u -> { |
| | | this.clearUserAuthorityInfo(u.getUserName()); |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 实现UserDetailsService接口,从数据库内获取用户及权限信息 |
| | | * |
| | | * @param username |
| | | * @return |
| | | * @throws UsernameNotFoundException |
| | | */ |
| | | @Override |
| | | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { |
| | | LambdaQueryWrapper<SysUser> lqw = new LambdaQueryWrapper<>(); |
| | |
| | | |
| | | return new LoginUser(user, perms); |
| | | } |
| | | |
| | | |
| | | private void saveUserRole(List<SysRole> roles, Long userId) { |
| | | log.info("保存用户角色信息"); |
| | | List<SysUserRole> userRoles = new ArrayList<>(); |
| | | if (CollectionUtils.isEmpty(roles)) { |
| | | log.info("保存用户角色信息为空,给默认普通用户角色"); |
| | | userRoles.add(new SysUserRole(userId, Const.DEFULT_ROLE)); |
| | | } else { |
| | | log.info("保存用户角色信息"); |
| | | userRoles = roles.stream().map(e -> new SysUserRole(userId, e.getId())).collect(Collectors.toList()); |
| | | } |
| | | sysUserRoleService.saveBatch(userRoles); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.56.10:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: root |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: 123456 |
New file |
| | |
| | | server: |
| | | port: 8089 |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | application: |
| | | name: security |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | |
| | | <artifactId>spring-cloud-starter-gateway</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
New file |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
New file |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 10.153.19.150:8848 |
| | |
| | | server: |
| | | port: 88 |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | application: |
| | | name: gateway |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | | server-addr: 127.0.0.1:8848 |
| | | gateway: |
| | | discovery: |
| | | locator: |
| | |
| | | <artifactId>junit</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join</artifactId>--> |
| | | <!-- <version>1.1.6</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join-boot-starter</artifactId>--> |
| | | <!-- <version>1.4.12</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join-boot-starter</artifactId>--> |
| | | <!-- <version>1.4.12</version>--> |
| | | <!-- </dependency>--> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageService; |
| | | import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.impl.TaskCacheServiceImpl; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.awt.image.ImageProducer; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Api(description = "理片笼缓存") |
| | | @Api(tags = "理片笼缓存") |
| | | @RestController |
| | | @RequestMapping("/edgStorageCage") |
| | | public class EdgStorageCageController { |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.mes.glassinfo.service.impl.GlassInfoServiceImpl; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Api(description = "玻璃信息小片") |
| | | @Api(tags = "玻璃信息小片") |
| | | @RestController |
| | | @RequestMapping("/glassInfo") |
| | | public class GlassInfoController { |
| | |
| | | |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageService; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import com.mes.utils.Result; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Api(description = "识别显示") |
| | | @Api(tags = "识别显示") |
| | | @RestController |
| | | @RequestMapping("/taskCache") |
| | | public class TaskCacheController { |
| | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | |
| | | |
| | | <artifactId>cacheVerticalGlass</artifactId> |
| | | <dependencies> |
| | | |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join</artifactId>--> |
| | | <!-- <version>1.1.6</version>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>junit</groupId> |
| | | <artifactId>junit</artifactId> |
| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | @EnableScheduling |
| | | public class CacheVerticalClassModuleApplication { |
| | | public static void main(String[] args) { |
| | | try { |
| | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(description = "理片笼信息") |
| | | @ApiModel("理片笼信息") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCage") |
| | | public class BigStorageCageController { |
| | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(description = "理片笼详情") |
| | | @ApiModel(description = "理片笼详情") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCageDetails") |
| | | public class BigStorageCageDetailsController { |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(description = "大理片笼") |
| | | @ApiModel(description = "<p> 大理片笼 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCage implements Serializable { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.Api; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(description = "大理片笼详情") |
| | | @ApiModel(description = "<p> 大理片笼详情 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageDetails implements Serializable { |
| | |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Api(description = "进片任务信息") |
| | | @ApiModel("进片任务信息") |
| | | @RestController |
| | | @RequestMapping("/big-storage-cage-feed-task") |
| | | public class BigStorageCageFeedTaskController { |
| | |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Api(description = "出片任务信息") |
| | | @ApiModel("出片任务信息") |
| | | @RestController |
| | | @RequestMapping("/big-storage-cage-out-task") |
| | | public class BigStorageCageOutTaskController { |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel(description = "<p> 进片任务 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageFeedTask implements Serializable { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 进片任务id |
| | | */ |
| | | @ApiModelProperty(value = "进片任务id", position = 2) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 目标格子 |
| | | */ |
| | | @ApiModelProperty(value = "目标格子", position = 3) |
| | | private Integer tragetSlot; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型", position = 4) |
| | | private Integer taskType; |
| | | |
| | | /** |
| | | * 进片状态 |
| | | */ |
| | | @ApiModelProperty(value = "进片状态", position = 5) |
| | | private Integer taskState; |
| | | |
| | | /** |
| | | * 线路 |
| | | */ |
| | | @ApiModelProperty(value = "线路", position = 6) |
| | | private Integer line; |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel(description = "<p> 出片任务 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageOutTask implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 出片任务id |
| | | */ |
| | | @ApiModelProperty(value = "出片任务id", position = 2) |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 开始位置 |
| | | */ |
| | | @ApiModelProperty(value = "开始位置", position = 3) |
| | | |
| | | private Integer startSlot; |
| | | |
| | | /** |
| | | * 目标位置 |
| | | */ |
| | | @ApiModelProperty(value = "目标位置", position = 4) |
| | | private Integer endSlot; |
| | | |
| | | /** |
| | | * 车次 |
| | | */ |
| | | @ApiModelProperty(value = "车次", position = 5) |
| | | private Integer trainNumber; |
| | | |
| | | /** |
| | | * 片序 |
| | | */ |
| | | @ApiModelProperty(value = "片序", position = 6) |
| | | private Integer serialNumber; |
| | | |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型", position = 7) |
| | | private Integer taskState; |
| | | |
| | | |
New file |
| | |
| | | package com.mes.component; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.mes.edgstoragetask.service.TaskCacheService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | public class PlcStorageCage extends Thread { |
| | | |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Autowired |
| | | private BigStorageCageFeedTaskService bigStorageCageFeedTaskService; |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | @Autowired |
| | | private TaskCacheService taskCacheService; |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | try { |
| | | Thread.sleep(300); |
| | | boolean bigStorageCageFullAlarm=false; |
| | | |
| | | String plcD01FeedReq = "0"; |
| | | String plcD04FeedReq = "0"; |
| | | String plcFeedGlassid = "111"; |
| | | String plcFeedReqLine="0"; |
| | | if("1".equals(plcD01FeedReq)){ |
| | | plcFeedReqLine="1"; |
| | | }else { |
| | | //plc任务发送字0 |
| | | } |
| | | if("1".equals(plcD04FeedReq)){ |
| | | plcFeedReqLine="2"; |
| | | }else { |
| | | //plc任务发送字0 |
| | | } |
| | | |
| | | if (!("0".equals(plcFeedReqLine))) { |
| | | log.info("1、Plc进片请求时"); |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | log.info("2、根据玻璃id获取玻璃信息"+glassInfo); |
| | | BigStorageCageDetails slotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (slotInfo != null) { |
| | | int taskType=taskCacheService.judgeTasktype(); |
| | | log.info("3、查询任务表判断当前任务类型为上车等到还是上车启动"+taskType); |
| | | bigStorageCageFeedTaskService.addFeedTask(slotInfo,Integer.parseInt(plcFeedReqLine),taskType); |
| | | log.info("4、添加任务到任务表"); |
| | | //plc任务发送字1 |
| | | bigStorageCageFullAlarm=false; |
| | | }else{ |
| | | //理片笼爆笼报警 |
| | | bigStorageCageFullAlarm=true; |
| | | } |
| | | }else{ |
| | | List<BigStorageCageFeedTask> bigStorageCageFeedTaskList=bigStorageCageFeedTaskService.querybigStorageCageFeedTask(1); |
| | | log.info("5、查询任务表是否有已经完成的进片任务"+bigStorageCageFeedTaskList.size()); |
| | | for (BigStorageCageFeedTask bigStorageCageFeedTask:bigStorageCageFeedTaskList |
| | | ) { |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | bigStorageCageDetails.setId(bigStorageCageFeedTask.getId()); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetailsService.updateById(bigStorageCageDetails); |
| | | log.info("6、修改理片笼详情玻璃状态"); |
| | | bigStorageCageFeedTaskService.removeById(bigStorageCageFeedTask); |
| | | log.info("7、删除已经完成的进片任务"); |
| | | } |
| | | } |
| | | |
| | | //出片请求 |
| | | String plcOutReq = "0"; |
| | | boolean result = false; |
| | | if ("1".equals(plcOutReq)) { |
| | | result=bigStorageCageService.outGlass(); |
| | | log.info("8、出片请求时调用出片接口"+result); |
| | | if (result) { |
| | | //plc任务发送字1 |
| | | } |
| | | }else{ |
| | | bigStorageCageOutTaskService.updateOutTask(); |
| | | //plc任务发送字0 |
| | | } |
| | | |
| | | //显示剩余空格子 |
| | | |
| | | //报警信息 |
| | | jsonObject.append("bigStorageCageFullAlarm", bigStorageCageFullAlarm); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel(description = "<p> 磨边任务 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class TaskCache implements Serializable { |
| | |
| | | /** |
| | | * ID编号 |
| | | */ |
| | | @ApiModelProperty(value = "ID编号", position = 2) |
| | | @TableId("ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 起始 |
| | | */ |
| | | @ApiModelProperty(value = "起始", position = 3) |
| | | private String startCell; |
| | | |
| | | /** |
| | | * 目标 |
| | | */ |
| | | @ApiModelProperty(value = "目标", position = 4) |
| | | private String endCell; |
| | | |
| | | /** |
| | | * 任务类型 1:进 2:出 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型 1:进 2:出", position = 5) |
| | | private String taskType; |
| | | |
| | | /** |
| | | * 任务状态 0 未开始 1已完成 |
| | | */ |
| | | @ApiModelProperty(value = "任务状态 0 未开始 1已完成", position = 6) |
| | | private String taskStauts; |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel(description = "<p> 钢化小片信息 </p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class TemperingGlassInfo implements Serializable { |
| | |
| | | /** |
| | | * 钢化小片信息表id |
| | | */ |
| | | @ApiModelProperty(value = "钢化小片信息表id", position = 2) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 流程卡 |
| | | */ |
| | | @ApiModelProperty(value = "流程卡", position = 3) |
| | | private String flowcardId; |
| | | |
| | | /** |
| | | * 流程卡玻璃类型 |
| | | */ |
| | | @ApiModelProperty(value = "流程卡玻璃类型", position = 4) |
| | | private Integer glassType; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | @ApiModelProperty(value = "宽", position = 5) |
| | | private Double width; |
| | | |
| | | /** |
| | | * 高 |
| | | */ |
| | | @ApiModelProperty(value = "高", position = 6) |
| | | private Double height; |
| | | |
| | | /** |
| | | * 厚度 |
| | | */ |
| | | @ApiModelProperty(value = "厚度", position = 7) |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | @ApiModelProperty(value = "膜系", position = 8) |
| | | private Integer filmsid; |
| | | |
| | | /** |
| | | * 钢化是否接受横放 |
| | | */ |
| | | @ApiModelProperty(value = "钢化是否接受横放", position = 9) |
| | | private Integer ishorizontal; |
| | | |
| | | /** |
| | | * 钢化版图id |
| | | */ |
| | | @ApiModelProperty(value = "钢化版图id", position = 10) |
| | | private Integer temperingLayoutId; |
| | | |
| | | /** |
| | | * 钢化版图片序 |
| | | */ |
| | | @ApiModelProperty(value = "钢化版图片序", position = 11) |
| | | private Integer temperingFeedSequence; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | @ApiModelProperty(value = "x坐标", position = 12) |
| | | private Integer xCoordinate; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | @ApiModelProperty(value = "y坐标", position = 13) |
| | | private Integer yCoordinate; |
| | | |
| | | /** |
| | | * 旋转角度(逆时针) |
| | | */ |
| | | @ApiModelProperty(value = "旋转角度(逆时针)", position = 14) |
| | | private Integer angle; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态", position = 15) |
| | | private Integer state; |
| | | |
| | | |
| | |
| | | //开始/暂停任务 |
| | | @Override |
| | | public boolean changeTask(String projectId, Integer state) { |
| | | //使用projectId作为条件修改state字段 |
| | | LambdaUpdateChainWrapper<Engineering> wrapper = new LambdaUpdateChainWrapper<>(this.getBaseMapper()); |
| | | wrapper.set(Engineering::getState,state); |
| | | wrapper.eq(Engineering::getEngineerId,projectId); |
| | |
| | | return Result.build(200, "", upwork); |
| | | } |
| | | |
| | | @ApiOperation("开始上片任务") |
| | | @PostMapping("/selectPriority") //调用上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | | UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | log.info("显示可上的玻璃信息:{}", work); |
| | | |
| | | } |
| | | // @ApiOperation("开始上片任务") |
| | | // @PostMapping("/selectPriority") //调用上片任务 |
| | | // @ResponseBody |
| | | // public void selectPriority() { |
| | | // UpWorkSequence work=upWorkstationService.selectPriority(); |
| | | // log.info("显示可上的玻璃信息:{}", work); |
| | | // |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public UpWorkSequence selectPriority(); |
| | | UpWorkSequence selectPriority(); |
| | | |
| | | //查询正在进行的工程 |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.mapper.UpWorkstationMapper; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | public static final String DB_100_10 = "DB_100_10"; |
| | | |
| | | //判断是否可以吸片进行任务 |
| | |
| | | |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | |
| | | public UpWorkSequence selectPriority() { |
| | | UpWorkSequence upwork= this.baseMapper.selectPriority(1); |
| | | String start = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | if(upwork!=null&&start.equals("1")){ |
| | | String start = "1";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | UpPattenUsage uplist=new UpPattenUsage(); |
| | | if(start.equals("1")){ |
| | | //发送出片任务 |
| | | //plcmes.getPlcParameter("出片信号").setValue("1"); |
| | | UpdateWrapper<UpPattenUsage> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("state",1).last("LIMIT 1"); |
| | | uplist= upPattenUsageMapper.selectOne(updateWrapper); |
| | | log.info("查询出本次出片的玻璃信息[]",uplist); |
| | | } |
| | | return upwork; |
| | | } |
| | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | test: |
| | | common: 123789 |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.common.utils.UserInfoUtils; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.menu.service.SysMenuService; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.service.OptimizeDetailService; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | |
| | | |
| | | @Resource |
| | | OptimizeDetailService optimizationDetailService; |
| | | |
| | | @Resource |
| | | SysMenuService service; |
| | | |
| | | @Test |
| | | public void test1() { |
| | | SysUser user = new SysUser(); |
| | | user.setId(1l); |
| | | UserInfoUtils.set(user); |
| | | List<SysMenu> menuTree = service.getMenuTree(null); |
| | | System.out.println("获取记录数:" + menuTree); |
| | | } |
| | | |
| | | @Test |
| | | public void test() { |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.service.impl.UpPattenUsageServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | private OptimizeProjectMapper optimizeProjectMapper; |
| | | @Autowired |
| | | private UpPattenUsageServiceImpl upPattenUsageService; |
| | | |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @Test |
| | | public void test() { |
| | | // List<OptimizeProject> list = optimizeProjectMapper.saveProject("P24032204"); |
| | |
| | | |
| | | @Test |
| | | public void testFindPa() { |
| | | List<Map> glass = upPattenUsageService.saveUpPattenUsage("P24032204"); |
| | | List<UpPattenUsage> glass = upPattenUsageService.selectSaveUpPattenUsage("P24032204"); |
| | | log.info("完整路径:{}", Arrays.asList(glass)); |
| | | } |
| | | @Test |
| | | public void textglassinfo(){ |
| | | List<GlassInfo> glass= glassInfoService.selectGlassInfo("P24032204"); |
| | | log.info("glassinfo:{}", Arrays.asList(glass)); |
| | | } |
| | | } |
| | |
| | | package com.mes.temperingglass.controller; |
| | | |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import com.mes.temperingglass.service.TemperingOverService; |
| | | import com.mes.temperingglass.service.TemperingService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/temperingGlassInfo") |
| | | |
| | | @Slf4j |
| | | // TidyUpGlassModule 钢化模块 |
| | | public class TemperingGlassInfoController { |
| | | |
| | | @Autowired |
| | | TemperingService temperingService; |
| | | |
| | | @Autowired |
| | | private TemperingOverService temperingOverService; |
| | | @Autowired |
| | | private TemperingAgoService temperingAgoService; |
| | | |
| | | @PostMapping("/SelectWaitingGlass") // 查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中 |
| | | @ResponseBody |
| | | public Result SelectWaitingGlass(@RequestParam(name = "ProcessId", required = false) String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectWaitingGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中") |
| | | @GetMapping("/selectWaitingGlass") // 查询钢化等片中的版图信息,状态为1的为已到,状态为0的为等待中 |
| | | public Result <List<TemperingGlassInfo>> selectWaitingGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectWaitingGlass(); |
| | | log.info("等待中的玻璃信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectIntoGlass") // 查询进炉中的钢化等片中的版图信息,状态全为1的为已到。 |
| | | @ResponseBody |
| | | public Result SelectIntoGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingService.SelectIntoGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("查询进炉中的钢化等片中的版图信息,状态全为1的为已到。") |
| | | @GetMapping("/selectIntoGlass") // 查询进炉中的钢化等片中的版图信息,状态全为1的为已到。 |
| | | public Result <List<TemperingGlassInfo>> selectIntoGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.selectIntoGlass(); |
| | | log.info("进炉中的玻璃版图信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @GetMapping("/SelectOutGlass") //钢化后显示出炉的版图信息 |
| | | @ResponseBody |
| | | public Result SelectOutGlass(String ProcessId) { |
| | | List<TemperingGlassInfo> glass = temperingOverService.SelectOutGlass(); |
| | | System.out.println(glass); |
| | | @ApiOperation("//钢化后显示出炉的版图信息。") |
| | | @GetMapping("/selectOutGlass") //钢化后显示出炉的版图信息 |
| | | public Result <List<TemperingGlassInfo>> selectOutGlass() { |
| | | List<TemperingGlassInfo> glass = temperingAgoService.SelectOutGlass(); |
| | | log.info("钢化出炉后的玻璃信息{}",glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | |
| | | package com.mes.temperingglass.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | |
| | | /** |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingGlassInfoMapper extends BaseMapper<TemperingGlassInfo> { |
| | | public interface TemperingGlassInfoMapper extends BaseMapper<TemperingGlassInfo>, MPJBaseMapper<TemperingGlassInfo> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface TemperingAgoService extends MPJBaseService<TemperingGlassInfo> { |
| | | |
| | | List<TemperingGlassInfo> selectWaitingGlass(); |
| | | |
| | | List<TemperingGlassInfo> selectIntoGlass(); |
| | | |
| | | List<TemperingGlassInfo> SelectOutGlass(); |
| | | } |
New file |
| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.mapper.TemperingMapper; |
| | | import com.mes.temperingglass.service.TemperingAgoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class TemperingAgoServiceImpl extends MPJBaseServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingAgoService { |
| | | @Autowired |
| | | TemperingMapper temperingMapper; |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> selectWaitingGlass() { |
| | | //获取等待进炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.inSql("flowcard_id", "select flowcard_id from tempering_glass_info GROUP BY flowcard_id,state having count(state) = 2"); |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> selectIntoGlass() { |
| | | //获取进炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wrapper = new QueryWrapper<>(); |
| | | wrapper.inSql("flowcard_id", "select flowcard_id from tempering_glass_info where state=1 GROUP BY flowcard_id,state having count(state) = 1"); |
| | | |
| | | return temperingMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> SelectOutGlass() { |
| | | //获取出炉中的玻璃信息 |
| | | QueryWrapper<TemperingGlassInfo> wapper = new QueryWrapper<>(); |
| | | wapper.eq("state", 3); |
| | | return temperingMapper.selectList(wapper); |
| | | } |
| | | } |
| | |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>sqljdbc4</artifactId> |
| | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | @Api(description = "缓存") |
| | | @Api(tags = "缓存") |
| | | @RestController |
| | | @RequestMapping("/downStorage") |
| | | public class DownStorageCageDetailsController { |
| | |
| | | @GetMapping("/selectStorageCage") |
| | | @ResponseBody |
| | | public Result selectEdgStorageCage () { |
| | | List<Map> list=downStorageCageDetailsService.getCacheInfo(); |
| | | List<Map> list=downStorageCageService.getCacheInfo(); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(description = "缓存") |
| | | @ApiModel(description = "<p> 缓存</p>") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class DownStorageCage implements Serializable { |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | public interface DownStorageCageMapper extends MPJBaseMapper<DownStorageCage> { |
| | | |
| | | } |
| | |
| | | */ |
| | | |
| | | @RestController |
| | | @Api(description = "工位") |
| | | @Api(tags = "工位") |
| | | @RequestMapping("/downWorkStation") |
| | | public class DownWorkstationController { |
| | | |
| | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @Id |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | </dependency> |
| | | |
| | | <!--开发者工具--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-devtools</artifactId>--> |
| | | <!-- <optional>true</optional>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-devtools</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |