Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
3 文件已复制
68个文件已修改
16 文件已重命名
113个文件已添加
19个文件已删除
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | spring: |
| | | datasource: |
| | | dynamic: |
| | | primary: user_info #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | export default { |
| | | serverUrl:"localhost:8080/mesModuleTools", |
| | | serverUrl2:"localhost:8081/mesModuleTools" |
| | | serverUrl: "localhost:8085", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | "dependencies": { |
| | | "@element-plus/icons-vue": "^2.1.0", |
| | | "@vue-macros/reactivity-transform": "^0.3.23", |
| | | "axios": "^1.5.1", |
| | | "axios": "^1.6.8", |
| | | "element-plus": "^2.4.0", |
| | | "moment": "^2.30.1", |
| | | "pinia": "^2.1.6", |
| | |
| | | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" |
| | | }, |
| | | "node_modules/axios": { |
| | | "version": "1.5.1", |
| | | "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", |
| | | "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", |
| | | "version": "1.6.8", |
| | | "resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.8.tgz", |
| | | "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", |
| | | "dependencies": { |
| | | "follow-redirects": "^1.15.0", |
| | | "follow-redirects": "^1.15.6", |
| | | "form-data": "^4.0.0", |
| | | "proxy-from-env": "^1.1.0" |
| | | } |
| | |
| | | } |
| | | }, |
| | | "node_modules/follow-redirects": { |
| | | "version": "1.15.3", |
| | | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", |
| | | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", |
| | | "funding": [ |
| | | { |
| | | "type": "individual", |
| | | "url": "https://github.com/sponsors/RubenVerborgh" |
| | | } |
| | | ], |
| | | "version": "1.15.6", |
| | | "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.6.tgz", |
| | | "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", |
| | | "engines": { |
| | | "node": ">=4.0" |
| | | }, |
| | |
| | | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" |
| | | }, |
| | | "axios": { |
| | | "version": "1.5.1", |
| | | "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", |
| | | "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", |
| | | "version": "1.6.8", |
| | | "resolved": "https://registry.npmmirror.com/axios/-/axios-1.6.8.tgz", |
| | | "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", |
| | | "requires": { |
| | | "follow-redirects": "^1.15.0", |
| | | "follow-redirects": "^1.15.6", |
| | | "form-data": "^4.0.0", |
| | | "proxy-from-env": "^1.1.0" |
| | | } |
| | |
| | | } |
| | | }, |
| | | "follow-redirects": { |
| | | "version": "1.15.3", |
| | | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", |
| | | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==" |
| | | "version": "1.15.6", |
| | | "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.6.tgz", |
| | | "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" |
| | | }, |
| | | "form-data": { |
| | | "version": "4.0.0", |
| | |
| | | "dependencies": { |
| | | "@element-plus/icons-vue": "^2.1.0", |
| | | "@vue-macros/reactivity-transform": "^0.3.23", |
| | | "axios": "^1.5.1", |
| | | "axios": "^1.6.8", |
| | | "element-plus": "^2.4.0", |
| | | "moment": "^2.30.1", |
| | | "pinia": "^2.1.6", |
| | |
| | | <script setup> |
| | | import { RouterLink,useRouter} from 'vue-router' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import {useRouter} from 'vue-router' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import userInfo from '@/stores/userInfo' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {onMounted, reactive, ref, watch} from "vue" |
| | | import {ref, watch} from "vue" |
| | | import deepClone from "@/utils/deepClone" |
| | | import userInfo from '@/stores/userInfo' |
| | | import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue"; |
| | | const store=userInfo() |
| | | |
| | | |
| | | const store = userInfo() |
| | | |
| | | const router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const user = userStore.user.userName |
| | | |
| | | // store.createWebSocket(); |
| | | function quit(){ |
| | | function quit() { |
| | | userStore.$patch({ |
| | | user:null |
| | | user: null |
| | | }) |
| | | router.push("/login") |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //提取模块列表 |
| | | let menuList=$ref([]) |
| | | request.get("/menu").then((res) => { |
| | | if(res.code==200){ |
| | | menuList= deepClone(res.data) |
| | | }else{ |
| | | let menuList = $ref([]) |
| | | request.get('/menu/sysMenu/list').then((res) => { |
| | | if (res.code == 200) { |
| | | menuList = deepClone(res.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | router.push('/login') |
| | | } |
| | | }) |
| | | |
| | | |
| | | //获取菜单列表 |
| | | let menuItemList=$ref([]) |
| | | request.get("/menuItem").then((res) => { |
| | | if(res.code==200){ |
| | | menuItemList= deepClone(res.data) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | // let menuItemList = $ref([]) |
| | | // request.get('/menuItem').then((res) => { |
| | | // if (res.code == 200) { |
| | | // menuItemList = deepClone(res.data) |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push('/login') |
| | | // } |
| | | // }) |
| | | |
| | | const menu = ref(null) |
| | | let indexKey = ref(null) |
| | | |
| | | function handleOpen(key) { |
| | | indexKey.value=key |
| | | indexKey.value = key |
| | | } |
| | | watch(indexKey,(newVal,oldVal) => { |
| | | if(oldVal !== newVal && oldVal !== null){ |
| | | menu.value.close(oldVal) |
| | | } |
| | | |
| | | watch(indexKey, (newVal, oldVal) => { |
| | | if (oldVal !== newVal && oldVal !== null) { |
| | | menu.value.close(oldVal) |
| | | } |
| | | }, |
| | | {deep:true} |
| | | ) |
| | | |
| | | |
| | | router.beforeEach((to, from) => { |
| | | //return false |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | let openFlag = $ref(null) |
| | | //原始菜单打开 |
| | | const openMenu = (menuID) => { |
| | |
| | | openFlag = menuID |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div id="all"> |
| | | <el-container> |
| | |
| | | <div style="height: 100%;width: 100%;display: flex;background-color: #fff;"> |
| | | <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%"> |
| | | <h3 style="margin: 1rem ;font-weight: bold;width: 20vw;"> 欢迎{{ user }}使用北玻MES系统!</h3> |
| | | <span style="height: 70%;width: 78vw;margin-top: 1rem;" > |
| | | <el-button class="sys-quit" @click="quit" round> |
| | | <el-icon size="large"><SwitchButton size=""/></el-icon> |
| | | <span style="height: 70%;width: 78vw;margin-top: 1rem;"> |
| | | <el-button class="sys-quit" @click="quit" round> |
| | | <el-icon size="large"><SwitchButton size=""/></el-icon> |
| | | </el-button> |
| | | </span> |
| | | </div> |
| | | </el-header> |
| | | <div id="line"></div> |
| | | <el-container > |
| | | <el-aside width="160px" style="height: 99%; background-color: #fff;" > |
| | | <div class="menu" > |
| | | <div v-for="items in menuList"> |
| | | <div class='menu_title' @click="openMenu(items.id)" > |
| | | <!-- <span class='indicator' >⌵</span> --> |
| | | <!-- <span class='indicator' >≡</span> --> |
| | | <!-- <img src="../assets/9.png" alt="" style="max-width: 50%;max-height: 50%;"> --> |
| | | <span>☰</span> |
| | | {{items.menuName}} |
| | | </div> |
| | | <ul class='enter-x-left' v-show="openFlag==items.id"> |
| | | |
| | | <li v-for="menuItem in menuItemList" |
| | | v-show="items.id==menuItem.menuID" |
| | | style="margin-bottom: 2px" |
| | | > |
| | | <router-link |
| | | :to="{path:menuItem.url}"> |
| | | {{ menuItem.itemName}} |
| | | </router-link> |
| | | |
| | | </li> |
| | | </ul> |
| | | <el-container> |
| | | <el-aside width="160px" |
| | | style="height: 99%; background-color: #fff;"> |
| | | <div class="menu"> |
| | | <div v-for="items in menuList"> |
| | | <div class='menu_title' |
| | | @click="openMenu(items.id)"> |
| | | <!-- <span class='indicator' >⌵</span> --> |
| | | <!-- <span class='indicator' >≡</span> --> |
| | | <!-- <img src="../assets/9.png" alt="" style="max-width: 50%;max-height: 50%;"> --> |
| | | <span>☰</span> |
| | | {{ items.menuName }} |
| | | </div> |
| | | <ul class='enter-x-left' |
| | | v-show="openFlag==items.id"> |
| | | |
| | | <li v-for="menuItem in items.children" |
| | | style="margin-bottom:2px"> |
| | | <router-link :to="{path:menuItem.url}"> |
| | | {{ menuItem.menuName }} |
| | | </router-link> |
| | | |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </el-aside> |
| | | |
| | | |
| | | <el-main> |
| | | <div id="main"> |
| | | <router-view></router-view> |
| | | </div> |
| | | </el-main> |
| | | |
| | | |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <style scoped> |
| | | #all{ |
| | | background-color: #eee; |
| | |
| | | height: 100vh; |
| | | width: 99vw |
| | | } |
| | | |
| | | |
| | | *{ |
| | | padding: 0; |
| | | margin: 0; |
| | |
| | | } |
| | | :deep(span){ |
| | | margin-right: 0; |
| | | |
| | | |
| | | } |
| | | .el-collapse{ |
| | | font-size: 16px; |
| | |
| | | background-color: #fff; |
| | | } |
| | | /*------------*/ |
| | | |
| | | |
| | | /* .menu div div{ |
| | | |
| | | |
| | | width: 138px; |
| | | height: 35px; |
| | | line-height: 35px; |
| | |
| | | /* background-color:#5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | /* } */ |
| | | |
| | | |
| | | .menu { |
| | | width: 138px; |
| | | height: 33px; |
| | | line-height: 25px; |
| | | |
| | | |
| | | color: #000000; |
| | | font-size: 16px; |
| | | padding-left: 15px; |
| | | padding-right: 2px; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | ul { |
| | | height: auto; |
| | | margin: 1px auto; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | ul li { |
| | | |
| | | |
| | | height: 28px; |
| | | line-height: 30px; |
| | | /* background: rgb(128, 128, 128); */ |
| | |
| | | text-align: left; |
| | | /* border-radius:8px; */ |
| | | /* outline: none; */ |
| | | |
| | | |
| | | /* background: #5CADFE; */ |
| | | /* box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); */ |
| | | } |
| | | |
| | | |
| | | ul li:hover { |
| | | /* background:#5CADFE ; */ |
| | | color: #ffffff; |
| | | } |
| | | |
| | | |
| | | ul li a { |
| | | text-decoration: none; |
| | | color: #000000; |
| | | font-size: 14px; |
| | | } |
| | | ul li a:hover { |
| | | |
| | | |
| | | color: #1087ff; |
| | | } |
| | | |
| | | |
| | | .item_divider { |
| | | width: 118px; |
| | | height: 0px; |
| | |
| | | font-size: 14px; |
| | | text-decoration: none; |
| | | } |
| | | |
| | | |
| | | .menu_title { |
| | | width: 140px; |
| | | height: 45px; |
| | |
| | | position: relative; |
| | | font-weight: bold; |
| | | overflow: hidden; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | .menu_title:hover { |
| | | /* background: #dedede; */ |
| | | color: #3b9af9; |
| | | } |
| | | |
| | | |
| | | .indicator { |
| | | display: block; |
| | | width: 40px; |
| | |
| | | transition: all 0.3s ease; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /* 动画效果 */ |
| | | .enter-x-left { |
| | | z-index: 9; |
| | |
| | | transform: translateX(0); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </style> |
| | |
| | | baseURL: `http://${config.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! |
| | | timeout: 5000 |
| | | }) |
| | | |
| | | |
| | | // |
| | | |
| | | |
| | | // request 拦截器 |
| | | // 可以自请求发送前对请求做一些处理 |
| | | // 比如统一加token,对请求参数统一加密 |
| | |
| | | }, error => { |
| | | return Promise.reject(error) |
| | | }); |
| | | |
| | | |
| | | // response 拦截器 |
| | | // 可以在接口响应后统一处理结果 |
| | | request.interceptors.response.use( |
| | |
| | | return Promise.reject(error) |
| | | } |
| | | ) |
| | | |
| | | |
| | | export default request |
| | | |
| | | |
| | | |
| | | export default request |
| | |
| | | |
| | | <script> |
| | | import Swal from 'sweetalert2' |
| | | import request from "@/utils/request"; |
| | | |
| | | |
| | | request.get("/TidyUpGlassModule/CurrentCutTerritory").then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }); |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | <script lang="ts" setup> |
| | | import {onMounted, onUnmounted, reactive, ref} from "vue" |
| | | import {useRouter,useRoute } from 'vue-router' |
| | | import {onMounted, onUnmounted, reactive, ref} from 'vue' |
| | | import {useRoute, useRouter} from 'vue-router' |
| | | import type {FormInstance, FormRules} from 'element-plus' |
| | | import { ElMessage } from "element-plus"; |
| | | import { Lock,Avatar } from '@element-plus/icons-vue' |
| | | import {ElMessage} from 'element-plus' |
| | | import request from '@/utils/request' |
| | | import userInfo from '@/stores/userInfo' |
| | | |
| | | |
| | | const store=userInfo() |
| | | let ruleFormRef = ref<FormInstance>() |
| | | const store = userInfo() |
| | | let ruleFormRef = ref<FormInstance>() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | |
| | | const userForm = reactive({ |
| | | userId: '', |
| | | pass: '' |
| | | userName: '', |
| | | password: '', |
| | | }) |
| | | |
| | | if (typeof(route.query.id) != "undefined"){ |
| | | if (typeof route.query.id != 'undefined') { |
| | | userForm.userId = <string>route.query.id |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | const rules = reactive<FormRules<typeof userForm>>({ |
| | | userId: [{ validator: validateUser, trigger: 'blur' }], |
| | | pass: [{ validator: validatePass, trigger: 'blur' }] |
| | | userId: [{validator: validateUser, trigger: 'blur'}], |
| | | pass: [{validator: validatePass, trigger: 'blur'}], |
| | | }) |
| | | |
| | | //登陆方法 |
| | |
| | | if (!formEl) return |
| | | formEl.validate((valid) => { |
| | | if (valid) { |
| | | loginLoadings.value=true |
| | | request.post('/user/login', |
| | | userForm).then((res) => { |
| | | if(res['code']==200){ |
| | | store.$patch({user:res.data}) |
| | | loginLoadings.value = true |
| | | request |
| | | .post('/userinfo/login', userForm) |
| | | .then((res) => { |
| | | if (res['code'] == 200) { |
| | | store.$patch({user: res.data}) |
| | | console.log(res.data) |
| | | |
| | | router.push('/main') |
| | | ElMessage.success(`登录成功`) |
| | | } else { |
| | | ElMessage.error(res['msg']) |
| | | loginLoadings.value=false |
| | | return false |
| | | } |
| | | }).catch(error => { |
| | | ElMessage.error("服务器连接失败") |
| | | loginLoadings.value=false |
| | | return false |
| | | }) |
| | | router.push('/main') |
| | | ElMessage.success(`登录成功`) |
| | | } else { |
| | | ElMessage.error(res['msg']) |
| | | loginLoadings.value = false |
| | | return false |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | ElMessage.error('服务器连接失败') |
| | | loginLoadings.value = false |
| | | return false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function register() { |
| | | |
| | | router.push({ |
| | | path:'/register', |
| | | path: '/register', |
| | | }) |
| | | } |
| | | |
| | | let loginLoadings= ref(false) |
| | | let registerLoadings= ref(false) |
| | | let loginLoadings = ref(false) |
| | | let registerLoadings = ref(false) |
| | | |
| | | const keyDown = (e) => { |
| | | // 回车则执行登录方法 enter键的ASCII是13 |
| | |
| | | submitForm(ruleFormRef.value) |
| | | } |
| | | } |
| | | onMounted(()=>{ |
| | | onMounted(() => { |
| | | window.addEventListener('keydown', keyDown) |
| | | }) |
| | | onUnmounted(() => { |
| | | window.removeEventListener('keydown', keyDown) |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="mainDiv" > |
| | | <div class="mainDiv"> |
| | | <div id="main-login"> |
| | | <!-- <img |
| | | style="width: 100%; height: 99vh" |
| | | src="../../src/assets/background.jpg" |
| | | /> --> |
| | | <div> |
| | | <div style="position: absolute; left: 8vw; top: 6vw; "> |
| | | <img src="../../src/assets/3.png"> |
| | | </div> |
| | | <div style="position: absolute; left: 15vw; top: 22vw; font-size: 55px;color: rgba(29, 33, 41, 1);"> |
| | | 北玻MES系统 |
| | | </div> |
| | | </div> |
| | | <div id="div-login"> |
| | | <el-form |
| | | @submit.native.prevent |
| | | ref="ruleFormRef" |
| | | :model="userForm" |
| | | status-icon |
| | | :rules="rules" |
| | | > |
| | | <div id="center"> |
| | | <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">账号</div> |
| | | <el-form-item prop="userId"> |
| | | <el-input |
| | | style="width: 340px;" |
| | | v-model="userForm.userId" |
| | | type="text" |
| | | autocomplete="off" |
| | | :prefix-icon="Avatar" |
| | | placeholder="请输入账号" |
| | | /> |
| | | </el-form-item> |
| | | <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">密码</div> |
| | | <el-form-item prop="pass"> |
| | | <el-input |
| | | style="width: 340px;" |
| | | v-model="userForm.pass" |
| | | type="password" |
| | | autocomplete="off" |
| | | :prefix-icon="Lock" |
| | | show-password |
| | | placeholder="请输入密码" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item id="submitForm"> |
| | | <el-button |
| | | :loading="loginLoadings" |
| | | type="primary" |
| | | native-type="submit" |
| | | @click="submitForm(ruleFormRef)" |
| | | @keyup.enter.native="keyDown(e)" |
| | | plain |
| | | >登录 |
| | | </el-button> |
| | | <el-button |
| | | :loading="registerLoadings" |
| | | type="primary" |
| | | @click="register" |
| | | plain |
| | | >注册 |
| | | </el-button> |
| | | |
| | | </el-form-item> |
| | | <div style="position: absolute; left: 8vw; top: 6vw; "> |
| | | <img src="../../src/assets/3.png"> |
| | | </div> |
| | | <div style="position: absolute; left: 15vw; top: 22vw; font-size: 55px;color: rgba(29, 33, 41, 1);"> |
| | | 北玻MES系统 |
| | | </div> |
| | | </div> |
| | | <div id="div-login"> |
| | | <el-form @submit.native.prevent |
| | | ref="ruleFormRef" |
| | | :model="userForm" |
| | | status-icon |
| | | :rules="rules"> |
| | | <div id="center"> |
| | | <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">账号</div> |
| | | <el-form-item prop="userId"> |
| | | <el-input style="width: 340px;" |
| | | v-model="userForm.userName" |
| | | type="text" |
| | | autocomplete="off" |
| | | :prefix-icon="Avatar" |
| | | placeholder="请输入账号"/> |
| | | </el-form-item> |
| | | <div style="color: rgba(78, 89, 105, 1);margin-bottom: 10px;">密码</div> |
| | | <el-form-item prop="pass"> |
| | | <el-input style="width: 340px;" |
| | | v-model="userForm.password" |
| | | type="password" |
| | | autocomplete="off" |
| | | :prefix-icon="Lock" |
| | | show-password |
| | | placeholder="请输入密码"/> |
| | | </el-form-item> |
| | | <el-form-item id="submitForm"> |
| | | <el-button :loading="loginLoadings" |
| | | type="primary" |
| | | native-type="submit" |
| | | @click="submitForm(ruleFormRef)" |
| | | @keyup.enter.native="keyDown(e)" |
| | | plain>登录 |
| | | </el-button> |
| | | <el-button :loading="registerLoadings" |
| | | type="primary" |
| | | @click="register" |
| | | plain>注册 |
| | | </el-button> |
| | | |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .mainDiv{ |
| | | .mainDiv { |
| | | overflow: hidden; |
| | | min-width: 718px; |
| | | background-image: url("../../src/assets/background.jpg"); |
| | | |
| | | background-image: url('../../src/assets/background.jpg'); |
| | | } |
| | | #main-login{ |
| | | |
| | | #main-login { |
| | | margin: 150px auto 0 auto; |
| | | height: 70vh; |
| | | width: 80vw; |
| | | } |
| | | #img-div{ |
| | | |
| | | #img-div { |
| | | width: 55%; |
| | | height: 100%; |
| | | display: flex; |
| | |
| | | align-items: center; |
| | | float: left; |
| | | } |
| | | #img-pic{ |
| | | |
| | | #img-pic { |
| | | max-height: 90%; |
| | | max-width: 100%; |
| | | } |
| | | #div-login{ |
| | | |
| | | #div-login { |
| | | margin-top: 5%; |
| | | /* margin-top: 20%; */ |
| | | /* margin-left: 650px; */ |
| | |
| | | height: 60%; |
| | | min-width: 318px; |
| | | border-radius: 4px; |
| | | box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); |
| | | box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0), 0 6px 5px 0 rgba(0, 0, 0, 0.19); |
| | | } |
| | | #center{ |
| | | |
| | | #center { |
| | | margin-top: -30px; |
| | | } |
| | | .el-form{ |
| | | |
| | | .el-form { |
| | | width: 60%; |
| | | margin: 20% auto auto; |
| | | } |
| | | |
| | | #submitForm { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | margin-top: 2rem; |
| | | } |
| | | :deep(.el-form-item__content){ |
| | | flex: unset |
| | | |
| | | :deep(.el-form-item__content) { |
| | | flex: unset; |
| | | } |
| | | </style> |
| | |
| | | const router = useRouter() |
| | | import type { TableColumnCtx } from 'element-plus' |
| | | |
| | | import { ref } from 'vue' |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | const dialogFormVisible = ref(false) |
| | | const add = ref(false) |
| | | const adda = ref(false) |
| | | // const value = ref('') |
| | | import request from "@/utils/request" |
| | | |
| | | const value = ref('') |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | const tableData = ref([]) |
| | | // request.post(`/LoadGlass/list`).then((res) => { |
| | | // if (res.code == 200) { |
| | | // console.log(res.data); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }); |
| | | // request.get("/LoadGlass/list").then((res) => { |
| | | // if (res.code == 200) { |
| | | // console.log(res.data); |
| | | // tableData.value = res |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }); |
| | | onMounted(() => { |
| | | request |
| | | .get("/LoadGlass/list") |
| | | .then((res: any) => { |
| | | tableData.value = res.data; |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | onMounted(() => { |
| | | request |
| | | .post("/LoadGlass/selectPriority") |
| | | .then((res: any) => { |
| | | tableData.value = res.data; |
| | | }) |
| | | .catch((err: any) => {}); |
| | | }); |
| | | interface User { |
| | | id: string |
| | | name: string |
| | |
| | | label: 'P202561456', |
| | | }, |
| | | ] |
| | | const tableData: User[] = [ |
| | | // const tableData: User[] = [ |
| | | |
| | | { |
| | | id: 'P202561456', |
| | | long: '1005', |
| | | wide: '183.6', |
| | | thick: '1991', |
| | | }, |
| | | { |
| | | id: 'P202561456', |
| | | long: '105', |
| | | wide: '183', |
| | | thick: '191', |
| | | } |
| | | ] |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '1005', |
| | | // wide: '183.6', |
| | | // thick: '1991', |
| | | // }, |
| | | // { |
| | | // id: 'P202561456', |
| | | // long: '105', |
| | | // wide: '183', |
| | | // thick: '191', |
| | | // } |
| | | // ] |
| | | const tableDataa = [ |
| | | { |
| | | long: '1005', |
| | |
| | | :data="tableData" |
| | | :span-method="objectSpanMethod" |
| | | > |
| | | <el-table-column prop="id" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="long" label="原片宽" align="center"/> |
| | | <el-table-column prop="wide" label="原片长" align="center"/> |
| | | <el-table-column prop="thick" label="膜系" align="center"/> |
| | | <el-table-column prop="thick" label="数量" align="center"/> |
| | | <el-table-column prop="wide" label="厚度" align="center"/> |
| | | <el-table-column prop="workstationId" label="工程号" width="200" align="center"/> |
| | | <el-table-column prop="patternWidth" label="原片宽" align="center"/> |
| | | <el-table-column prop="patternHeigth" label="原片长" align="center"/> |
| | | <el-table-column prop="filmsId" label="膜系" align="center"/> |
| | | <el-table-column prop="number" label="数量" align="center"/> |
| | | <el-table-column prop="patternThickness" label="厚度" align="center"/> |
| | | <el-table-column |
| | | align="center" |
| | | label="状态" |
| | | min-width="80" |
| | | prop="enableState" |
| | | > |
| | | <el-tag type="success">就绪</el-tag> |
| | | <!-- <el-tag type="danger">未就绪</el-tag> --> |
| | | <!-- <el-tag type="danger" v-if="row.enableState==2">未就绪</el-tag> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select |
| | | v-model="value" |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | v-model="form.workstationId" |
| | | clearable |
| | | placeholder="请选择工程" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-select clearable filterable size="mini" v-model="form.fvId" |
| | | style="margin-right: 50px;width: 200px" placeholder="请选择果蔬种类"> |
| | | <el-option v-for="item in billall" |
| | | :key="item.id" |
| | | :label="item.fruitVagetableCate" |
| | | :value="item.id"></el-option> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | |
| | | } |
| | | #parent{ |
| | | position: relative; |
| | | width: 1500px; |
| | | } |
| | | #overlay{ |
| | | position: absolute; |
| | |
| | | CanvaDraws(id,Datas,StoveCount) { |
| | | //var StoveCount=43;//炉数 |
| | | var ArrangementMode='linefeed';//排布方式:linefeed(换行) /Wholeline 整行 |
| | | var RowMaxCount=4;//每行最多显示的图数 |
| | | var RowMaxCount=3;//每行最多显示的图数 |
| | | var StoveWidth=3000; //实际炉宽 2850 |
| | | var StoveLength=5500;//实际炉长 5000 |
| | | var StoveColor='#CFC8C5';//炉子背景颜色 |
| | |
| | | //获取流程卡号 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await unloadrequest.get('/api/downWorkstation/getflowCardId'); |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getflowCardId'); |
| | | console.log(response) |
| | | if (response.code === 200) { |
| | | flowCardOptions.value = response.data.map(item => ({ flowcard_id: item.flowcard_id })); |
| | |
| | | //确认 |
| | | const handleConfirm = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/downWorkstation/updateFlowCardId', { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/updateFlowCardId', { |
| | | workstationId: workstationId.value, |
| | | flowCardId: flowCardId.value |
| | | }); |
| | |
| | | //清除内容 |
| | | const handleclear = async () => { |
| | | try { |
| | | const response = await unloadrequest.post('/api/downWorkstation/clear', { |
| | | const response = await unloadrequest.post('/api/unLoadGlass/clear', { |
| | | workstationId: workstationId.value, |
| | | }); |
| | | |
| | |
| | | const fetchTableData = async () => { |
| | | try { |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | const response = await unloadrequest.get('/api/downWorkstation/getone'); |
| | | const response = await unloadrequest.get('/api/unLoadGlass/getone'); |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | |
| | | |
| | | initWebSocket(); |
| | | onMounted(fetchTableData); |
| | | //setInterval(fetchTableData, 2000) |
| | | setInterval(fetchTableData, 2000) |
| | | |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | |
| | | import { fileURLToPath, URL } from 'node:url' |
| | | import {fileURLToPath, URL} from 'node:url' |
| | | |
| | | import { defineConfig } from 'vite' |
| | | import {defineConfig} from 'vite' |
| | | import vue from '@vitejs/plugin-vue' |
| | | import ReactivityTransform from '@vue-macros/reactivity-transform/vite' |
| | | |
| | |
| | | '/api': { |
| | | target: 'http://localhost:8080/mesModuleTools', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/mesModuleTools'), |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), |
| | | }, |
| | | '/api2': { |
| | | target: 'http://localhost:8081/mesModuleTools', |
| | | target: 'http://localhost:8085/mesModuleTools', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api2': '', |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownGlassInfo;
|
| | |
| | | @Component
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
|
| | | //根据工位ID和设备ID更新工位状态
|
| | | @Update("UPDATE down_workstation SET work_state = #{workState} " +
|
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> |
| | |
| | | <packaging>pom</packaging> |
| | | <modules> |
| | | <module>servicebase</module> |
| | | <!-- <module>springsecurity</module>--> |
| | | <module>springsecurity</module> |
| | | </modules> |
| | | <properties> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <version>3.2.0</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>dynamic-datasource-spring-boot-starter</artifactId> |
| | | <version>3.2.0</version> |
| | | </dependency> |
| | | |
| | |
| | | <groupId>org.apache.velocity</groupId> |
| | | <artifactId>velocity-engine-core</artifactId> |
| | | <version>2.0</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | |
| | | <version>1.1.8</version> |
| | | </dependency> |
| | | |
| | | <!-- 数据库文档--> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>1.2.60</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>3.17</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>3.17</version> |
| | | </dependency> |
| | | |
| | | <!-- 数据库设计文档生成工具--> |
| | | <dependency> |
| | | <groupId>cn.smallbun.screw</groupId> |
| | | <artifactId>screw-core</artifactId> |
| | | <version>1.0.5</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <!-- 2.0~2.2 Knife4j 2.0.0 ~ 2.0.6--> |
| | | <!-- <dependency>--> |
| | |
| | | <version>2.7.0</version> |
| | | </dependency> |
| | | |
| | | |
| | | <!--jwt 项目生成token--> |
| | | <dependency> |
| | | <groupId>com.auth0</groupId> |
| | | <artifactId>java-jwt</artifactId> |
| | | <version>3.10.3</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.assertj</groupId> |
| | | <artifactId>assertj-core</artifactId> |
| | | </dependency> |
| | | <!--hutool java验证方法类--> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.session</groupId> |
| | | <artifactId>spring-session-data-redis</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-security</artifactId> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>1.2.33</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | |
| | |
| | | |
| | | import com.mes.common.interceptor.JwtInterceptor; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Configuration |
| | | |
| | | public class InterceptorConfig implements WebMvcConfigurer { |
| | | @Resource |
| | | private JwtInterceptor jwtInterceptor; |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(jwtInterceptor) |
| | |
| | | .excludePathPatterns("/user/login", |
| | | "/user/register", |
| | | "/swagger-resources/**" |
| | | ,"/webjars/**" |
| | | ,"/v2/**" |
| | | ,"/swagger-ui.html/**" |
| | | ,"/swagger-ui.html#/**"); |
| | | , "/webjars/**" |
| | | , "/v2/**" |
| | | , "/swagger-ui.html/**" |
| | | , "/swagger-ui.html#/**"); |
| | | } |
| | | |
| | | @Override |
| | | public void addCorsMappings(CorsRegistry registry) { |
| | | // 设置允许跨域的路径 |
| | | registry.addMapping("/**") |
| | | // 设置允许跨域请求的域名 |
| | | // .allowedOriginPatterns("*") |
| | | // 是否允许cookie |
| | | .allowCredentials(true) |
| | | // 设置允许的请求方式 |
| | | .allowedMethods("GET", "POST", "DELETE", "PUT") |
| | | // 设置允许的header属性 |
| | | .allowedHeaders("*") |
| | | // 跨域允许时间 |
| | | .maxAge(3600); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.mes.common.config; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | | import org.mybatis.spring.SqlSessionFactoryBean; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.sql.DataSource; |
| | | |
| | | |
| | | /** |
| | |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | |
| | | @Resource |
| | | private DataSourceProperties dataSourceProperties; |
| | | |
| | | |
| | | @Bean(name = "dataSource") |
| | | public DataSource dataSource() { |
| | | |
| | | DruidDataSource dataSource = new DruidDataSource(); |
| | | dataSource.setUrl(dataSourceProperties.getUrl()); |
| | | dataSource.setDriverClassName(dataSourceProperties.getDriverClassName()); |
| | | dataSource.setUsername(dataSourceProperties.getUsername()); |
| | | dataSource.setPassword(dataSourceProperties.getPassword()); |
| | | |
| | | return dataSource; |
| | | |
| | | } |
| | | |
| | | public SqlSessionFactory sqlSessionFactory() throws Exception { |
| | | SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); |
| | | sqlSessionFactoryBean.setDataSource(dataSource()); |
| | | return sqlSessionFactoryBean.getObject(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.device; |
| | | |
| | | import com.mes.tools.InitUtil; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PLCAutoMes extends Thread { |
| | | |
| | | // 用于存储应用程序的配置信息 |
| | | private Configuration config; |
| | | private static InitUtil initUtil; |
| | | |
| | | |
| | | // 单例实例 |
| | | private static PLCAutoMes instance; |
| | | private static String PlcMes = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); |
| | | private static String PlcRead = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); |
| | | private static String Plcframe = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); |
| | | // private static String PlcParameter = PLCAutomaticParameterSettingReview2.class |
| | | // .getResource("/JsonFile/PlcParameter.json").getPath(); |
| | | // private static String PlcSign = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcSign.json") |
| | | // .getPath(); |
| | | // private static String PlcState = PLCAutomaticParameterSettingReview2.class.getResource("/JsonFile/PlcState.json") |
| | | // .getPath(); |
| | | private static String PlcAlarm = PLCAutoMes.class.getResource("/JsonFile/PlcAlarm.json").getPath(); |
| | | // private static String PlcTest = PLCAutoMes.class.getResource("/JsonFile/PlcTest.json").getPath(); |
| | | |
| | | // 调用initword方法 |
| | | |
| | | // |
| | | // public static PlcBitObject plcPlcAlarm = initUtil.initbit(PlcAlarm); |
| | | public static PlcParameterObject PlcMesObject = initUtil.initword(PlcMes); |
| | | public static PlcParameterObject PlcReadObject = initUtil.initword(PlcRead); |
| | | public static PlcParameterObject PlcframeObject = initUtil.initword(Plcframe); |
| | | |
| | | // 私有构造函数 |
| | | public PLCAutoMes() throws IOException { |
| | | |
| | | initUtil = new InitUtil(); |
| | | } |
| | | |
| | | // 获取单例实例 |
| | | public static synchronized PLCAutoMes getInstance() throws IOException { |
| | | if (instance == null) { |
| | | instance = new PLCAutoMes(); |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | Thread.sleep(100); |
| | | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // System.out.println(jsonFilePath); |
| | | |
| | | // readAndUpdateWordValues(PlcReadObject); |
| | | InitUtil.readAndUpdateWordValues(PlcMesObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | // readAndUpdateWordValues(PlcframeObject); |
| | | |
| | | // readAndUpdateWordValues(plcStateObject); |
| | | // int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); |
| | | // System.out.println(index); |
| | | // PlcMesObject.getPlcParameter("AddStart").getAddress(index); |
| | | // System.out.println(PlcMesObject.getPlcParameter("AddStart").getAddress(index)); |
| | | List<String> addresses = new ArrayList<>(); |
| | | addresses.add("FeedID"); |
| | | addresses.add("AddStart"); |
| | | // System.out.println(addresses); |
| | | // System.out.println(PlcMesObject.getPlcParameterValues(addresses)); |
| | | List<String> addresses2 = new ArrayList<>(); |
| | | addresses2.add("FeedID"); |
| | | addresses2.add("FeedCarStatus"); |
| | | |
| | | // System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); |
| | | |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-detail") |
| | | public class OptimizeDetailController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-layout") |
| | | public class OptimizeLayoutController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-project") |
| | | public class OptimizeProjectController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String processId; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | private Integer layer; |
| | | |
| | | /** |
| | | * 序号 |
| | | */ |
| | | private Integer orderSort; |
| | | |
| | | /** |
| | | * 版图id |
| | | */ |
| | | private Integer stockId; |
| | | |
| | | /** |
| | | * 版图序 |
| | | */ |
| | | private Integer stockNumber; |
| | | |
| | | /** |
| | | * 图号 |
| | | */ |
| | | private Integer graphNo; |
| | | |
| | | /** |
| | | * 小片编号 |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 小片ID |
| | | */ |
| | | private Integer polysId; |
| | | |
| | | /** |
| | | * 小片宽(加磨量) |
| | | */ |
| | | private Double pWidth; |
| | | |
| | | /** |
| | | * 小片高(加磨量) |
| | | */ |
| | | private Double pHeight; |
| | | |
| | | /** |
| | | * 小片宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 小片高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Double xAxis; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Double yAxis; |
| | | |
| | | /** |
| | | * 钢化版图编号(架号) |
| | | */ |
| | | private Integer heatLayoutId; |
| | | |
| | | private String h; |
| | | |
| | | private String g; |
| | | |
| | | private String r; |
| | | |
| | | private String glassPoint; |
| | | |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeLayout implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 原片ID |
| | | */ |
| | | private Integer stockId; |
| | | |
| | | private Double width; |
| | | |
| | | private Double height; |
| | | |
| | | private Double realwidth; |
| | | |
| | | private Double realheight; |
| | | |
| | | /** |
| | | * 切裁率 |
| | | */ |
| | | private String usageRate; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | private String stockCode; |
| | | |
| | | /** |
| | | * 上修边 |
| | | */ |
| | | private String upTrim; |
| | | |
| | | /** |
| | | * 下 |
| | | */ |
| | | private String downTrim; |
| | | |
| | | /** |
| | | * 左 |
| | | */ |
| | | private String leftTrim; |
| | | |
| | | /** |
| | | * 右 |
| | | */ |
| | | private String rightTrim; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 小片数 |
| | | */ |
| | | private String glassCount; |
| | | |
| | | /** |
| | | * 小片面积 |
| | | */ |
| | | private String glassArea; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Integer creater; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeProject implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 自增:<优化-工程> |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工程编号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 工程项目名 |
| | | */ |
| | | private String projectName; |
| | | |
| | | /** |
| | | * 玻璃膜系 |
| | | */ |
| | | private String glassType; |
| | | |
| | | /** |
| | | * 玻璃厚度 |
| | | */ |
| | | private String glassThickness; |
| | | |
| | | /** |
| | | * 工程种类 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 状态: -2删除; -1默认; 1流程卡创建; 2第一次优化保存; 10钢化推荐创建保存; 20优化结果保存 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 总数 |
| | | */ |
| | | private Integer glassTotal; |
| | | |
| | | /** |
| | | * 总面积 |
| | | */ |
| | | private Double glassTotalArea; |
| | | |
| | | /** |
| | | * 流程卡数量 |
| | | */ |
| | | private Integer processQty; |
| | | |
| | | /** |
| | | * 循环落架数 |
| | | */ |
| | | private Integer guidance; |
| | | |
| | | /** |
| | | * 第一次使用原料数 |
| | | */ |
| | | private Integer fristStockQty; |
| | | |
| | | /** |
| | | * 第一次平均切裁率 |
| | | */ |
| | | private String fristCutPct; |
| | | |
| | | /** |
| | | * 使用的原料数 |
| | | */ |
| | | private Integer rawStockQty; |
| | | |
| | | /** |
| | | * 使用的原料面积 |
| | | */ |
| | | private String rawStockArea; |
| | | |
| | | /** |
| | | * 平均切裁率 |
| | | */ |
| | | private String avgCutPct; |
| | | |
| | | /** |
| | | * 有效切裁率 |
| | | */ |
| | | private String validCutPct; |
| | | |
| | | /** |
| | | * 尾片切裁率 |
| | | */ |
| | | private String lastCutPct; |
| | | |
| | | /** |
| | | * g混排程度 |
| | | */ |
| | | private String chaosPct; |
| | | |
| | | /** |
| | | * g最大装载率 |
| | | */ |
| | | private String maxLoadPct; |
| | | |
| | | /** |
| | | * g最大面积 |
| | | */ |
| | | private String maxArea; |
| | | |
| | | /** |
| | | * g最大数量 |
| | | */ |
| | | private Integer maxQty; |
| | | |
| | | /** |
| | | * g上片宽 |
| | | */ |
| | | private Float loadWidth; |
| | | |
| | | /** |
| | | * g上片长 |
| | | */ |
| | | private Float loadLength; |
| | | |
| | | /** |
| | | * x间隔 |
| | | */ |
| | | private Float xSpace; |
| | | |
| | | /** |
| | | * y间隔 |
| | | */ |
| | | private Float ySpace; |
| | | |
| | | /** |
| | | * g平均装载率 |
| | | */ |
| | | private Float loadRate; |
| | | |
| | | /** |
| | | * 流程卡集合 |
| | | */ |
| | | private String processCards; |
| | | |
| | | /** |
| | | * g总炉数 |
| | | */ |
| | | private Integer furnacesQty; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private String creater; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 预留,使用需注明 |
| | | */ |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | /** |
| | | * 预留,使用需注明 |
| | | */ |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeDetailMapper extends BaseMapper<OptimizeDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeLayoutMapper extends BaseMapper<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeProjectMapper extends BaseMapper<OptimizeProject> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeDetailService extends IService<OptimizeDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeLayoutService extends IService<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeProjectService extends IService<OptimizeProject> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.mapper.OptimizeDetailMapper; |
| | | import com.mes.pp.service.OptimizeDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeDetailServiceImpl extends ServiceImpl<OptimizeDetailMapper, OptimizeDetail> implements OptimizeDetailService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import com.mes.pp.mapper.OptimizeLayoutMapper; |
| | | import com.mes.pp.service.OptimizeLayoutService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeLayoutServiceImpl extends ServiceImpl<OptimizeLayoutMapper, OptimizeLayout> implements OptimizeLayoutService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeProjectServiceImpl extends ServiceImpl<OptimizeProjectMapper, OptimizeProject> implements OptimizeProjectService { |
| | | |
| | | } |
File was renamed from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/tools/InitUtil.java |
| | |
| | | package com.mes.tools;
|
| | |
|
| | | import cn.hutool.json.JSONArray;
|
| | | import cn.hutool.json.JSONObject;
|
| | | import com.mes.device.PlcBitInfo;
|
| | | import com.mes.device.PlcBitObject;
|
| | | import com.mes.device.PlcParameterInfo;
|
| | | import com.mes.device.PlcParameterObject;
|
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.FileReader;
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | | import java.util.List;
|
| | |
|
| | | public class InitUtil {
|
| | | //初始化word
|
| | | public static PlcParameterObject initword(String jsonFilePath) {
|
| | | try {
|
| | | FileReader fileReader = new FileReader(jsonFilePath);
|
| | | BufferedReader bufferedReader = new BufferedReader(fileReader);
|
| | |
|
| | | StringBuilder content = new StringBuilder();
|
| | | String line;
|
| | |
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | content.append(line);
|
| | | }
|
| | |
|
| | | bufferedReader.close();
|
| | | fileReader.close();
|
| | |
|
| | | JSONObject jsonfileobj = new JSONObject(content.toString());
|
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
|
| | | PlcParameterObject plcParameterObject = new PlcParameterObject();
|
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
|
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
|
| | |
|
| | | for (int i = 0; i < jsonArray.size(); i++) {
|
| | | JSONObject parameterObj = jsonArray.getJSONObject(i);
|
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
|
| | | String codeid = parameterObj.getStr("codeId");
|
| | | plcParameterInfo.setCodeId(codeid);
|
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
|
| | | //plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio")));
|
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght")));
|
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit"));
|
| | | plcParameterObject.addPlcParameter(plcParameterInfo);
|
| | | }
|
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02};
|
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
|
| | | // plcParameterObject.setPlcParameterList(getplcvlues);
|
| | |
|
| | | return plcParameterObject;
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | //初始化bit
|
| | | public static PlcBitObject initbit(String jsonFilePath) {
|
| | | PlcBitObject plcBitObject = new PlcBitObject();
|
| | |
|
| | | try {
|
| | | FileReader fileReader = new FileReader(jsonFilePath);
|
| | | BufferedReader bufferedReader = new BufferedReader(fileReader);
|
| | |
|
| | | StringBuilder content = new StringBuilder();
|
| | | String line;
|
| | |
|
| | | while ((line = bufferedReader.readLine()) != null) {
|
| | | content.append(line);
|
| | | }
|
| | |
|
| | | bufferedReader.close();
|
| | | fileReader.close();
|
| | |
|
| | | JSONObject jsonfileobj = new JSONObject(content.toString());
|
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor");
|
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址
|
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度
|
| | |
|
| | | for (int i = 0; i < jsonArray.size(); i++) {
|
| | | JSONObject parameterObj = jsonArray.getJSONObject(i);
|
| | |
|
| | | PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例
|
| | | String codeid = parameterObj.getStr("codeId");
|
| | | plcBitInfo.setCodeId(codeid);
|
| | | plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex")));
|
| | |
|
| | | plcBitObject.addPlcBit(plcBitInfo);
|
| | | }
|
| | | System.out.println("");
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | | // false, true ,true };
|
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1));
|
| | |
|
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength());
|
| | | // plcBitObject.setPlcBitList(getplcvlues);
|
| | | return plcBitObject;
|
| | | }
|
| | |
|
| | | //
|
| | | public static void readAndUpdateBitValues(PlcBitObject plcBitObject) {
|
| | |
|
| | | Boolean[] values1 = { false, true, true, true, false, false, true, false,
|
| | | false, true ,true };
|
| | | List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1));
|
| | | //List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength());
|
| | | plcBitObject.setPlcBitList(getplcvlues);
|
| | | }
|
| | |
|
| | |
|
| | | public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) {
|
| | |
|
| | | byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03,0x03};
|
| | | // byte[] getplcvlues = MockS7PLC.getInstance().readByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
|
| | | plcParameterObject.setPlcParameterList(getplcvlues);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | | package com.mes.tools; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.mes.device.PlcBitInfo; |
| | | import com.mes.device.PlcBitObject; |
| | | import com.mes.device.PlcParameterInfo; |
| | | import com.mes.device.PlcParameterObject; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.FileReader; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | public class InitUtil { |
| | | //初始化word |
| | | public static PlcParameterObject initword(String jsonFilePath) { |
| | | try { |
| | | FileReader fileReader = new FileReader(jsonFilePath); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | | StringBuilder content = new StringBuilder(); |
| | | String line; |
| | | |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | PlcParameterObject plcParameterObject = new PlcParameterObject(); |
| | | plcParameterObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcParameterObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | PlcParameterInfo plcParameterInfo = new PlcParameterInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcParameterInfo.setCodeId(codeid); |
| | | plcParameterInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | //plcParameterInfo.setRatio(Integer.valueOf(parameterObj.getStr("ratio"))); |
| | | plcParameterInfo.setAddressLength(Integer.valueOf(parameterObj.getStr("addressLenght"))); |
| | | plcParameterInfo.setUnit(parameterObj.getStr("unit")); |
| | | plcParameterObject.addPlcParameter(plcParameterInfo); |
| | | } |
| | | // byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02}; |
| | | // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | // plcParameterObject.setPlcParameterList(getplcvlues); |
| | | |
| | | return plcParameterObject; |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | //初始化bit |
| | | public static PlcBitObject initbit(String jsonFilePath) { |
| | | PlcBitObject plcBitObject = new PlcBitObject(); |
| | | |
| | | try { |
| | | FileReader fileReader = new FileReader(jsonFilePath); |
| | | BufferedReader bufferedReader = new BufferedReader(fileReader); |
| | | |
| | | StringBuilder content = new StringBuilder(); |
| | | String line; |
| | | |
| | | while ((line = bufferedReader.readLine()) != null) { |
| | | content.append(line); |
| | | } |
| | | |
| | | bufferedReader.close(); |
| | | fileReader.close(); |
| | | |
| | | JSONObject jsonfileobj = new JSONObject(content.toString()); |
| | | JSONArray jsonArray = jsonfileobj.getJSONArray("parameteInfor"); |
| | | plcBitObject.setPlcAddressBegin(jsonfileobj.getStr("plcAddressBegin"));//设置起始位地址 |
| | | plcBitObject.setPlcAddressLength(Integer.valueOf(jsonfileobj.getStr("plcAddressLenght")));//设置地址长度 |
| | | |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject parameterObj = jsonArray.getJSONObject(i); |
| | | |
| | | PlcBitInfo plcBitInfo = new PlcBitInfo(jsonfileobj.getStr("plcAddressBegin")); //参数实例 |
| | | String codeid = parameterObj.getStr("codeId"); |
| | | plcBitInfo.setCodeId(codeid); |
| | | plcBitInfo.setAddressIndex(Integer.valueOf(parameterObj.getStr("addressIndex"))); |
| | | |
| | | plcBitObject.addPlcBit(plcBitInfo); |
| | | } |
| | | System.out.println(""); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | // false, true ,true }; |
| | | // List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | |
| | | // List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | // plcBitObject.setPlcBitList(getplcvlues); |
| | | return plcBitObject; |
| | | } |
| | | |
| | | // |
| | | public static void readAndUpdateBitValues(PlcBitObject plcBitObject) { |
| | | |
| | | Boolean[] values1 = { false, true, true, true, false, false, true, false, |
| | | false, true ,true }; |
| | | List<Boolean> getplcvlues = new ArrayList<>(Arrays.asList(values1)); |
| | | //List<Boolean> getplcvlues = S7control.getinstance().ReadBits(plcBitObject.getPlcAddressBegin(), plcBitObject.getPlcAddressLength()); |
| | | plcBitObject.setPlcBitList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | public static void readAndUpdateWordValues(PlcParameterObject plcParameterObject) { |
| | | |
| | | byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03,0x03}; |
| | | // byte[] getplcvlues = MockS7PLC.getInstance().readByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength()); |
| | | plcParameterObject.setPlcParameterList(getplcvlues); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <version>1.0-SNAPSHOT</version> |
| | | </dependency> |
| | | <!-- Spring Security依赖 --> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-starter-security</artifactId>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-security</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>io.jsonwebtoken</groupId>--> |
| | | <!-- <artifactId>jjwt</artifactId>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>io.jsonwebtoken</groupId> |
| | | <artifactId>jjwt</artifactId> |
| | | <version>0.9.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.mes.common.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.reactive.CorsWebFilter; |
| | | import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/3/25 14:13 |
| | | * @Description: |
| | | */ |
| | | @Configuration |
| | | public class MyCorsConfig { |
| | | |
| | | @Bean |
| | | public WebMvcConfigurer corsConfigurer() { |
| | | return new WebMvcConfigurer() { |
| | | @Override |
| | | public void addCorsMappings(CorsRegistry registry) { |
| | | registry.addMapping("/**"); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | @Bean |
| | | public CorsWebFilter corsWebFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | |
| | | CorsConfiguration corsConfiguration = new CorsConfiguration(); |
| | | |
| | | //1、配置跨域 |
| | | corsConfiguration.addAllowedHeader("*"); |
| | | corsConfiguration.addAllowedMethod("*"); |
| | | corsConfiguration.addAllowedOrigin("*"); |
| | | corsConfiguration.setAllowCredentials(true); |
| | | |
| | | source.registerCorsConfiguration("/**", corsConfiguration); |
| | | return new CorsWebFilter(source); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.common.config; |
| | | |
| | | import com.mes.common.utils.FastJsonRedisSerializer; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.data.redis.connection.RedisConnectionFactory; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.serializer.StringRedisSerializer; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 19:13 |
| | | * @Description: |
| | | */ |
| | | @Configuration |
| | | public class RedisConfig { |
| | | |
| | | @Bean |
| | | @SuppressWarnings(value = {"unchecked", "rawtypes"}) |
| | | public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) { |
| | | RedisTemplate<Object, Object> template = new RedisTemplate<>(); |
| | | template.setConnectionFactory(connectionFactory); |
| | | |
| | | FastJsonRedisSerializer serializer = new FastJsonRedisSerializer(Object.class); |
| | | |
| | | // 使用StringRedisSerializer来序列化和反序列化redis的key值 |
| | | template.setKeySerializer(new StringRedisSerializer()); |
| | | template.setValueSerializer(serializer); |
| | | |
| | | // Hash的key也采用StringRedisSerializer的序列化方式 |
| | | template.setHashKeySerializer(new StringRedisSerializer()); |
| | | template.setHashValueSerializer(serializer); |
| | | |
| | | template.afterPropertiesSet(); |
| | | return template; |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.config; |
| | | |
| | | |
| | | import com.mes.common.filter.JwtAuthenticationTokenFilter; |
| | | 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.WebSecurityConfigurerAdapter; |
| | | import org.springframework.security.config.http.SessionCreationPolicy; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | |
| | | @Configuration |
| | | //@EnableWebSecurity |
| | | @EnableGlobalMethodSecurity(prePostEnabled = true) |
| | | public class TokenWebSecurityConfig extends WebSecurityConfigurerAdapter { |
| | | @Autowired |
| | | private JwtAuthenticationTokenFilter jwtAuthenticationTokenFilter; |
| | | |
| | | @Bean |
| | | public PasswordEncoder passwordEncoder() { |
| | | return new BCryptPasswordEncoder(); |
| | | } |
| | | |
| | | /** |
| | | * 配置过滤规则 |
| | | */ |
| | | @Override |
| | | protected void configure(HttpSecurity http) throws Exception { |
| | | http |
| | | //关闭csrf |
| | | .csrf().disable() |
| | | //不通过Session获取SecurityContext |
| | | .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) |
| | | .and() |
| | | .authorizeRequests() |
| | | // 对于登录接口 允许匿名访问 |
| | | .antMatchers("/userinfo/login").anonymous() |
| | | .antMatchers("/hello").permitAll() |
| | | // 除上面外的所有请求全部需要鉴权认证 |
| | | .anyRequest().permitAll(); |
| | | // http.addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); |
| | | } |
| | | |
| | | @Bean |
| | | @Override |
| | | public AuthenticationManager authenticationManagerBean() throws Exception { |
| | | return super.authenticationManagerBean(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.filter; |
| | | |
| | | import com.mes.common.utils.JwtUtil; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.userinfo.entity.LoginUser; |
| | | import io.jsonwebtoken.Claims; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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.stereotype.Component; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.filter.OncePerRequestFilter; |
| | | |
| | | import javax.annotation.Resource; |
| | | 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.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/10 9:42 |
| | | * @Description: |
| | | */ |
| | | @Component |
| | | public class JwtAuthenticationTokenFilter extends OncePerRequestFilter { |
| | | // 此处解释为什么不去实现Filter接口,因为在某些情况下会过滤两次,执行两次Filter里面的方法,所以我们选择继承SpringSecurity中的OncePerRequestFilter |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | private SysMenuMapper menuMapper; |
| | | |
| | | @Override |
| | | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { |
| | | //获取token |
| | | String token = request.getHeader("token"); |
| | | if (!StringUtils.hasText(token)) { |
| | | //放行 |
| | | filterChain.doFilter(request, response); |
| | | return; // 此处加上return好处是后面结果返回的时候就不会再走一遍此过滤器的方法了 |
| | | } |
| | | //解析token |
| | | String userid; |
| | | try { |
| | | Claims claims = JwtUtil.parseJWT(token); |
| | | userid = claims.getSubject(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("token非法"); |
| | | } |
| | | //从redis中获取用户信息 |
| | | String redisKey = "login:" + userid; |
| | | LoginUser loginUser = redisUtil.getCacheObject(redisKey); |
| | | if (Objects.isNull(loginUser)) { |
| | | throw new RuntimeException("用户未登录"); |
| | | } |
| | | //存入SecurityContextHolder,以供后面的过滤器使用 |
| | | List<String> permissionKeyList = menuMapper.selectPermsByUserId(Long.parseLong(userid)); |
| | | List<GrantedAuthority> authorities = permissionKeyList.stream(). |
| | | map(SimpleGrantedAuthority::new) |
| | | .collect(Collectors.toList()); |
| | | UsernamePasswordAuthenticationToken authenticationToken = |
| | | new UsernamePasswordAuthenticationToken(loginUser, null, authorities); |
| | | SecurityContextHolder.getContext().setAuthentication(authenticationToken); |
| | | //放行 |
| | | filterChain.doFilter(request, response); |
| | | } |
| | | } |
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); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.parser.ParserConfig; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.fasterxml.jackson.databind.JavaType; |
| | | import com.fasterxml.jackson.databind.type.TypeFactory; |
| | | import org.springframework.data.redis.serializer.RedisSerializer; |
| | | import org.springframework.data.redis.serializer.SerializationException; |
| | | |
| | | import java.nio.charset.Charset; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/11 15:28 |
| | | * @Description: |
| | | */ |
| | | public class FastJsonRedisSerializer<T> implements RedisSerializer<T> { |
| | | |
| | | public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); |
| | | |
| | | private Class<T> clazz; |
| | | |
| | | static { |
| | | ParserConfig.getGlobalInstance().setAutoTypeSupport(true); |
| | | } |
| | | |
| | | public FastJsonRedisSerializer(Class<T> clazz) { |
| | | super(); |
| | | this.clazz = clazz; |
| | | } |
| | | |
| | | @Override |
| | | public byte[] serialize(T t) throws SerializationException { |
| | | if (t == null) { |
| | | return new byte[0]; |
| | | } |
| | | return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET); |
| | | } |
| | | |
| | | @Override |
| | | public T deserialize(byte[] bytes) throws SerializationException { |
| | | if (bytes == null || bytes.length <= 0) { |
| | | return null; |
| | | } |
| | | String str = new String(bytes, DEFAULT_CHARSET); |
| | | |
| | | return JSON.parseObject(str, clazz); |
| | | } |
| | | |
| | | |
| | | protected JavaType getJavaType(Class<?> clazz) { |
| | | return TypeFactory.defaultInstance().constructType(clazz); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.utils; |
| | | |
| | | |
| | | import io.jsonwebtoken.Claims; |
| | | import io.jsonwebtoken.JwtBuilder; |
| | | import io.jsonwebtoken.Jwts; |
| | | import io.jsonwebtoken.SignatureAlgorithm; |
| | | |
| | | import javax.crypto.SecretKey; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import java.util.Base64; |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 19:15 |
| | | * @Description: |
| | | */ |
| | | public class JwtUtil { |
| | | |
| | | //有效期为 |
| | | public static final Long JWT_TTL = 60 * 60 * 1000L;// 60 * 60 *1000 一个小时 |
| | | //设置秘钥明文 |
| | | public static final String JWT_KEY = "sangeng"; |
| | | |
| | | public static String getUUID() { |
| | | String token = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | return token; |
| | | } |
| | | |
| | | /** |
| | | * 生成jtw |
| | | * |
| | | * @param subject token中要存放的数据(json格式) |
| | | * @return |
| | | */ |
| | | public static String createJWT(String subject) { |
| | | JwtBuilder builder = getJwtBuilder(subject, null, getUUID());// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | |
| | | /** |
| | | * 生成jtw |
| | | * |
| | | * @param subject token中要存放的数据(json格式) |
| | | * @param ttlMillis token超时时间 |
| | | * @return |
| | | */ |
| | | public static String createJWT(String subject, Long ttlMillis) { |
| | | JwtBuilder builder = getJwtBuilder(subject, ttlMillis, getUUID());// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | |
| | | private static JwtBuilder getJwtBuilder(String subject, Long ttlMillis, String uuid) { |
| | | SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; |
| | | SecretKey secretKey = generalKey(); |
| | | long nowMillis = System.currentTimeMillis(); |
| | | Date now = new Date(nowMillis); |
| | | if (ttlMillis == null) { |
| | | ttlMillis = JwtUtil.JWT_TTL; |
| | | } |
| | | long expMillis = nowMillis + ttlMillis; |
| | | Date expDate = new Date(expMillis); |
| | | return Jwts.builder() |
| | | .setId(uuid) //唯一的ID |
| | | .setSubject(subject) // 主题 可以是JSON数据 |
| | | .setIssuer("sg") // 签发者 |
| | | .setIssuedAt(now) // 签发时间 |
| | | .signWith(signatureAlgorithm, secretKey) //使用HS256对称加密算法签名, 第二个参数为秘钥 |
| | | .setExpiration(expDate); |
| | | } |
| | | |
| | | /** |
| | | * 创建token |
| | | * |
| | | * @param id |
| | | * @param subject |
| | | * @param ttlMillis |
| | | * @return |
| | | */ |
| | | public static String createJWT(String id, String subject, Long ttlMillis) { |
| | | JwtBuilder builder = getJwtBuilder(subject, ttlMillis, id);// 设置过期时间 |
| | | return builder.compact(); |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | String token = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjYWM2ZDVhZi1mNjVlLTQ0MDAtYjcxMi0zYWEwOGIyOTIwYjQiLCJzdWIiOiJzZyIsImlzcyI6InNnIiwiaWF0IjoxNjM4MTA2NzEyLCJleHAiOjE2MzgxMTAzMTJ9.JVsSbkP94wuczb4QryQbAke3ysBDIL5ou8fWsbt_ebg"; |
| | | Claims claims = parseJWT(token); |
| | | System.out.println(claims); |
| | | } |
| | | |
| | | /** |
| | | * 生成加密后的秘钥 secretKey |
| | | * |
| | | * @return |
| | | */ |
| | | public static SecretKey generalKey() { |
| | | byte[] encodedKey = Base64.getDecoder().decode(JwtUtil.JWT_KEY); |
| | | SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES"); |
| | | return key; |
| | | } |
| | | |
| | | /** |
| | | * 解析 |
| | | * |
| | | * @param jwt |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static Claims parseJWT(String jwt) throws Exception { |
| | | SecretKey secretKey = generalKey(); |
| | | return Jwts.parser() |
| | | .setSigningKey(secretKey) |
| | | .parseClaimsJws(jwt) |
| | | .getBody(); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.common.utils; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.BoundSetOperations; |
| | | import org.springframework.data.redis.core.HashOperations; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.ValueOperations; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * spring redis 工具类 |
| | | **/ |
| | | @Component |
| | | public class RedisUtil { |
| | | @Autowired |
| | | public RedisTemplate redisTemplate; |
| | | |
| | | /** |
| | | * 缓存基本的对象,Integer、String、实体类等 |
| | | * |
| | | * @param key 缓存的键值 |
| | | * @param value 缓存的值 |
| | | */ |
| | | public <T> void setCacheObject(final String key, final T value) { |
| | | redisTemplate.opsForValue().set(key, value); |
| | | } |
| | | |
| | | /** |
| | | * 缓存基本的对象,Integer、String、实体类等 |
| | | * |
| | | * @param key 缓存的键值 |
| | | * @param value 缓存的值 |
| | | * @param timeout 时间 |
| | | * @param timeUnit 时间颗粒度 |
| | | */ |
| | | public <T> void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) { |
| | | redisTemplate.opsForValue().set(key, value, timeout, timeUnit); |
| | | } |
| | | |
| | | /** |
| | | * 设置有效时间 |
| | | * |
| | | * @param key Redis键 |
| | | * @param timeout 超时时间 |
| | | * @return true=设置成功;false=设置失败 |
| | | */ |
| | | public boolean expire(final String key, final long timeout) { |
| | | return expire(key, timeout, TimeUnit.SECONDS); |
| | | } |
| | | |
| | | /** |
| | | * 设置有效时间 |
| | | * |
| | | * @param key Redis键 |
| | | * @param timeout 超时时间 |
| | | * @param unit 时间单位 |
| | | * @return true=设置成功;false=设置失败 |
| | | */ |
| | | public boolean expire(final String key, final long timeout, final TimeUnit unit) { |
| | | return redisTemplate.expire(key, timeout, unit); |
| | | } |
| | | |
| | | /** |
| | | * 获得缓存的基本对象。 |
| | | * |
| | | * @param key 缓存键值 |
| | | * @return 缓存键值对应的数据 |
| | | */ |
| | | public <T> T getCacheObject(final String key) { |
| | | ValueOperations<String, T> operation = redisTemplate.opsForValue(); |
| | | return operation.get(key); |
| | | } |
| | | |
| | | /** |
| | | * 删除单个对象 |
| | | * |
| | | * @param key |
| | | */ |
| | | public boolean deleteObject(final String key) { |
| | | return redisTemplate.delete(key); |
| | | } |
| | | |
| | | /** |
| | | * 删除集合对象 |
| | | * |
| | | * @param collection 多个对象 |
| | | * @return |
| | | */ |
| | | public long deleteObject(final Collection collection) { |
| | | return redisTemplate.delete(collection); |
| | | } |
| | | |
| | | /** |
| | | * 缓存List数据 |
| | | * |
| | | * @param key 缓存的键值 |
| | | * @param dataList 待缓存的List数据 |
| | | * @return 缓存的对象 |
| | | */ |
| | | public <T> long setCacheList(final String key, final List<T> dataList) { |
| | | Long count = redisTemplate.opsForList().rightPushAll(key, dataList); |
| | | return count == null ? 0 : count; |
| | | } |
| | | |
| | | /** |
| | | * 获得缓存的list对象 |
| | | * |
| | | * @param key 缓存的键值 |
| | | * @return 缓存键值对应的数据 |
| | | */ |
| | | public <T> List<T> getCacheList(final String key) { |
| | | return redisTemplate.opsForList().range(key, 0, -1); |
| | | } |
| | | |
| | | /** |
| | | * 缓存Set |
| | | * |
| | | * @param key 缓存键值 |
| | | * @param dataSet 缓存的数据 |
| | | * @return 缓存数据的对象 |
| | | */ |
| | | public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet) { |
| | | BoundSetOperations<String, T> setOperation = redisTemplate.boundSetOps(key); |
| | | Iterator<T> it = dataSet.iterator(); |
| | | while (it.hasNext()) { |
| | | setOperation.add(it.next()); |
| | | } |
| | | return setOperation; |
| | | } |
| | | |
| | | /** |
| | | * 获得缓存的set |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public <T> Set<T> getCacheSet(final String key) { |
| | | return redisTemplate.opsForSet().members(key); |
| | | } |
| | | |
| | | /** |
| | | * 缓存Map |
| | | * |
| | | * @param key |
| | | * @param dataMap |
| | | */ |
| | | public <T> void setCacheMap(final String key, final Map<String, T> dataMap) { |
| | | if (dataMap != null) { |
| | | redisTemplate.opsForHash().putAll(key, dataMap); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获得缓存的Map |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public <T> Map<String, T> getCacheMap(final String key) { |
| | | return redisTemplate.opsForHash().entries(key); |
| | | } |
| | | |
| | | /** |
| | | * 往Hash中存入数据 |
| | | * |
| | | * @param key Redis键 |
| | | * @param hKey Hash键 |
| | | * @param value 值 |
| | | */ |
| | | public <T> void setCacheMapValue(final String key, final String hKey, final T value) { |
| | | redisTemplate.opsForHash().put(key, hKey, value); |
| | | } |
| | | |
| | | /** |
| | | * 获取Hash中的数据 |
| | | * |
| | | * @param key Redis键 |
| | | * @param hKey Hash键 |
| | | * @return Hash中的对象 |
| | | */ |
| | | public <T> T getCacheMapValue(final String key, final String hKey) { |
| | | HashOperations<String, String, T> opsForHash = redisTemplate.opsForHash(); |
| | | return opsForHash.get(key, hKey); |
| | | } |
| | | |
| | | /** |
| | | * 删除Hash中的数据 |
| | | * |
| | | * @param key |
| | | * @param hkey |
| | | */ |
| | | public void delCacheMapValue(final String key, final String hkey) { |
| | | HashOperations hashOperations = redisTemplate.opsForHash(); |
| | | hashOperations.delete(key, hkey); |
| | | } |
| | | |
| | | /** |
| | | * 获取多个Hash中的数据 |
| | | * |
| | | * @param key Redis键 |
| | | * @param hKeys Hash键集合 |
| | | * @return Hash对象集合 |
| | | */ |
| | | public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys) { |
| | | return redisTemplate.opsForHash().multiGet(key, hKeys); |
| | | } |
| | | |
| | | /** |
| | | * 获得缓存的基本对象列表 |
| | | * |
| | | * @param pattern 字符串前缀 |
| | | * @return 对象列表 |
| | | */ |
| | | public Collection<String> keys(final String pattern) { |
| | | return redisTemplate.keys(pattern); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.common.utils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/9 19:16 |
| | | * @Description: |
| | | */ |
| | | public class WebUtils { |
| | | /** |
| | | * 将字符串渲染到客户端 |
| | | * |
| | | * @param response 渲染对象 |
| | | * @param string 待渲染的字符串 |
| | | * @return null |
| | | */ |
| | | public static String renderString(HttpServletResponse response, String string) { |
| | | try { |
| | | response.setStatus(200); |
| | | response.setContentType("application/json"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | response.getWriter().print(string); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.menu.controller; |
| | | |
| | | |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.menu.service.SysMenuService; |
| | | import com.mes.utils.Result; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 菜单表 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @ApiModel("获取菜单信息") |
| | | @RestController |
| | | @RequestMapping("/menu/sysMenu") |
| | | public class SysMenuController { |
| | | |
| | | @Autowired |
| | | SysMenuService sysMenuService; |
| | | |
| | | @ApiOperation("获取用户有权限的所有菜单") |
| | | @GetMapping("/list") |
| | | public Result<List<SysMenu>> getMenuTree() { |
| | | return Result.success(sysMenuService.getMenuTree()); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.menu.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-13 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | public class SysMenu implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 自增id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 父id |
| | | */ |
| | | private Integer parentId; |
| | | |
| | | /** |
| | | * 模块名称 |
| | | */ |
| | | private String menuName; |
| | | |
| | | /** |
| | | * 图标 |
| | | */ |
| | | private String icon; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | private String url; |
| | | |
| | | /** |
| | | * 语言类型 |
| | | */ |
| | | private String languageType; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private String listSort; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 子菜单 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<SysMenu> children; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.menu.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.menu.entity.SysMenu; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 菜单表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysMenuMapper extends BaseMapper<SysMenu> { |
| | | |
| | | List<String> selectPermsByUserId(long parseLong); |
| | | } |
New file |
| | |
| | | package com.mes.menu.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.menu.entity.SysMenu; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 菜单表 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysMenuService extends IService<SysMenu> { |
| | | |
| | | List<SysMenu> getMenuTree(); |
| | | } |
New file |
| | |
| | | package com.mes.menu.service.impl; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.menu.entity.SysMenu; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.menu.service.SysMenuService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 菜单表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService { |
| | | |
| | | @Override |
| | | public List<SysMenu> getMenuTree() { |
| | | List<SysMenu> menuList = this.baseMapper.selectList(null); |
| | | return create(menuList); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将数据库中查询出来的list集合传入此方法即可获得排成树形结构的list集合 |
| | | * |
| | | * @param lists |
| | | * @return |
| | | */ |
| | | public List<SysMenu> create(List<SysMenu> lists) { |
| | | List<SysMenu> deptTreeList = lists.stream() |
| | | .filter(item -> item.getParentId() == 0) |
| | | .map(item -> { |
| | | item.setChildren(getChildren(item, lists)); |
| | | return item; |
| | | }).collect(Collectors.toList()); |
| | | return deptTreeList; |
| | | } |
| | | |
| | | /** |
| | | * 此方法将被递归调用 |
| | | * |
| | | * @param menu |
| | | * @param menus |
| | | * @return |
| | | */ |
| | | private List<SysMenu> getChildren(SysMenu menu, List<SysMenu> menus) { |
| | | List<SysMenu> res = menus.stream() |
| | | .filter(item -> item.getParentId().equals(menu.getId())) |
| | | .map(item -> { |
| | | item.setChildren(getChildren(item, menus)); |
| | | return item; |
| | | }).collect(Collectors.toList()); |
| | | log.info("菜单树:{}", JSONUtil.toJsonStr(res)); |
| | | return res; |
| | | } |
| | | |
| | | } |
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") |
| | | public class SysRoleController { |
| | | |
| | | } |
| | | |
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 { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.role.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 角色表 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class SysRole implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private String name; |
| | | |
| | | /** |
| | | * 角色权限字符串 |
| | | */ |
| | | private String roleKey; |
| | | |
| | | /** |
| | | * 角色状态(0正常 1停用) |
| | | */ |
| | | private String status; |
| | | |
| | | /** |
| | | * 删除标志 |
| | | */ |
| | | private Integer delFlag; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class SysRoleMenu implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 角色ID |
| | | */ |
| | | @TableId(value = "role_id", type = IdType.AUTO) |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * 菜单id |
| | | */ |
| | | private Long menuId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.role.entity.SysRole; |
| | | |
| | | /** |
| | | * <p> |
| | | * 角色表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysRoleMapper extends BaseMapper<SysRole> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.role.mapper.SysRoleMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.role.mapper.SysRoleMenuMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.role.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysRoleMenuService extends IService<SysRoleMenu> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.role.entity.SysRole; |
| | | |
| | | /** |
| | | * <p> |
| | | * 角色表 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysRoleService extends IService<SysRole> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.role.entity.SysRoleMenu; |
| | | import com.mes.role.mapper.SysRoleMenuMapper; |
| | | import com.mes.role.service.SysRoleMenuService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements SysRoleMenuService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.role.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.role.entity.SysRole; |
| | | import com.mes.role.mapper.SysRoleMapper; |
| | | import com.mes.role.service.SysRoleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 角色表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | import com.mes.utils.Result; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @RestController |
| | | @CrossOrigin |
| | | @RequestMapping("/userinfo") |
| | | public class SysUserController { |
| | | |
| | | @Autowired |
| | | private SysUserService sysUserService; |
| | | |
| | | @PostMapping("/login") |
| | | public Result login(@RequestBody SysUser user) { |
| | | return sysUserService.login(user); |
| | | } |
| | | |
| | | @GetMapping("/hello") |
| | | public Result hello() { |
| | | return Result.success("eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlZjMyMjQ4NDcyODE0ZWFlYWRlOTBkYmZjYWFlZmNmZSIsInN1YiI6IjEiLCJpc3MiOiJzZyIsImlhdCI6MTcxMjkwMjI0NCwiZXhwIjoxNzEyOTA1ODQ0fQ.DlJkhkiwjZSqprdLzKaTB3yuyxGukerKeF0FbJK_6HY"); |
| | | } |
| | | } |
| | | |
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 { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.userinfo.entity; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import org.springframework.security.core.GrantedAuthority; |
| | | import org.springframework.security.core.authority.SimpleGrantedAuthority; |
| | | import org.springframework.security.core.userdetails.UserDetails; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/11 15:46 |
| | | * @Description: |
| | | */ |
| | | public class LoginUser implements UserDetails { |
| | | |
| | | |
| | | private SysUser user; |
| | | |
| | | /** |
| | | * 存储权限信息 |
| | | */ |
| | | @JSONField(serialize = false) |
| | | private List<String> permissions; |
| | | |
| | | /** |
| | | * 存储SpringSecurity调用getAuthorities()方法获取的权限信息的集合 |
| | | */ |
| | | @JSONField(serialize = false) |
| | | private List<GrantedAuthority> authorities; |
| | | |
| | | |
| | | public LoginUser() { |
| | | } |
| | | |
| | | public LoginUser(SysUser user, List<String> permissions) { |
| | | this.user = user; |
| | | this.permissions = permissions; |
| | | } |
| | | |
| | | public SysUser getUser() { |
| | | return user; |
| | | } |
| | | |
| | | public void setUser(SysUser user) { |
| | | this.user = user; |
| | | } |
| | | |
| | | @Override |
| | | public Collection<? extends GrantedAuthority> getAuthorities() { |
| | | |
| | | // 优化为只需要第一次获取的时候进行遍历,后面再用就会从authorities这个成员变量中获取了,不会再进行Stream循环遍历了 |
| | | if (authorities != null) { |
| | | return authorities; |
| | | } |
| | | //把permissions中字符串类型的权限信息转换成GrantedAuthority对象存入authorities中 |
| | | authorities = permissions.stream(). |
| | | map(SimpleGrantedAuthority::new) |
| | | .collect(Collectors.toList()); |
| | | return authorities; |
| | | } |
| | | |
| | | @Override |
| | | public String getPassword() { |
| | | return user.getPassword(); |
| | | } |
| | | |
| | | @Override |
| | | public String getUsername() { |
| | | return user.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.userinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户表 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class SysUser implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 用户名 |
| | | */ |
| | | private String userName; |
| | | |
| | | /** |
| | | * 昵称 |
| | | */ |
| | | private String nickName; |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String password; |
| | | |
| | | /** |
| | | * 账号状态(0正常 1停用) |
| | | */ |
| | | private String status; |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 用户类型(0管理员,1普通用户) |
| | | */ |
| | | private String userType; |
| | | |
| | | /** |
| | | * 删除标志 |
| | | */ |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class SysUserRole implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableId(value = "user_id", type = IdType.AUTO) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 角色id |
| | | */ |
| | | private Long roleId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysUserMapper extends BaseMapper<SysUser> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysUserRoleMapper extends BaseMapper<SysUserRole> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.userinfo.mapper.SysUserMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.userinfo.mapper.SysUserRoleMapper"> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.mes.userinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysUserRoleService extends IService<SysUserRole> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.utils.Result; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户表 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | public interface SysUserService extends IService<SysUser> { |
| | | |
| | | Result login(SysUser user); |
| | | |
| | | Result logout(); |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.userinfo.entity.SysUserRole; |
| | | import com.mes.userinfo.mapper.SysUserRoleMapper; |
| | | import com.mes.userinfo.service.SysUserRoleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.utils.JwtUtil; |
| | | import com.mes.common.utils.RedisUtil; |
| | | import com.mes.menu.mapper.SysMenuMapper; |
| | | import com.mes.userinfo.entity.LoginUser; |
| | | import com.mes.userinfo.entity.SysUser; |
| | | import com.mes.userinfo.mapper.SysUserMapper; |
| | | import com.mes.userinfo.service.SysUserService; |
| | | 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.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-11 |
| | | */ |
| | | @Service |
| | | public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService, UserDetailsService { |
| | | |
| | | @Autowired |
| | | private AuthenticationManager authenticationManager; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Resource |
| | | private SysMenuMapper sysMenuMapper; |
| | | |
| | | @Override |
| | | public Result login(SysUser user) { |
| | | UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(user.getUserName(), user.getPassword()); |
| | | Authentication authenticate = authenticationManager.authenticate(authenticationToken); |
| | | if (Objects.isNull(authenticate)) { |
| | | throw new RuntimeException("用户名或密码错误"); |
| | | } |
| | | //使用userid生成token |
| | | LoginUser loginUser = (LoginUser) authenticate.getPrincipal(); |
| | | String userId = loginUser.getUser().getId().toString(); |
| | | String jwt = JwtUtil.createJWT(userId); |
| | | //authenticate存入redis |
| | | redisUtil.setCacheObject("login:" + userId, loginUser); |
| | | //把token响应给前端 |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("token", jwt); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @Override |
| | | 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("退出成功"); |
| | | } |
| | | |
| | | @Override |
| | | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { |
| | | LambdaQueryWrapper<SysUser> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(SysUser::getUserName, username); |
| | | SysUser user = this.baseMapper.selectOne(lqw); |
| | | //判断是否为空 |
| | | if (Objects.isNull(user)) { |
| | | throw new RuntimeException("用户名或密码错误"); |
| | | } |
| | | //查询权限信息 |
| | | List<String> perms = sysMenuMapper.selectPermsByUserId(user.getId()); |
| | | |
| | | return new LoginUser(user, perms); |
| | | } |
| | | } |
New file |
| | |
| | | server: |
| | | port: 8089 |
| | | 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 |
| | | application: |
| | | name: security |
| | | redis: |
| | | database: 0 |
| | | host: 10.153.19.150 |
| | | port: 6379 |
| | | password: |
| | | session: |
| | | store-type: redis |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.menu.mapper.SysMenuMapper"> |
| | | |
| | | <select id="selectPermsByUserId" resultType="java.lang.String"> |
| | | SELECT DISTINCT m.perms |
| | | FROM sys_user_role ur |
| | | LEFT JOIN sys_role r ON ur.role_id = r.id |
| | | LEFT JOIN sys_role_menu rm ON ur.role_id = rm.role_id |
| | | LEFT JOIN sys_menu m ON m.id = rm.menu_id |
| | | WHERE user_id = #{userid} |
| | | AND r.status = 0 |
| | | AND m.status = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | public class CacheVerticalClassModuleApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | SpringApplication.run(CacheVerticalClassModuleApplication.class, args); |
| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | 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; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 大理片笼信息 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel("大理片笼信息") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCage") |
| | | public class BigStorageCageController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | |
| | | //todo: 实例代码 待删除 |
| | | @ApiOperation("测试") |
| | | @GetMapping("/index") |
| | | public String index() { |
| | | return "hello world"; |
| | | } |
| | | // public Result<BigStorageCageDetails> feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails){ |
| | | // |
| | | // } |
| | | |
| | | @ApiOperation("理片笼信息") |
| | | @GetMapping("/BigStorageCage") |
| | | public List<BigStorageCage> BigStorageCage() { |
| | | return bigStorageCageService.list(); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情") |
| | | @GetMapping("/BigStorageCageDetails") |
| | | public List<BigStorageCageDetails> BigStorageCageDetails() { |
| | | return bigStorageCageDetailsService.list(); |
| | | } |
| | | |
| | | @ApiOperation("小车实时位置") |
| | | @GetMapping("/CarPosition") |
| | | public List<Integer> CarPosition() { |
| | | return bigStorageCageDetailsService.getCarposition(); |
| | | @GetMapping("/bigStorageCage") |
| | | public Result<List<BigStorageCage>> querybigStorageCageDetail() { |
| | | return Result.success(bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("手动完成任务") |
| | | @GetMapping("/FinishTask") |
| | | public void FinishTask(int type, int id) { |
| | | @PostMapping("/finishTask") |
| | | public Result<String> finishTask(int type, int id) { |
| | | // bigStorageCageDetailsService.FinishTask(); |
| | | return Result.success("success"); |
| | | } |
| | | } |
| | |
| | | package com.mes.bigstorage.controller; |
| | | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | 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.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel(description = "理片笼详情") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCageDetails") |
| | | public class BigStorageCageDetailsController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | |
| | | @ApiOperation("理片笼详情") |
| | | @GetMapping("/bigStorageCageDetails") |
| | | public List<BigStorageCageDetails> bigStorageCageDetails() { |
| | | return bigStorageCageDetailsService.list(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.bigstorage.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | private Integer remainWidth; |
| | | |
| | | @TableField(exist = false) |
| | | private List<BigStorageCageDetails> bigStorageCageDetails; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import feign.Param; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | public interface BigStorageCageDetailsMapper extends BaseMapper<BigStorageCageDetails> { |
| | | |
| | | BigStorageCageDetails SelectTemperingFeedSlot(@Param("bigStorageCageDetails") BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | BigStorageCageDetails SelectEmptyFeedSlot(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | public interface BigStorageCageMapper extends BaseMapper<BigStorageCage> { |
| | | |
| | | |
| | | BigStorageCageDetails SelectEmptyFeedSlot(); |
| | | |
| | | @Update("update big_storage_cage set remain_width = #{width} where slot=#{slot}") |
| | | public void UpdateRemainWidth(int slot,int width); |
| | | |
| | | BigStorageCageDetails SelectTemperingFeedSlot(GlassInfo glassInfo); |
| | | |
| | | BigStorageCageDetails SelectOtherFeedSlot(); |
| | | |
| | | List<String> selectTemperingId(); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface BigStorageCageDetailsService extends IService<BigStorageCageDetails> { |
| | | |
| | | public boolean getTemperingGlass(); |
| | | |
| | | List<Integer> getCarposition(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface BigStorageCageService extends IService<BigStorageCage> { |
| | | public void updateRemainWidth(int Slot); |
| | | public BigStorageCageDetails FeedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | void updateRemainWidth(int Slot); |
| | | |
| | | BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | boolean outGlass(); |
| | | |
| | | List<BigStorageCage> querybigStorageCageDetail(); |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | @Service |
| | | public class BigStorageCageDetailsServiceImpl extends ServiceImpl<BigStorageCageDetailsMapper, BigStorageCageDetails> implements BigStorageCageDetailsService { |
| | | @Autowired |
| | | @Resource |
| | | private BigStorageCageMapper bigStorageCageMapper; |
| | | |
| | | @Override |
| | | public boolean getTemperingGlass(){ |
| | | public boolean getTemperingGlass() { |
| | | //获取笼子内所有版图号 |
| | | List<String> temperingIdList=bigStorageCageMapper.selectTemperingId(); |
| | | for (String temperingId:temperingIdList |
| | | ) { |
| | | List<String> temperingIdList = bigStorageCageMapper.selectTemperingId(); |
| | | for (String temperingId : temperingIdList |
| | | ) { |
| | | |
| | | } |
| | | return true; |
| | | } |
| | | @Override |
| | | public List<Integer> getCarposition(){ |
| | | return null; |
| | | } |
| | | } |
| | |
| | | package com.mes.bigstorage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BigStorageCageServiceImpl extends ServiceImpl<BigStorageCageMapper, BigStorageCage> implements BigStorageCageService { |
| | | @Autowired |
| | | private BigStorageCageMapper bigStorageCageMapper; |
| | | @Autowired |
| | | |
| | | @Resource |
| | | private BigStorageCageDetailsMapper bigStorageCageDetailsMapper; |
| | | |
| | | @Override |
| | | public BigStorageCageDetails FeedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails) { |
| | | public BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails) { |
| | | |
| | | //1、查询理片笼内玻璃片序等于当前玻璃片序-1的玻璃 |
| | | LambdaQueryWrapper<BigStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1); |
| | | |
| | | //获取同钢化版图id可进片的格子 |
| | | BigStorageCageDetails layoutSlotInfo =bigStorageCageMapper.SelectTemperingFeedSlot(glassInfo); |
| | | //有符合条件的格子时 |
| | | if (layoutSlotInfo!=null) { |
| | | //将玻璃信息填入理片笼详情表 |
| | | BigStorageCageDetails layoutSlotInfo = bigStorageCageDetailsMapper.selectOne(wrapper); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | |
| | | //2、有符合条件的格子活片序为1时 |
| | | log.info("有符合条件的格子活片序为1时"); |
| | | if (layoutSlotInfo.getSlot() != null) { |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | }else{ |
| | | } else { |
| | | //获取不到时: |
| | | // LambdaQueryWrapper<BigStorageCageDetails> BigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | // BigStorageCageDetailslambdaQueryWrapper |
| | | // .select(BigStorageCageDetails::getTemperingLayoutId) |
| | | // .groupBy(BigStorageCageDetails::getTemperingLayoutId); |
| | | // List<Map<String, Object>> temperingLayoutIdList= bigStorageCageDetailsMapper.selectMaps(BigStorageCageDetailslambdaQueryWrapper); |
| | | // for (Map<String, Object> map : temperingLayoutIdList) { |
| | | // for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | // String prefix = entry.getKey().substring(0, entry.getKey().indexOf('-')); |
| | | // String suffix = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | // if(suffix.equals(entry.getValue())){ |
| | | // |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | |
| | | //获取可进片格子信息 |
| | | BigStorageCageDetails EmptySlotInfo=bigStorageCageMapper.SelectEmptyFeedSlot(); |
| | | if (EmptySlotInfo!=null){ |
| | | bigStorageCageDetails.setSlot(EmptySlotInfo.getSlot()); |
| | | }else{ |
| | | //获取其他笼格子- |
| | | BigStorageCageDetails OtherSlotInfo=bigStorageCageMapper.SelectOtherFeedSlot(); |
| | | bigStorageCageDetails.setSlot(OtherSlotInfo.getSlot()); |
| | | } |
| | | // BigStorageCageDetails EmptySlotInfo = bigStorageCageMapper.selectEmptyFeedSlot(); |
| | | // if (EmptySlotInfo != null) { |
| | | // bigStorageCageDetails.setSlot(EmptySlotInfo.getSlot()); |
| | | // } else { |
| | | // //获取其他笼格子- |
| | | // BigStorageCageDetails OtherSlotInfo = bigStorageCageMapper.selectOtherFeedSlot(); |
| | | // bigStorageCageDetails.setSlot(OtherSlotInfo.getSlot()); |
| | | // } |
| | | //将玻璃信息放入该格子 |
| | | |
| | | } |
| | | |
| | | updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | if (bigStorageCageDetails.getSlot() != null) { |
| | | bigStorageCageDetailsMapper.insert(bigStorageCageDetails); |
| | | updateRemainWidth(bigStorageCageDetails.getSlot()); |
| | | } |
| | | return bigStorageCageDetails; |
| | | } |
| | | |
| | | @Override |
| | | public boolean outGlass() { |
| | | // // 1、查询钢化小片任务表是否有待出玻璃 |
| | | // List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.SelectTemperingGlassInfo(); |
| | | // //没有可出的玻璃时 |
| | | // if (temperingGlassInfoList != null) { |
| | | // //查询是否有小片全部到齐的钢化版图 |
| | | // } else { |
| | | // //继续当前钢化版图的任务 |
| | | // } |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailslambdaQueryWrapper |
| | | .select(BigStorageCageDetails::getTemperingLayoutId) |
| | | .groupBy(BigStorageCageDetails::getTemperingLayoutId); |
| | | List<Map<String, Object>> temperingLayoutIdList = bigStorageCageDetailsMapper.selectMaps(bigStorageCageDetailslambdaQueryWrapper); |
| | | for (Map<String, Object> map : temperingLayoutIdList) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String prefix = entry.getKey().substring(0, entry.getKey().indexOf('-')); |
| | | String suffix = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | if (suffix.equals(entry.getValue())) { |
| | | |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //修改格子剩余宽度 |
| | | @Override |
| | | public void updateRemainWidth(int Slot){ |
| | | public void updateRemainWidth(int slot) { |
| | | //获取该格子内玻璃信息 |
| | | int width=5000; |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList= Collections.singletonList(bigStorageCageDetailsMapper.selectById(Slot)); |
| | | for (BigStorageCageDetails bigStorageCageDetails:bigStorageCageDetailsList |
| | | Integer width = 5000; |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = Collections.singletonList(bigStorageCageDetailsMapper.selectById(slot)); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | width-=Integer.parseInt(bigStorageCageDetails.getWidth().toString())+bigStorageCageDetails.getGap(); |
| | | width -= Integer.parseInt(bigStorageCageDetails.getWidth().toString()) + bigStorageCageDetails.getGap(); |
| | | } |
| | | //修改格子剩余宽度 |
| | | bigStorageCageMapper.UpdateRemainWidth(Slot,width); |
| | | BigStorageCage bigStorageCage = new BigStorageCage(); |
| | | bigStorageCage.setRemainWidth(width); |
| | | UpdateWrapper<BigStorageCage> bigStorageCageWrapper = new UpdateWrapper<>(); |
| | | bigStorageCageWrapper.eq("remain_width", width); |
| | | baseMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | //1、获取大理片笼信息 |
| | | List<BigStorageCage> bigStorageCages = baseMapper.selectList(null); |
| | | log.info("1、获取大理片笼信息完成,获取到的数据{}", bigStorageCages.size()); |
| | | //2获取理片笼所有信息 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(null); |
| | | Map<Integer, List<BigStorageCageDetails>> listMap = bigStorageCageDetailsList.stream().collect(Collectors.groupingBy(BigStorageCageDetails::getSlot)); |
| | | for (BigStorageCage bigStorageCage : bigStorageCages) { |
| | | List<BigStorageCageDetails> bigStorageCageDetails = listMap.get(bigStorageCage.getSlot()); |
| | | bigStorageCage.setBigStorageCageDetails(bigStorageCageDetails); |
| | | } |
| | | return bigStorageCages; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import com.mes.uppattenusage.service.GlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PlcStorageCage extends Thread { |
| | | |
| | |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | try { |
| | | |
| | | Thread.sleep(500); |
| | | String plcFeedReq ="0"; |
| | | String plcFeedGlassid ="111"; |
| | | String plcFeedReq = "0"; |
| | | String plcFeedGlassid = "111"; |
| | | //Plc进片请求时 |
| | | if("1".equals(plcFeedReq)){ |
| | | BigStorageCageDetails bigStorageCageDetails=new BigStorageCageDetails(); |
| | | if ("1".equals(plcFeedReq)) { |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | //传入玻璃id |
| | | GlassInfo glassInfo=glassInfoService.getById(plcFeedGlassid); |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | |
| | | BigStorageCageDetails SlotInfo=bigStorageCageService.FeedGlass(glassInfo,bigStorageCageDetails); |
| | | if(SlotInfo!=null){ |
| | | BigStorageCageDetails SlotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (SlotInfo != null) { |
| | | //plc任务发送字 |
| | | } |
| | | } |
| | | |
| | | //出片请求 |
| | | String plcOutReq ="0"; |
| | | boolean result=false; |
| | | if("1".equals(plcOutReq)){ |
| | | String plcOutReq = "0"; |
| | | boolean result = false; |
| | | if ("1".equals(plcOutReq)) { |
| | | //获取钢化小片表未出笼信息 |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.SelectTemperingGlassInfo(); |
| | | //没有可出的玻璃时 |
| | | if(temperingGlassInfoList!=null){ |
| | | //查询是否有小片全部到齐的钢化版图 |
| | | result = bigStorageCageDetailsService.getTemperingGlass(); |
| | | }else{ |
| | | //继续当前钢化版图的任务 |
| | | |
| | | temperingGlassInfoService.addOutTask(temperingGlassInfoList); |
| | | result=true; |
| | | } |
| | | if(result==true){ |
| | | |
| | | if (result == true) { |
| | | //plc任务发送字 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |
copy from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/controller/GlassInfoController.java
copy to hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/glassinfo/controller/GlassInfoController.java
File was copied from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/controller/GlassInfoController.java |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | package com.mes.glassinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
File was renamed from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/entity/GlassInfo.java |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | package com.mes.glassinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/mapper/GlassInfoMapper.java |
| | |
| | | package com.mes.uppattenusage.mapper; |
| | | package com.mes.glassinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/service/GlassInfoService.java |
| | |
| | | package com.mes.uppattenusage.service; |
| | | package com.mes.glassinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/service/impl/GlassInfoServiceImpl.java |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.mes.uppattenusage.entity.GlassInfo; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.uppattenusage.mapper.GlassInfoMapper; |
| | | import com.mes.uppattenusage.service.GlassInfoService; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | |
| | | */ |
| | | public interface TemperingGlassInfoService extends IService<TemperingGlassInfo> { |
| | | public void addOutTask(List<TemperingGlassInfo> temperingGlassInfoList); |
| | | |
| | | public List<TemperingGlassInfo> SelectTemperingGlassInfo(); |
| | | } |
| | |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>cacheGlass</artifactId> |
| | | <artifactId>loadGlass</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>junit</groupId> |
| | |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | public class LoadGlassModuleApplication { |
| | | public static void main(String[] args) { |
| | | try { |
| | | SpringApplication.run(LoadGlassModuleApplication.class, args); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | |
| | | SpringApplication.run(LoadGlassModuleApplication.class, args); |
| | | } |
| | | } |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/controller/UpPattenUsageController.java |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | package com.mes.glassinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/entity/UpPattenUsage.java |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | package com.mes.glassinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/mapper/UpPattenUsageMapper.java |
| | |
| | | package com.mes.uppattenusage.mapper; |
| | | package com.mes.glassinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.entity.UpPattenUsage; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/UpPattenUsageService.java |
| | |
| | | package com.mes.uppattenusage.service; |
| | | package com.mes.glassinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.entity.UpPattenUsage; |
| | | |
| | | /** |
| | | * <p> |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/uppattenusage/service/impl/UpPattenUsageServiceImpl.java |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.entity.UpPattenUsage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.glassinfo.mapper.UpPattenUsageMapper; |
| | | import com.mes.glassinfo.service.UpPattenUsageService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
New file |
| | |
| | | package com.mes.workstation.controller; |
| | | |
| | | |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import com.mes.workstation.service.UpWorkstationService; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/LoadGlass") |
| | | @Slf4j |
| | | public class UpWorkstationController { |
| | | @Autowired |
| | | private UpWorkstationService upWorkstationService; |
| | | |
| | | @ApiOperation("显示工位上的玻璃信息") |
| | | @GetMapping("/list") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpWorkstation>> list() { |
| | | List<UpWorkstation> glass = upWorkstationService.list(); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @PostMapping("/updateGlassMessage") //修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id |
| | | @ResponseBody |
| | | public void updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | | upWorkstationService.updateGlassMessage(upwork); |
| | | } |
| | | |
| | | //todo: 和updateGlassMessage类似 |
| | | // @PostMapping("/deleteGlass") //修改一条工位的玻璃信息,传输工位id将玻璃信息相关字段更改为null |
| | | // @ResponseBody |
| | | // public void selectCutTerritory(int upworkid) { |
| | | // loadGlassService.deleteGlass(upworkid); |
| | | // } |
| | | |
| | | @PostMapping("/selectPriority") //开始上片任务 |
| | | @ResponseBody |
| | | public void selectPriority() { |
| | | upWorkstationService.selectPriority(); |
| | | } |
| | | } |
| | | |
copy from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/entity/GlassInfo.java
copy to hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/workstation/entity/GlassInfo.java
File was copied from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/entity/GlassInfo.java |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | package com.mes.workstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
New file |
| | |
| | | package com.mes.workstation.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author wu |
| | | */ |
| | | @Data |
| | | public class UpWorkSequence { |
| | | |
| | | private int sequence; |
| | | |
| | | private int number; |
| | | |
| | | } |
File was renamed from hangzhoumesParent/moduleService/LoadGlassModule/src/main/java/com/mes/upworkstation/entity/UpWorkstation.java |
| | |
| | | package com.mes.upworkstation.entity; |
| | | package com.mes.workstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
New file |
| | |
| | | package com.mes.workstation.mapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | import java.util.Map; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | @Mapper |
| | | public interface LoadGlassMapper extends BaseMapper<UpWorkstation> { |
| | | //判断优先工位吸片 |
| | | @Select("select b.layout_sequence,a.number from up_workstation a left join up_patten_usage b " + |
| | | "on a.pattern_width=b.width and a.pattern_heigth=b.width " + |
| | | "and a.pattern_thickness=b.thickness where a.workstation_id=#{id}") |
| | | Map<String,Object> selectPriority(int id); |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.workstation.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.workstation.entity.UpWorkSequence; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface UpWorkstationMapper extends BaseMapper<UpWorkstation> { |
| | | |
| | | List<UpWorkSequence> selectPriority(@Param("id") int id); |
| | | } |
New file |
| | |
| | | package com.mes.workstation.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.workstation.entity.UpWorkstation; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface UpWorkstationService extends IService<UpWorkstation> { |
| | | //PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | |
| | | //删除人工搬走的玻璃信息 |
| | | // public void deleteGlass(int id); |
| | | //判断是否可以吸片进行任务 |
| | | |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() ; |
| | | |
| | | |
| | | /** |
| | | * 增加人工输入的工位玻璃信息 |
| | | * @param upwork |
| | | */ |
| | | void updateGlassMessage(UpWorkstation upwork); |
| | | } |
New file |
| | |
| | | package com.mes.workstation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.S7object; |
| | | 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 org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class UpWorkstationServiceImpl extends ServiceImpl<UpWorkstationMapper, UpWorkstation> implements UpWorkstationService { |
| | | |
| | | public static final String DB_100_10 = "DB_100_10"; |
| | | |
| | | //判断是否可以吸片进行任务 |
| | | public boolean isCanLoadGlass() { |
| | | String loadstart="吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | return "1".equals(loadstart); |
| | | |
| | | } |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() { |
| | | //todo:判断是否可以吸片进行任务 |
| | | // String loadstart="吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); |
| | | // if (!"1".equals(loadstart)) { |
| | | // return; |
| | | // } |
| | | UpWorkSequence loadid1 = this.baseMapper.selectPriority(1).get(0); |
| | | UpWorkSequence loadid2 = this.baseMapper.selectPriority(2).get(0); |
| | | //判断一二号工位哪边的顺序更先 |
| | | if(loadid1.getSequence()>loadid2.getSequence()) { |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | }else if(loadid1.getSequence()==loadid2.getSequence()){ |
| | | //当两个工位上的玻璃数相同时,判断哪个工位上的玻璃数更少,优先清空一个架子 |
| | | int glassnum1=loadid1.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | int glassnum2=loadid2.getNumber();//Integer.parseInt(plcmes.getPlcParameter("玻璃数").getValue()); |
| | | if(glassnum1>glassnum2){ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)2); |
| | | }else{ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | } |
| | | }else{ |
| | | S7object.getinstance().plccontrol.WriteWord(DB_100_10, (short)1); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 增加人工输入的工位玻璃信息/删除人工搬走的玻璃信息 |
| | | * @param upwork |
| | | */ |
| | | @Override |
| | | public void updateGlassMessage(UpWorkstation upwork) { |
| | | UpdateWrapper<UpWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.eq("workstation_id", upwork.getWorkstationId()); |
| | | int update = this.baseMapper.update(upwork, updateWrapper); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | 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/ |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>cacheGlass</artifactId> |
| | | <artifactId>temperingGlass</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>junit</groupId> |
| | |
| | | package com.mes.temperingglass.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.temperingglass.entity.GlassInfo; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | @Mapper |
| | | public interface TemperingMapper extends BaseMapper<TemperingGlassInfo> { |
| | | |
| | | |
| | | //查询该玻璃的尺寸和坐标 |
| | | @Select("select *from glass_info where id=#{glassid};") |
| | | GlassInfo SelectGlass(String glassid); |
| | | //查询该玻璃的尺寸和坐标 |
| | | //@Select("select *from glass_info where id=#{glassid};") |
| | | //GlassInfo SelectGlass(String glassid); |
| | | //是否可以发送进炉信号 |
| | | @Select("select count(*) from glass_info where id=#{glassid};") |
| | | int SelectTempering(String glassid); |
| | | //查询等待中的钢化版图玻璃信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,count(state)state from tempering_glass_info GROUP BY flowcard_id,state)b on a.flowcard_id=b.flowcard_id where b.state=2") |
| | | List<TemperingGlassInfo> SelectWaitingGlass(); |
| | | //查询进炉中的钢化版图玻璃信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=1)b on a.flowcard_id=b.flowcard_id where b.state1=1") |
| | | List<TemperingGlassInfo> SelectInGlass(); |
| | | //查询钢化后的钢化版图信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=2)b on a.flowcard_id=b.flowcard_id where b.state1=2") |
| | | List <TemperingGlassInfo> SelectOutGlass(); |
| | | @Select("select count(*) from glass_info where id=#{glassid};") |
| | | int SelectTempering(String glassid); |
| | | |
| | | //查询等待中的钢化版图玻璃信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,count(state)state from tempering_glass_info GROUP BY flowcard_id,state)b on a.flowcard_id=b.flowcard_id where b.state=2") |
| | | List<TemperingGlassInfo> SelectWaitingGlass(); |
| | | |
| | | //查询进炉中的钢化版图玻璃信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=1)b on a.flowcard_id=b.flowcard_id where b.state1=1") |
| | | List<TemperingGlassInfo> SelectInGlass(); |
| | | |
| | | //查询钢化后的钢化版图信息 |
| | | @Select("select*from tempering_glass_info a left join (select flowcard_id,min(state)state1 from tempering_glass_info GROUP BY flowcard_id having state1=2)b on a.flowcard_id=b.flowcard_id where b.state1=2") |
| | | List<TemperingGlassInfo> SelectOutGlass(); |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.temperingglass.service; |
| | | import com.mes.temperingglass.entity.GlassInfo; |
| | | //import com.mes.temperingglass.entity.GlassInfo; |
| | | |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.tools.S7control; |
| | | import com.mes.temperingglass.mapper.TemperingMapper; |
| | | import java.util.List; |
| | | import com.mes.tools.S7control; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class TemperingService { |
| | | |
| | | |
| | | private final TemperingMapper temperingMapper; |
| | | private S7control s7control; |
| | | |
| | | public TemperingService(TemperingMapper temperingMapper) { |
| | | this.temperingMapper =temperingMapper; |
| | | this.temperingMapper = temperingMapper; |
| | | } |
| | | //接收id返回坐标和数据 |
| | | public GlassInfo SelectOutGlass (String glassid) { |
| | | GlassInfo GlassInfo = temperingMapper.SelectGlass(glassid); |
| | | return GlassInfo; |
| | | } |
| | | |
| | | // //接收id返回坐标和数据 |
| | | // public GlassInfo SelectOutGlass (String glassid) { |
| | | // GlassInfo GlassInfo = temperingMapper.SelectGlass(glassid); |
| | | // return GlassInfo; |
| | | // } |
| | | //发送坐标信息 |
| | | public void SendCoordinate (short glassX,short glassY) { |
| | | public void SendCoordinate(short glassX, short glassY) { |
| | | s7control.WriteWord("DB100.10", glassX); |
| | | s7control.WriteWord("DB100.10", glassY); |
| | | } |
| | | |
| | | //判断是否可以发送进炉信号 |
| | | public int SelectTempering (String glassid) { |
| | | public int SelectTempering(String glassid) { |
| | | int tempering = temperingMapper.SelectTempering(glassid); |
| | | if (tempering == 1) { |
| | | return 1; |
| | |
| | | <artifactId>unLoadGlass</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.9.0</version> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.2.4</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>dynamic-datasource-spring-boot-starter</artifactId> |
| | | <version>3.5.2</version> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | <version>2.8.9</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.2.4</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | <properties> |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/7 14:36 |
| | | * @Date: 2024/4/7 14:36RRRR |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | public class UnLoadGlassApplication { |
New file |
| | |
| | | package com.mes.common; |
| | | |
| | | import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.MultiAddressWrite; |
| | | import com.github.xingshuangs.iot.protocol.s7.service.S7PLC; |
| | | import com.google.common.primitives.Bytes; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class S7control { |
| | | |
| | | S7PLC s7PLC; // PLC通讯类实例 |
| | | private EPlcType plcType = EPlcType.S1500; // 西门子PLC类型 |
| | | private String ip = "192.168.10.1"; // plc ip地址 |
| | | private int port = 102; // plc 端口号 |
| | | |
| | | private static volatile S7control instance = null; |
| | | |
| | | private S7control() { |
| | | if (s7PLC == null) |
| | | s7PLC = new S7PLC(plcType, ip, port,0,0); |
| | | } |
| | | |
| | | // 单例模式 获取类的唯一实例 |
| | | public static S7control getinstance() { |
| | | if (instance == null) { |
| | | synchronized (S7control.class) { |
| | | if (instance == null) { |
| | | instance = new S7control(); |
| | | } |
| | | } |
| | | } |
| | | return instance; |
| | | } |
| | | |
| | | /** |
| | | * 关闭西门子s7通讯连接 |
| | | */ |
| | | public void CloseS7client() { |
| | | if (s7PLC == null) |
| | | s7PLC.close(); |
| | | s7PLC.checkConnected(); |
| | | } |
| | | |
| | | /** |
| | | * s7通讯连接状态 |
| | | */ |
| | | public boolean CheckConnected() { |
| | | return s7PLC.checkConnected(); |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个word |
| | | * |
| | | * @param address 地址 |
| | | * @param data word的值 |
| | | */ |
| | | public void WriteWord(String address, short data) { |
| | | if (s7PLC==null) |
| | | { |
| | | return; |
| | | } |
| | | s7PLC.writeInt16(address, data); |
| | | } |
| | | |
| | | /** |
| | | * 从某地址连续 写入多个word |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | public void WriteWord(String address, List<Short> datas) { |
| | | if (s7PLC==null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | List<String> addresslist = GetAddressList(address, datas.size(), 16); |
| | | MultiAddressWrite addressWrite = new MultiAddressWrite(); |
| | | for (int i = 0; i < datas.size(); i++) { |
| | | addressWrite.addInt16(addresslist.get(i), datas.get(i)); |
| | | } |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 写入多个word |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 按指定的地址 写入一个Bit |
| | | * |
| | | * @param address 地址 |
| | | * @param data Bit的值 |
| | | */ |
| | | public void WriteBit(String address, Boolean data) { |
| | | if (s7PLC==null) |
| | | return; |
| | | s7PLC.writeBoolean(address, data); |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 写入多个bit |
| | | * |
| | | * @param address 地址 |
| | | * @param datas bit的值 |
| | | */ |
| | | public void WriteBit(List<String> address, List<Boolean> datas) { |
| | | if (s7PLC==null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | |
| | | MultiAddressWrite addressWrite = new MultiAddressWrite(); |
| | | for (int i = 0; i < address.size(); i++) { |
| | | addressWrite.addBoolean(address.get(i), datas.get(i)); |
| | | } |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | |
| | | /** |
| | | * 从某地址连续 写入多个bit |
| | | * |
| | | * @param address 地址 |
| | | * @param datas word的值 |
| | | */ |
| | | public void WriteBit(String address, List<Boolean> datas) { |
| | | if (s7PLC==null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | List<String> addresslist = GetAddressList(address, datas.size(), 1); |
| | | MultiAddressWrite addressWrite = new MultiAddressWrite(); |
| | | for (int i = 0; i < datas.size(); i++) { |
| | | addressWrite.addBoolean(addresslist.get(i), datas.get(i)); |
| | | } |
| | | s7PLC.writeMultiData(addressWrite); |
| | | } |
| | | /** |
| | | * 按指定的地址 写入多个byte |
| | | * |
| | | * @param address 地址 |
| | | * @param datas byte的值 |
| | | */ |
| | | public void WriteByte(String address, byte[] datas) { |
| | | if (s7PLC==null) |
| | | return; |
| | | // s7PLC.write(address, data); |
| | | s7PLC.writeByte(address, datas); |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 读取word结果集 |
| | | * |
| | | * @param address 地址 |
| | | * @return 结果 |
| | | */ |
| | | public List<Short> ReadWord(List<String> address) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | try { |
| | | return s7PLC.readInt16(address); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | private int getIndexFromAddress(String address) { |
| | | |
| | | // 可以解析出地址中的数字部分,并转换为整数 |
| | | return 0; |
| | | } |
| | | |
| | | private String getAddressFromIndex(int index) { |
| | | |
| | | // 整数转换为地址格式的字符串 |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 读取word结果集 |
| | | * |
| | | * @param address 地址 |
| | | * @param count 连续读多少个word |
| | | * @return 结果 |
| | | */ |
| | | public List<Short> ReadWord(String address, int count) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | |
| | | List<String> addresslist = GetAddressList(address, count, 16); |
| | | try { |
| | | return s7PLC.readInt16(addresslist); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 读取byte结果集 |
| | | * |
| | | * @param address 地址 |
| | | * @param count 连续读多少个byte |
| | | * @return 结果 |
| | | */ |
| | | public byte[] ReadByte(String address, int count) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | // List<String> addresslist = GetAddressList(address, count, 16); |
| | | |
| | | try { |
| | | return s7PLC.readByte(address, count); |
| | | }catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 按指定的地址 按bit位 0 flase 1 true 读取结果 |
| | | * |
| | | * @param addresslist 地址集 |
| | | * @return Boolean结果 |
| | | */ |
| | | public List<Boolean> ReadBits(List<String> addresslist) { |
| | | if (s7PLC==null) |
| | | return null; |
| | | return s7PLC.readBoolean(addresslist); |
| | | } |
| | | //读取不连续地址bit |
| | | public List<Boolean> readBits(List<String> addressList) { |
| | | if (s7PLC == null || addressList.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | List<Boolean> values = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | boolean value = s7PLC.readBoolean(address); |
| | | values.add(value); |
| | | } catch (Exception e) { |
| | | // 处理异常 |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | |
| | | //读取String |
| | | public List<String> readStrings(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public List<String> readStringsandword(List<String> addressList) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | List<String> result = new ArrayList<>(); |
| | | for (String address : addressList) { |
| | | try { |
| | | if (address.contains("-")) { |
| | | address = address.substring(0, address.indexOf("-")); |
| | | |
| | | byte[] bytes = s7PLC.readByte(address, 14); |
| | | if (bytes != null) { |
| | | String str = new String(bytes, StandardCharsets.UTF_8); |
| | | result.add(str); |
| | | } |
| | | |
| | | } else { |
| | | Short value = s7PLC.readInt16(address); |
| | | result.add(value.toString()); |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | result.add(null); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | //不连续地址写入Word |
| | | public void WriteWord(List<String> address, List<Short> datas) { |
| | | if (s7PLC == null) |
| | | return; |
| | | |
| | | for (int i = 0; i < address.size(); i++) { |
| | | String addr = address.get(i); |
| | | short data = datas.get(i); |
| | | |
| | | if (addr.contains("-")) { |
| | | outmesid(String.valueOf(data),addr); // 单独处理带破折号的地址 |
| | | } else { |
| | | s7PLC.writeInt16(addr, data); // 将数据写入单个地址 |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //字符串写入 |
| | | public void outmesid(String data, String addr) { |
| | | // System.out.println("outmesid: " + data); |
| | | List<Byte> glassidlist = new ArrayList<>(); |
| | | String[] parts = addr.split("-"); |
| | | if (parts.length == 2) { |
| | | addr = parts[0]; // 只保留 "-" 前面的部分 |
| | | } |
| | | for (char iditem : data.toCharArray()) { |
| | | glassidlist.add(Byte.valueOf(String.valueOf(iditem))); |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | S7control.getinstance().WriteByte(addr, bytes); |
| | | } |
| | | |
| | | //读取不连续word |
| | | public List<Short> readWords(List<String> addresses) { |
| | | if (s7PLC == null) { |
| | | return null; |
| | | } |
| | | |
| | | List<Short> data = new ArrayList<>(); |
| | | |
| | | for (String address : addresses) { |
| | | try { |
| | | |
| | | // 单个地址 |
| | | Short value = s7PLC.readInt16(address); |
| | | data.add(value); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | |
| | | } |
| | | |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | //读取时间 |
| | | public Long readtime(String address) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | try { |
| | | return s7PLC.readTime(address); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |
| | | public void writetime(String address, long datas) { |
| | | if (s7PLC == null) |
| | | return; |
| | | |
| | | |
| | | s7PLC.writeTime(address, datas); // 将数据写入单个地址 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private int extractAddressNumber(String address) { |
| | | String numberStr = address.replaceAll("\\D+", ""); // 使用正则表达式提取数字部分 |
| | | return Integer.parseInt(numberStr); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 从指定的地址开始 连续按bit位读取 |
| | | * |
| | | * @param address 地址 |
| | | * @param count 长度 |
| | | * @return Boolean结果 |
| | | */ |
| | | public List<Boolean> ReadBits(String address, int count) { |
| | | if (s7PLC == null) |
| | | return null; |
| | | List<String> addresslist = GetAddressList(address, count, 1); |
| | | try { |
| | | return s7PLC.readBoolean(addresslist); |
| | | } catch (Exception e) { |
| | | System.out.println("读取 " + address + " 失败:" + e.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | | }; |
| | | |
| | | |
| | | public void writeString(String addr,String data) { |
| | | s7PLC.writeString(addr,data); |
| | | } |
| | | |
| | | |
| | | |
| | | private List<String> GetAddressList(String address, int count, int addedbit) { |
| | | List<String> addresslist = new ArrayList<String>(); |
| | | |
| | | String[] stringdatas = address.trim().split("\\."); |
| | | if (stringdatas.length < 2 || !address.startsWith("DB")) |
| | | return null; |
| | | int dbwindex = 0; |
| | | int bitindex = 0; |
| | | if (stringdatas.length == 2) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | } else if (stringdatas.length == 3) { |
| | | dbwindex = Integer.parseInt(stringdatas[1]); |
| | | bitindex = Integer.parseInt(stringdatas[2]); |
| | | } else |
| | | return null; |
| | | |
| | | addresslist.add(address); |
| | | for (int i = 0; i < count-1; i++) { |
| | | |
| | | int bitcurrent = bitindex + addedbit; |
| | | if (bitcurrent > 7) { |
| | | dbwindex += bitcurrent / 8; |
| | | bitindex = 0; |
| | | } else |
| | | bitindex = bitcurrent; |
| | | |
| | | String endstr=stringdatas.length==3?"." + bitindex:""; |
| | | addresslist.add(stringdatas[0] + "." + dbwindex + endstr); |
| | | } |
| | | return addresslist; |
| | | } |
| | | } |
| | |
| | | package com.mes.config; |
| | | |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.Plchome; |
| | | |
| | | import com.mes.device.PLCAutoMes; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.annotation.Order; |
| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import io.swagger.annotations.Api; |
| | | 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.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Api(tags = "下料信息") |
| | | @RestController |
| | | @RequestMapping("/downGlassInfo") |
| | | public class DownGlassInfoController { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // Other endpoints can be added for CRUD operations |
| | | } |
| | |
| | | package com.mes.downglassinfo.controller; |
| | | |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.uppattenusage.service.GlassInfoService; |
| | | 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.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private Double thickness; |
| | | |
| | | |
| | | private int Filmsid; |
| | | private String Filmsid; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | @Repository |
| | | public interface DownGlassInfoMapper extends BaseMapper<DownGlassInfo> { |
| | | |
| | | // 查询下片任务表中状态为1的下片信息 |
| | | List<DownGlassInfo> selectunloadingtaskstate(); |
| | | // @Select("SELECT MAX(sequence) FROM down_glass_info WHERE flow_card_id = #{flowCardId} LIMIT 1") |
| | | // Integer getMaxSequenceByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | //// |
| | | // @Delete("delete from down_glass_task where flow_card_id = #{flowCardId}") |
| | | // void deletetask(@Param("flowCardId") String flowCardId); |
| | | |
| | | void updateTaskStateToZero(@Param("flowCardId") String flowCardId); |
| | | |
| | | Integer getMaxSequenceByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | | void deletetask(@Param("flowCardId") String flowCardId); |
| | | } |
| | |
| | | package com.mes.downglassinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface DownGlassTaskMapper extends BaseMapper<DownGlassTask> { |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface DownGlassInfoService extends IService<DownGlassInfo> { |
| | | |
| | | |
| | | |
| | | |
| | | Integer getMaxSequenceByFlowCardId(String flowCardId); |
| | | void insertDownGlassInfo(DownGlassInfo downGlassInfo); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | */ |
| | | public interface DownGlassTaskService extends IService<DownGlassTask> { |
| | | |
| | | List<DownGlassTask> getUnloadingTaskState(); |
| | | |
| | | void updateTaskStateToZero(String flowCardId); |
| | | void deleteTask(String flowCardId); |
| | | |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | Integer insertCacheTask(int id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId); |
| | | } |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.mapper.DownGlassInfoMapper; |
| | | import com.mes.downglassinfo.service.DownGlassInfoService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Service |
| | | public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService { |
| | | |
| | | // 根据流程卡号查询最大序号 |
| | | @Override |
| | | public Integer getMaxSequenceByFlowCardId(String flowCardId) { |
| | | QueryWrapper<DownGlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowCardId); |
| | | queryWrapper.orderByDesc("sequence"); // 按照序号倒序排序 |
| | | queryWrapper.select("sequence").last("LIMIT 1"); // 选择最大序号并限制结果为1条记录 |
| | | DownGlassInfo downGlassInfo = baseMapper.selectOne(queryWrapper); |
| | | if (downGlassInfo != null) { |
| | | return downGlassInfo.getSequence(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void insertDownGlassInfo(DownGlassInfo downGlassInfo) { |
| | | baseMapper.insert(downGlassInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downglassinfo.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.mapper.DownGlassTaskMapper; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class DownGlassTaskServiceImpl extends ServiceImpl<DownGlassTaskMapper, DownGlassTask> implements DownGlassTaskService { |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownGlassTask> getUnloadingTaskState() { |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("task_stauts", 1); |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(String flowCardId) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 0).eq("flow_card_id", flowCardId); |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | @Override |
| | | public void deleteTask(String flowCardId) { |
| | | LambdaQueryWrapper<DownGlassTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(DownGlassTask::getFlowCardId, flowCardId); |
| | | |
| | | baseMapper.delete(queryWrapper); |
| | | } |
| | | @Override |
| | | public DownGlassTask selectLastOutCacheInfo(String endCell) { |
| | | QueryWrapper<DownGlassTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("task_type", "2") |
| | | .eq("task_status", "2") |
| | | .eq("end_cell", endCell) |
| | | .last("LIMIT 1"); |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | @Override |
| | | public Integer insertCacheTask(int id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId) { |
| | | DownGlassTask glassInfo = new DownGlassTask(); |
| | | glassInfo.setId(id); |
| | | glassInfo.setStartCell(start); |
| | | glassInfo.setEndCell(end); |
| | | glassInfo.setTaskType(type); |
| | | glassInfo.setWidth(width); |
| | | glassInfo.setHeight(height); |
| | | glassInfo.setFilmsid(filmsId); |
| | | glassInfo.setThickness(thickness); |
| | | glassInfo.setFlowCardId(flowCardId); |
| | | glassInfo.setTaskStauts(0); // 默认任务状态为0 |
| | | |
| | | int rows = baseMapper.insert(glassInfo); |
| | | return rows > 0 ? rows : null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @RequestMapping("/downStorageCage") |
| | | public class DownStorageCageController { |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.downstorage.controller; |
| | | |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/downStorageCageDetails") |
| | | @RequestMapping("/down-storage-cage-details") |
| | | public class DownStorageCageDetailsController { |
| | | |
| | | } |
| | | @Autowired |
| | | private DownStorageCageDetailsService downStorageCageDetailsService; |
| | | |
| | | @PostMapping("/add") |
| | | public String addDownStorageCageDetails(@RequestBody DownStorageCageDetails details) { |
| | | downStorageCageDetailsService.addDownStorageCageDetails(details); |
| | | return "Details added successfully"; |
| | | } |
| | | |
| | | // Other CRUD operations can be defined here |
| | | } |
| | |
| | | */ |
| | | private Integer temperingFeedSequence; |
| | | |
| | | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private int filmsid; |
| | | /** |
| | | * 状态 |
| | | */ |
| | |
| | | package com.mes.downstorage.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | public interface DownStorageCageDetailsMapper extends BaseMapper<DownStorageCageDetails> { |
| | | // |
| | | // @Select("select * from `glass_info` where id=#{id}") |
| | | // GlassInfo SelectGlassId(String id); |
| | | // 查询笼子内空闲 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot") |
| | | List<DownStorageCageDetails> SelectCacheLeisure(); |
| | | |
| | | // 查询符合工位的出片玻璃 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN #{start} and #{end} order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectCacheOut(int start,int end); |
| | | |
| | | // 查询笼子内信息 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot") |
| | | List<DownStorageCageDetails> SelectCachInfo(); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null and escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, |
| | | double width); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id<#{tempering_layout_id} and esc.remain_width-#{width}>0 order by escd.tempering_layout_id desc,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, double width); |
| | | |
| | | // // 查询全部任务 |
| | | // @Select("select * from down_glass_task") |
| | | // List<DownGlassTask> SelectCacheInfoAll(); |
| | | // |
| | | // // 查询进片任务 |
| | | // @Select("select * from down_glass_task where task_type='1' and task_stauts='0'") |
| | | // List<DownGlassTask> SelectInputCacheInfo(); |
| | | // |
| | | // // 查询出片任务 |
| | | // @Select("select * from down_glass_task where task_type='2' and task_stauts='0'") |
| | | // List<DownGlassTask> SelectOutCacheInfo(); |
| | | |
| | | // 查询 A06 或 A11 最新的一片 出片任务 |
| | | // @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | // GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | |
| | | // 修改笼子内信息 |
| | | // @Update("update") |
| | | // Integer UpdateCache(@Param("id") Integer id, @Param("order_id") String order_id); |
| | | |
| | | // 添加下片任务 |
| | | @Insert("INSERT into down_glass_task VALUES(#{id},#{start},#{end},#{type},0,)") |
| | | Integer insertCacheTask(String id, String start, String end, String type,double width,double height,Integer filmsId,double thickness,String flowCardId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.downstorage.service; |
| | | |
| | | import com.mes.common.PLCAutoMes; |
| | | import com.mes.common.S7control; |
| | | import com.mes.device.PlcParameterObject; |
| | | |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @Service |
| | | public class DownGlassCacheLogic { |
| | | @Autowired |
| | | private DownStorageCageDetailsMapper selectInfo; |
| | | private GlassInfoService GlassInfoService; |
| | | private DownStorageCageDetailsService downStorageCageDetailsService; |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | /** |
| | | * @param Number |
| | | * //识别逻辑 不交互 |
| | | */ |
| | | |
| | | public void identify(String Number){ |
| | | //查询任务 |
| | | PlcParameterObject plcmes= PLCAutoMes.PlcMesObject; |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | String s=S7control.getinstance().ReadWord("DB14.26", 1).get(0)+""; |
| | | boolean isexist=isExist(Number); |
| | | if (isexist) { |
| | | //存在逻辑 1.添加信息 2.回复PLC存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | }else { |
| | | //不存在逻辑 1.回复PLC不存在 |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | } |
| | | } |
| | | //下片前理片 |
| | | public static final String RESULT_IN = "1"; |
| | | public static final String RESULT_OUT = "2"; |
| | | public static final String RESULT_IN_OUT = "3"; |
| | | |
| | | public void process() { |
| | | String result = S7control.getinstance().ReadWord("DB14.0", 1).get(0) + ""; |
| | | String number = S7control.getinstance().ReadWord("DB14.2", 1).get(0) + ""; |
| | | |
| | | // 进片请求 |
| | | if (RESULT_IN.equals(result)) { |
| | | processInto(number); |
| | | } |
| | | // 出片请求 |
| | | else if (RESULT_OUT.equals(result)) { |
| | | processOut(); |
| | | } |
| | | // 进出片请求 |
| | | else if (RESULT_IN_OUT.equals(result)) { |
| | | // 先出后进 |
| | | if (!processOut()) { |
| | | processInto(number); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * //下片前理片 进 |
| | | */ |
| | | |
| | | public boolean processInto(String Number){ |
| | | GlassInfoService = WebSocketServer.applicationContext.getBean(GlassInfoService.class); |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | //存在此玻璃编号 |
| | | if(GlassInfo!=null){ |
| | | //同钢化版图内的栅格号 |
| | | List<DownStorageCageDetails> list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(),GlassInfo.getTemperingFeedSequence(),GlassInfo.getWidth()); |
| | | //空栅格号 |
| | | if (list.size()==0) { |
| | | list=selectInfo.SelectCacheLeisure(); |
| | | } |
| | | //小于此玻璃钢化版图序号的栅格号 |
| | | if(list.size()==0){ |
| | | list=selectInfo.SelectIsExistIntoCache(GlassInfo.getTemperingLayoutId(),GlassInfo.getWidth()); |
| | | } |
| | | if(list.size()>0){ |
| | | //存在空格 |
| | | //1.生成任务: 起始位置0 结束位置this.slot 任务类型 1 (进片任务) |
| | | //2.回复 1进片 |
| | | DownStorageCageDetails item=list.get(0); |
| | | selectInfo.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1",GlassInfo.getWidth(),GlassInfo.getHeight(),GlassInfo.getFilmsid(),GlassInfo.getThickness(),GlassInfo.getFlowcardId()); |
| | | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | return true; |
| | | } |
| | | |
| | | }else{ |
| | | // ID编号不存在 不处理/回复PLC 进行报警提示 |
| | | } |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | //理片 出 |
| | | public boolean processOut() { |
| | | // 查询任务 |
| | | String G06 = S7control.getinstance().ReadWord("DB14.56", 1).get(0) + ""; |
| | | String G11 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + ""; |
| | | String G13 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + ""; |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | List<DownStorageCageDetails> list = selectInfo.SelectCacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = selectInfo.SelectCacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = selectInfo.SelectCacheOut(1, 10); |
| | | |
| | | // 按照顺序符合前端出片 |
| | | if (!list.isEmpty()) { |
| | | DownStorageCageDetails item = list.get(0); |
| | | if (G06.equals("0") && G11.equals("1")) { |
| | | // 出到 G06 |
| | | selectInfo.insertCacheTask(item.getGlassId() + "", "0", "06", "2", item.getWidth(), item.getHeight(), item.getFilmsid(), item.getThickness(), item.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | // 按照顺序符合后端出片 |
| | | } else if (!list2.isEmpty()) { |
| | | DownStorageCageDetails item2 = list2.get(0); |
| | | if (G06.equals("1") && G11.equals("0")) { |
| | | // 出到 G11 |
| | | selectInfo.insertCacheTask(item2.getGlassId() + "", "0", "11", "2", item2.getWidth(), item2.getHeight(), item2.getFilmsid(), item2.getThickness(), item2.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | // 超出尺寸优先人工出片 人工处理 |
| | | } else if (!list3.isEmpty()) { |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | | if (item3.getHeight() >= 3440 && item3.getWidth() >= 1440) { |
| | | |
| | | String endcell = "06"; |
| | | String SendEndcell = "1"; |
| | | |
| | | selectInfo.insertCacheTask(item3.getGlassId() + "", "0", endcell, "2", item3.getWidth(), item3.getHeight(), item3.getFilmsid(), item3.getThickness(), item3.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | //查询是否绑定架子 |
| | | // public boolean selectFlowCardId(String FlowCardId){ |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * @param Number |
| | | * //磨边 不交互 理片和磨边机自己交互 |
| | | */ |
| | | |
| | | public void processMb(String Number){ |
| | | //按id查询玻璃信息表里的玻璃 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | if(GlassInfo!=null){ |
| | | //发送任务 ID 长 宽 厚 倒角 工艺功能等 |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.22").getAddress(),"N10000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.24").getAddress(), "1000"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.26").getAddress(),"800"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(),"60"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.30").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | } |
| | | //返回结果 |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * 查询消息队列里此玻璃ID的数据 |
| | | */ |
| | | public boolean selectMessageId(String Number){ |
| | | //查询是否存在 |
| | | |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | //返回 不存在 |
| | | return false; |
| | | |
| | | } |
| | | //返回 存在 |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * 删除消息队列里此玻璃ID的数据 |
| | | */ |
| | | |
| | | public boolean deleteMessageId(String Number){ |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | //返回 不存在 |
| | | return false; |
| | | } |
| | | //返回 存在 |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @param Number |
| | | * @return |
| | | * //是否存在此编号玻璃 |
| | | */ |
| | | public boolean isExist(String Number){ |
| | | //查询是否存在 |
| | | GlassInfo GlassInfo=GlassInfoService.selectGlassId(Number); |
| | | if(GlassInfo==null){ |
| | | //返回 不存在 |
| | | return false; |
| | | } |
| | | //返回 存在 |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.mes.downstorage.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface DownStorageCageDetailsService extends IService<DownStorageCageDetails> { |
| | | public interface DownStorageCageDetailsService { |
| | | |
| | | void addDownStorageCageDetails(DownStorageCageDetails details); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface DownStorageCageService extends IService<DownStorageCage> { |
| | | |
| | | public List<Map> gettask(); |
| | | } |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | import com.mes.downstorage.service.DownStorageCageDetailsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Service |
| | | public class DownStorageCageDetailsServiceImpl extends ServiceImpl<DownStorageCageDetailsMapper, DownStorageCageDetails> implements DownStorageCageDetailsService { |
| | | |
| | | @Override |
| | | public void addDownStorageCageDetails(DownStorageCageDetails details) { |
| | | this.save(details); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // Other business methods can be implemented here |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downstorage.mapper.DownStorageCageMapper; |
| | | import com.mes.downstorage.service.DownStorageCageService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class DownStorageCageServiceImpl extends ServiceImpl<DownStorageCageMapper, DownStorageCage> implements DownStorageCageService { |
| | | |
| | | @Autowired |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | @Override |
| | | public List<Map> gettask(){ |
| | | downStorageCageMapper.selectList(null); |
| | | // downStorageCageMapper.selectJoin(); |
| | | return null; |
| | | }; |
| | | } |
| | |
| | | |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import com.mes.uppattenusage.service.GlassInfoService; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/downWorkstation") |
| | | @RequestMapping("/api/unLoadGlass") |
| | | public class DownWorkstationController { |
| | | |
| | | @Autowired |
| | |
| | | @GetMapping("/getone") |
| | | public ResponseEntity<?> getOneDownWorkstations() { |
| | | try { |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(); |
| | | List<DownWorkstation> data = downWorkstationService.getoneDownWorkstations(1,5); |
| | | // 构建符合预期格式的响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | responseData.put("code", 200); |
| | |
| | | |
| | | @GetMapping("/gettwo") |
| | | public List<DownWorkstation> gettwoDownWorkstations() { |
| | | return downWorkstationService.gettwoDownWorkstations(); |
| | | return downWorkstationService.getoneDownWorkstations(6,10); |
| | | } |
| | | @GetMapping("/getflowCardId") |
| | | public ResponseEntity<Map<String, Object>> getflowCardId() { |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | | try { |
| | | List<Map<String, Object>> data = downWorkstationService.getflowCardId(); |
| | | List<Map<String, Object>> data = glassInfoService.getFlowCardId(); |
| | | responseData.put("code", 200); |
| | | responseData.put("msg", "成功"); |
| | | responseData.put("data", data); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | //绑定架子 |
| | | @PostMapping("/updateFlowCardId") |
| | | public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) { |
| | | // 从 requestData 中获取传入的 flowCardId |
| | |
| | | int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId); |
| | | |
| | | // 更新 down_workstation 表中的总数量 |
| | | glassInfoService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | |
| | | // 构建响应数据 |
| | | Map<String, Object> responseData = new HashMap<>(); |
| | |
| | | package com.mes.downworkstation.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | package com.mes.downworkstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | |
| | | private Integer workState; |
| | | |
| | | |
| | | @TableField("total_quantity") |
| | | private Integer totalquantity; |
| | | |
| | | @TableField("racks_number") |
| | | private Integer Racksnumber; |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import org.apache.ibatis.annotations.*; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | |
| | | @Repository |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源 |
| | | |
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> { |
| | | |
| | | |
| | | //查询工位表和任务表中状态为1的流程卡号和已落架数量 |
| | | @Select("SELECT dwt.flow_card_id,dw.id,dw.racks_number FROM down_workstation_task dwt JOIN down_workstation dw ON dwt.flow_card_id = dw.flow_card_id WHERE dwt.state = 1 LIMIT 1") |
| | | List<DownWorkstation> selectdownWorkstationstate(); |
| | | |
| | | |
| | | // @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;") |
| | | // List<DownGlassTask> selectunloadingtaskstate(); |
| | | //更新落架数量 |
| | | @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " + |
| | | "WHERE flow_card_id = #{flowCardId}") |
| | | void update_racks_number(@Param("flowCardId") String flowCardId, |
| | | @Param("racksNumber") Integer racksNumber); |
| | | // @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " + |
| | | // "WHERE flow_card_id = #{flowCardId}") |
| | | // void update_racks_number(@Param("flowCardId") String flowCardId, |
| | | // @Param("racksNumber") Integer racksNumber); |
| | | |
| | | //插入机械任务表 |
| | | @Insert("INSERT INTO down_workstation_task (flow_card_id, width, height, thickness, filmsid,state) " + |
| | | "VALUES (#{flowCardId}, #{width}, #{height}, #{thickness}, #{filmsid},1)") |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | // @Insert("INSERT INTO down_workstation_task (flow_card_id, width, height, thickness, filmsid,state) " + |
| | | // "VALUES (#{flowCardId}, #{width}, #{height}, #{thickness}, #{filmsid},1)") |
| | | // void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | //根据工位id更新实体类接收的数据 |
| | | @Update("UPDATE down_workstation SET width = #{width}, height = #{height}, flow_card_id = #{flowCardId} WHERE workstation_id = #{workstationId}") |
| | | void updateFlowCardId(DownWorkstation downWorkstation); |
| | | // @Update("UPDATE down_workstation SET width = #{width}, height = #{height}, flow_card_id = #{flowCardId} WHERE workstation_id = #{workstationId}") |
| | | // void updateFlowCardId(DownWorkstation downWorkstation); |
| | | |
| | | |
| | | |
| | | //满架拉走,清空信息 |
| | | @Update("UPDATE down_workstation SET width = null, height = null, flow_card_id = null WHERE workstation_id = #{workstationId}") |
| | | void clearFlowCardId(DownWorkstation downWorkstation); |
| | | |
| | | |
| | | |
| | | @Update("UPDATE down_workstation_task SET state = 0 WHERE flow_card_id = #{flowCardId}") |
| | | void update_task_state_to_zero(@Param("flowCardId") String flowCardId); |
| | | // @Update("UPDATE down_workstation_task SET state = 0 WHERE flow_card_id = #{flowCardId}") |
| | | // void update_task_state_to_zero(@Param("flowCardId") String flowCardId); |
| | | |
| | | |
| | | @Select(" SELECT * FROM down_workstation WHERE workstation_id >= 1 AND workstation_id <= 5") |
| | | List<DownWorkstation> getoneDownWorkstations(); |
| | | |
| | | |
| | | @Select(" SELECT * FROM down_workstation WHERE workstation_id >= 6 AND workstation_id <= 10") |
| | | List<DownWorkstation> gettwoDownWorkstations(); |
| | | // @Select("SELECT * FROM down_workstation WHERE workstation_id BETWEEN #{startId} AND #{endId}") |
| | | // List<DownWorkstation> getDownWorkstationsInRange(@Param("startId") int startId, @Param("endId") int endId); |
| | | |
| | | |
| | | |
| | | @Select("SELECT DISTINCT flowcard_id from glass_info") |
| | | @ResultType(Map.class) |
| | | List<Map<String, Object>> getflowCardId(); |
| | | // @Select("SELECT DISTINCT flowcard_id from glass_info") |
| | | // @ResultType(Map.class) |
| | | // List<Map<String, Object>> getflowCardId(); |
| | | |
| | | @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = 0, racks_number = 0 WHERE workstation_id = #{workstationId}") |
| | | void clearFlowCardInfoByWorkstationId(@Param("workstationId") int workstationId); |
| | | // @Update("UPDATE down_workstation SET flow_card_id = NULL, total_quantity = 0, racks_number = 0 WHERE workstation_id = #{workstationId}") |
| | | // void clearFlowCardInfoByWorkstationId(@Param("workstationId") int workstationId); |
| | | |
| | | // 获取总数量 |
| | | @Select("SELECT total_quantity FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | int getTotalQuantity(@Param("workstationId") int workstationId); |
| | | // @Select("SELECT total_quantity FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | // int getTotalQuantity(@Param("workstationId") int workstationId); |
| | | |
| | | // 获取落架数量 |
| | | @Select("SELECT racks_number FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | int getRacksNumber(@Param("workstationId") int workstationId); |
| | | // @Select("SELECT racks_number FROM down_workstation WHERE workstation_id = #{workstationId}") |
| | | // int getRacksNumber(@Param("workstationId") int workstationId); |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface DownWorkstationTaskMapper extends BaseMapper<DownWorkstationTask> { |
| | | |
| | | List<DownWorkstationTask> selectList(); |
| | | |
| | | DownWorkstation selectdownWorkstationstate(); |
| | | } |
| | |
| | |
|
| | | import com.mes.common.PLCAutoMes;
|
| | | import com.mes.downglassinfo.entity.DownGlassInfo;
|
| | | import com.mes.downglassinfo.entity.DownGlassTask;
|
| | | import com.mes.downglassinfo.service.DownGlassInfoService;
|
| | | import com.mes.downglassinfo.service.DownGlassTaskService;
|
| | | import com.mes.downstorage.entity.DownStorageCageDetails;
|
| | | import com.mes.downworkstation.entity.DownWorkstation;
|
| | | import com.mes.device.PlcParameterObject;
|
| | |
| | | private DownWorkstation downWorkstation;
|
| | | private DownGlassInfoMapper downGlassInfoMapper;
|
| | | private DownGlassInfoService downGlassInfoService;
|
| | | private DownGlassTaskService downGlassTaskService;
|
| | | private DownWorkstationMapper downWorkstationMapper;
|
| | | private DownWorkstationService downWorkstationService;
|
| | | private DownWorkstationTaskService downWorkstationTaskService;
|
| | | PlcParameterObject plcread = PLCAutoMes.PlcReadObject;
|
| | | /**
|
| | | * // 机械手1PLC请求字
|
| | |
| | | public void insertdownglassinfo() {
|
| | |
|
| | |
|
| | | downWorkstationMapper = WebSocketServer.applicationContext.getBean(DownWorkstationMapper.class);
|
| | | downWorkstationMapper = WebSocketServer.applicationContext.getBean(DownWorkstationMapper.class);
|
| | | downWorkstationService = WebSocketServer.applicationContext.getBean(DownWorkstationService.class);
|
| | | downWorkstationTaskService = WebSocketServer.applicationContext.getBean(DownWorkstationTaskService.class);
|
| | | downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class);
|
| | | downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
|
| | | List<DownGlassInfo> taskdownGlassInf = downGlassInfoMapper.selectunloadingtaskstate();
|
| | | downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
|
| | | downGlassTaskService = WebSocketServer.applicationContext.getBean(DownGlassTaskService.class);
|
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState();
|
| | | //
|
| | |
|
| | |
|
| | | if (taskdownGlassInf != null && !taskdownGlassInf.isEmpty()) {
|
| | |
|
| | | //
|
| | |
|
| | |
|
| | | for (DownGlassInfo downGlassInfo : taskdownGlassInf) {
|
| | | for (DownGlassTask downGlassInfo : taskdownGlassInf) {
|
| | | // 创建新的 DownGlassInfo 对象并设置相关属性
|
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo();
|
| | |
|
| | | newdownGlassInfo.setFlowCardId(downGlassInfo.getFlowCardId());
|
| | | Integer maxSequence = downGlassInfoMapper.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId());
|
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId());
|
| | | // 初始化顺序字段值
|
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1;
|
| | |
|
| | |
| | | newdownGlassInfo.setSequence(sequence);
|
| | |
|
| | | // 插入数据到下片玻璃信息表
|
| | | downGlassInfoMapper.insert(newdownGlassInfo);
|
| | | downGlassInfoService.insertDownGlassInfo(newdownGlassInfo);
|
| | | //插入数据到机械手任务表
|
| | | downWorkstationMapper.insertdownWorkstationtask(newdownGlassInfo);
|
| | |
|
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo);
|
| | | //更新下片任务表状态为0
|
| | | downGlassInfoMapper.updateTaskStateToZero(downGlassInfo.getFlowCardId());
|
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getFlowCardId());
|
| | |
|
| | | sequence++; // 递增顺序字段值
|
| | |
|
| | |
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) {
|
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录
|
| | | for (DownWorkstation downWorkstation : taskdownWorkstation) {
|
| | |
|
| | | //更新下片工位表中已落架数量
|
| | | downWorkstationMapper.update_racks_number(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
|
| | |
|
| | | downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
|
| | | //更新机械任务表中状态为0
|
| | | downWorkstationMapper.update_task_state_to_zero(downWorkstation.getFlowCardId());
|
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId());
|
| | | //删除下片任务表中的记录
|
| | | downGlassInfoMapper.deletetask(downWorkstation.getFlowCardId());
|
| | | downGlassTaskService.deleteTask(downWorkstation.getFlowCardId());
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * @param downWorkstation // 绑定流程卡号架子
|
| | | */
|
| | |
|
| | | public void bindingshelf(DownWorkstation downWorkstation) {
|
| | | downWorkstationMapper.updateFlowCardId(downWorkstation);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * @param downWorkstation // 满架拉走 清除流程卡信息
|
| | | */
|
| | |
|
| | | public void clearFlowCardId(DownWorkstation downWorkstation) {
|
| | |
|
| | | downWorkstationMapper.clearFlowCardId(downWorkstation);
|
| | | }
|
| | | // public void clearFlowCardId(DownWorkstation downWorkstation) {
|
| | | //
|
| | | // downWorkstationMapper.clearFlowCardId(downWorkstation);
|
| | | // }
|
| | |
|
| | |
|
| | | }
|
| | | } |
| | |
| | | */ |
| | | public interface DownWorkstationService extends IService<DownWorkstation> { |
| | | |
| | | List<DownWorkstation> getoneDownWorkstations(); |
| | | |
| | | List<DownWorkstation> gettwoDownWorkstations(); |
| | | |
| | | List<Map<String, Object>> getflowCardId(); |
| | | List<DownWorkstation> getoneDownWorkstations(int startId, int endId); |
| | | |
| | | int getTotalQuantity(int workstationId); |
| | | |
| | | int getRacksNumber(int workstationId); |
| | | |
| | | void clearFlowCardId(int workstationId); |
| | | |
| | | void updateracksnumber( String flowCardId, int racksnumber); |
| | | |
| | | |
| | | int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId); |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | |
| | | /** |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface DownWorkstationTaskService extends IService<DownWorkstationTask> { |
| | | |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | void updateTaskStateToZero(String flowCardId); |
| | | } |
| | |
| | | package com.mes.downworkstation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private DownWorkstationMapper downWorkstationMapper; |
| | | private DownWorkstationTaskMapper downWorkstationTaskMapper; |
| | | |
| | | @Override |
| | | public List<DownWorkstation> getoneDownWorkstations() { |
| | | return downWorkstationMapper.getoneDownWorkstations(); |
| | | } |
| | | |
| | | @Override |
| | | public List<DownWorkstation> gettwoDownWorkstations() { |
| | | return downWorkstationMapper.gettwoDownWorkstations(); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getflowCardId() { |
| | | return downWorkstationMapper.getflowCardId(); |
| | | } |
| | | |
| | | // @Override |
| | | // public List<DownWorkstation> gettwoDownWorkstations() { |
| | | // return downWorkstationMapper.getDownWorkstationsInRange(6,10); |
| | | // } |
| | | //获取总数量 |
| | | @Override |
| | | public int getTotalQuantity(int workstationId) { |
| | | Integer totalQuantity = downWorkstationMapper.getTotalQuantity(workstationId); |
| | | return totalQuantity != null ? totalQuantity : 0; |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("total_quantity") |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | } |
| | | |
| | | // @Override |
| | | // public int getTotalQuantity(int workstationId) { |
| | | // Integer totalQuantity = downWorkstationMapper.getTotalQuantity(workstationId); |
| | | // return totalQuantity != null ? totalQuantity : 0; |
| | | // } |
| | | |
| | | // @Override |
| | | // public int getRacksNumber(int workstationId) { |
| | | // Integer racksNumber = downWorkstationMapper.getRacksNumber(workstationId); |
| | | // return racksNumber != null ? racksNumber : 0; |
| | | // } |
| | | //根据条件获取落架数量 |
| | | @Override |
| | | public int getRacksNumber(int workstationId) { |
| | | Integer racksNumber = downWorkstationMapper.getRacksNumber(workstationId); |
| | | return racksNumber != null ? racksNumber : 0; |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("racks_number") |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getRacksnumber() : 0; |
| | | } |
| | | //根据条件获取工位玻璃信息 |
| | | @Override |
| | | public List<DownWorkstation> getoneDownWorkstations(int startId, int endId) { |
| | | QueryWrapper<DownWorkstation> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.between("workstation_id", startId, endId); |
| | | |
| | | return baseMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | |
| | | // |
| | | |
| | | |
| | | @Override |
| | | public void updateracksnumber(String flowCardId, int racksNumber) { |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("racks_number",racksNumber).eq("flow_card_id", flowCardId); |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("total_quantity", glassInfoCount) |
| | | .set("flow_card_id", flowCardId) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | return baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void clearFlowCardId(int workstationId) { |
| | | downWorkstationMapper.clearFlowCardInfoByWorkstationId(workstationId); |
| | | UpdateWrapper<DownWorkstation> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("flow_card_id", null) |
| | | .set("total_quantity", 0) |
| | | .set("racks_number", 0) |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Transactional |
| | | public void crossDatabaseQuery() { |
| | | // 从 MySQL 数据库中查询数据,只返回一条符合条件的数据 |
| | | DownWorkstation downWorkstation = downWorkstationTaskMapper.selectdownWorkstationstate(); |
| | | |
| | | // 从 SQL Server 数据库中查询数据 |
| | | List<DownWorkstationTask> downWorkstationTasks = downWorkstationTaskMapper.selectList(); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.mes.downworkstation.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downglassinfo.entity.DownGlassInfo; |
| | | import com.mes.downworkstation.entity.DownWorkstationTask; |
| | | import com.mes.downworkstation.mapper.DownWorkstationTaskMapper; |
| | | import com.mes.downworkstation.service.DownWorkstationTaskService; |
| | |
| | | @Service |
| | | public class DownWorkstationTaskServiceImpl extends ServiceImpl<DownWorkstationTaskMapper, DownWorkstationTask> implements DownWorkstationTaskService { |
| | | |
| | | |
| | | |
| | | public void insertdownWorkstationtask(DownGlassInfo downGlassInfo) { |
| | | DownWorkstationTask entity = new DownWorkstationTask(); |
| | | entity.setFlowCardId(downGlassInfo.getFlowCardId()); |
| | | entity.setWidth(downGlassInfo.getWidth()); |
| | | entity.setHeight(downGlassInfo.getHeight()); |
| | | entity.setThickness(downGlassInfo.getThickness()); |
| | | entity.setFilmsid(downGlassInfo.getFilmsid()); |
| | | entity.setState(1); |
| | | |
| | | baseMapper.insert(entity); |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(String flowCardId) { |
| | | UpdateWrapper<DownWorkstationTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("state", 0).eq("flow_card_id", flowCardId); |
| | | |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | } |
File was renamed from hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/uppattenusage/controller/GlassInfoController.java |
| | |
| | | package com.mes.uppattenusage.controller; |
| | | package com.mes.glassinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
copy from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/entity/GlassInfo.java
copy to hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/entity/GlassInfo.java
File was copied from hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/uppattenusage/entity/GlassInfo.java |
| | |
| | | package com.mes.uppattenusage.entity; |
| | | package com.mes.glassinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
New file |
| | |
| | | package com.mes.glassinfo.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | public interface GlassInfoMapper extends BaseMapper<GlassInfo> { |
| | | |
| | | |
| | | // @Select("SELECT COUNT(*) FROM glass_info WHERE flowcard_id = #{flowCardId}") |
| | | // int getGlassInfoCountByFlowCardId(@Param("flowCardId") String flowCardId); |
| | | |
| | | // @Update("UPDATE down_workstation SET total_quantity = #{glassInfoCount},flow_card_id=#{flowCardId} WHERE workstation_id = #{workstationId}") |
| | | // int updateFlowCardIdAndCount(@Param("flowCardId") String flowCardId, @Param("glassInfoCount") int glassInfoCount,@Param("workstationId")int workstationId); |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.glassinfo.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | public interface GlassInfoService extends IService<GlassInfo> { |
| | | |
| | | int getGlassInfoCountByFlowCardId(String flowCardId); |
| | | |
| | | List<Map<String, Object>> getFlowCardId(); |
| | | GlassInfo selectGlassId(String id); |
| | | } |
New file |
| | |
| | | package com.mes.uppattenusage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downworkstation.entity.DownWorkstation; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Service |
| | | public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService { |
| | | |
| | | private GlassInfoMapper glassInfoMapper; |
| | | |
| | | @Autowired |
| | | public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper) { |
| | | this.glassInfoMapper = glassInfoMapper; |
| | | } |
| | | |
| | | @Override |
| | | public int getGlassInfoCountByFlowCardId(String flowCardId) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flowcard_id", flowCardId); |
| | | |
| | | return baseMapper.selectCount(queryWrapper); |
| | | } |
| | | @Override |
| | | public List<Map<String, Object>> getFlowCardId() { |
| | | return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flowcard_id")); |
| | | } |
| | | @Override |
| | | public GlassInfo selectGlassId(String id) { |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("id", id); |
| | | |
| | | return baseMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | // public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { |
| | | // int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); |
| | | // if (rowsAffected > 0) { |
| | | // System.out.println("更新架子上流程卡 ID 和数量成功"); |
| | | // } else { |
| | | // System.out.println("更新架子上流程卡 ID 和数量失败"); |
| | | // } |
| | | // } |
| | | } |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | | |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | mapper-locations: classpath*:mapper/**/*.xml |
| | | |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # 设置 MyBatis 日志级别为 ERROR |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # 设置 MyBatis 日志级别为 ERROR |
| | | logging: |
| | | level: |
| | | com: |
| | |
| | | <version>1.0-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <artifactId>servicebase</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <artifactId>springsecurity</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <!--开发者工具--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |