1 Star 0 Fork 86

kerry200408/UniAuth

forked from 点融科技/UniAuth 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 12.44 KB
一键复制 编辑 原始数据 按行查看 历史
buildscript {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
jcenter()
mavenCentral()
}
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.5.6.RELEASE'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE'
classpath 'org.sonarqube.gradle:gradle-sonarqube-plugin:1.0'
}
}
plugins {
id "org.sonarqube" version "2.0.1"
}
allprojects {
group = 'com.dianrong.common.uniauth'
version = '1.0.79-SNAPSHOT'
ext{
spring_version = '4.1.6.RELEASE'
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'
repositories {
maven { url 'http://nexus.dianrong.com/nexus/content/groups/public/' }
maven {
url 'http://archiva.dianrong.com/repository/mirror'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven {
url 'http://archiva.dianrong.com/repository/internal'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven {
url 'http://archiva.dianrong.com/repository/snapshots'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
}
repositories{
mavenCentral()
}
publishing {
publications.all {
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each { it.scope*.value = 'compile'}
}
}
repositories {
maven {
url 'http://archiva.dianrong.com/repository/mirror'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven {
url 'http://archiva.dianrong.com/repository/internal'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven {
url 'http://archiva.dianrong.com/repository/snapshots'
credentials {
username = 'developer'
password = '#a1GiRoKJnG'
}
}
maven {
if(project.version.endsWith('-SNAPSHOT')) {
url 'http://nexus.dianrong.com/nexus/content/repositories/snapshots/'
}
else {
url 'http://nexus.dianrong.com/nexus/content/repositories/mirror/'
}
}
maven {
if(project.version.endsWith('-SNAPSHOT')) {
url 'http://nexus.dianrong.com/nexus/content/repositories/snapshots/'
}
else {
url 'http://nexus.dianrong.com/nexus/content/repositories/internal/'
}
}
}
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencyManagement {
imports {
//see dependencies http://docs.spring.io/platform/docs/2.0.8.RELEASE/reference/htmlsingle/#appendix-dependency-versions
mavenBom 'io.spring.platform:platform-bom:2.0.8.RELEASE'
}
dependencies {
dependency 'org.projectlombok:lombok:1.16.10'
dependency 'org.apache.httpcomponents:fluent-hc:4.5.2'
dependency 'com.google.guava:guava:18.0'
dependency 'org.apache.commons:commons-lang3:3.4'
dependency 'org.mybatis:mybatis:3.2.8'
dependency 'org.mybatis:mybatis-spring:1.2.2'
dependency "javax.mail:mail:1.5.0-b01"
}
}
dependencies {
testCompile 'junit:junit'
}
sonarqube {
properties {
property "sonar.host.url", "http://10.18.19.64:9000"
property "sonar.jdbc.url", "jdbc:mysql://10.18.19.43:3308/sonar?useUnicode=true&characterEncoding=utf8"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonar"
property "sonar.jdbc.password", "sonar"
property "sonar.projectKey", "dianrong:uniauth"
property "sonar.projectName", "uniauth"
property "sonar.projectVersion", version
property "sonar.exclusions", "**/*Test.java"
property "sonar.test.inclusions", "**/*Test.java"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.junit.reportsPath", "build/test-results/"
property "sonar.jacoco.reportPath", "build/jacoco/test.exec"
property "sonar.jacoc.itReportPath", "build/jacoco/jacoco.exec"
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.6'
archiveBase = 'PROJECT'
archivePath = 'gradle/dists'
}
project(':common') {
dependencies {
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.google.guava:guava:18.0'
}
}
project(':ss-client') {
dependencies {
compile project(":common")
compile 'org.apache.curator:curator-recipes:2.9.1'
compile 'org.springframework.security:spring-security-web'
compile 'org.springframework.security:spring-security-config'
compile 'org.springframework.security:spring-security-core'
compile 'org.springframework.security:spring-security-remoting'
compile 'org.springframework.security:spring-security-ldap'
compile 'org.springframework.security:spring-security-acl'
compile 'org.springframework.security:spring-security-cas'
compile 'org.springframework.security:spring-security-openid'
compile 'org.springframework.security:spring-security-taglibs'
compile 'org.hibernate:hibernate-validator'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'src/main/java-ss']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java', 'src/test/java-ss']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
jar {
baseName = 'common-uniauth-ssclient'
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
publishing {
publications {
client(MavenPublication) {
artifactId 'common-uniauth-ssclient'
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
}
project('examples:subsystem') {
apply plugin: 'war'
dependencies {
compile project(":ss-client")
providedCompile 'javax.servlet:javax.servlet-api'
compile 'org.springframework:spring-webmvc'
compile 'ch.qos.logback:logback-classic'
}
configurations{
runtime.exclude group : 'commons-logging',module:'commons-logging'
}
war {
archiveName = project.name + '.war'
}
}
project(':cas') {
apply plugin: 'war'
sourceSets {
deployment {
java {
srcDir 'src/deployment/java'
}
resources {
srcDir 'src/deployment/mybatis'
}
compileClasspath += configurations.compile
runtimeClasspath += configurations.compile
}
}
ext {
tomcatUsername = 'tomcat' //Tomcat用户
tomcatPassword = 'tomcat' //Tomcat密码
tomcatHost = 'localhost:8080' //
tomcatWarFile = 'build/libs/' + project.name + '.war'
shengLongTomcatUsername = 'admin'
shengLongTomcatPassword = 'admin'
shengLongTomcatHost = '192.168.56.101:8080'
cwlTomcatHost = 'localhost:8080' //
wlinTomcatHost = 'localhost:8080' //
}
configurations{
runtime.exclude group : 'commons-logging',module:'commons-logging'
}
war {
archiveName = project.name + '.war'
}
dependencies {
compile(project(':share-rw')){
exclude group: 'org.springframework'
exclude group: 'org.springframework.security'
exclude group: 'com.fasterxml.jackson.core'
}
providedCompile( "org.apache.tomcat:tomcat-catalina:7.0.63")
compile (
'javax.servlet:javax.servlet-api:3.1.0' ,
'org.jasig.cas:cas-server-core:4.1.3',
'org.jasig.cas:cas-server-security-filter:2.0.4',
'org.jasig.cas:cas-server-webapp-support:4.1.3',
'org.jasig.cas:cas-server-integration-restlet:4.1.3',
)
compile(
"com.ryantenney.metrics:metrics-spring:3.1.3",
'org.apache.commons:commons-pool2:2.4.2',
'redis.clients:jedis:2.8.2',
'javax.servlet:jstl:1.2',
)
compile "com.github.penggle:kaptcha:2.3.2"
compile(
"com.dianrong.platform:notification-client:1.0.3",
)
/** end user should open below block,and close above block
compile fileTree('../dianrong-lib/lib') {
include 'dianrong-notification-client-1.0.3.jar'
}
**/
//Http Components for deploy on local
compile 'org.apache.httpcomponents:httpclient'
compile 'org.apache.httpcomponents:fluent-hc'
compile 'org.apache.httpcomponents:httpmime'
compile 'ch.qos.logback:logback-classic'
compile 'org.jasig.cas:cas-server-support-rest:4.1.3'
compile('org.springframework.data:spring-data-redis:1.7.1.RELEASE') {
exclude group: 'org.springframework', module: 'spring-aop'
exclude group: 'org.springframework', module: 'spring-beans'
exclude group: 'org.springframework', module: 'spring-context'
exclude group: 'org.springframework', module: 'spring-context-support'
exclude group: 'org.springframework', module: 'spring-core'
exclude group: 'org.springframework', module: 'spring-expression'
exclude group: 'org.springframework', module: 'spring-oxm'
exclude group: 'org.springframework', module: 'spring-tx'
}
//compile('org.jasig.cas:cas-server-support-jdbc:3.5.2.1') {
//transitive = true
//exclude group: 'javax.xml', module: 'xmldsig'
//}
}
task warCas(dependsOn: war) {
}
task tomcatUndeploy(type: JavaExec) {
main = 'gradle.TomcatDeploy'
args = ['undeploy',
project.name,
tomcatUsername,
tomcatPassword,
tomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
doFirst {
println "removing war file from Tomcat."
}
}
task tomcatDeployCas(type: JavaExec, dependsOn: warCas) {
doFirst {
println "deploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['deploy',
project.name,
tomcatWarFile,
tomcatUsername,
tomcatPassword,
tomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
task tomcatRedeploy(type: JavaExec, dependsOn: warCas) {
doFirst {
println "redeploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['redeploy',
project.name,
tomcatWarFile,
tomcatUsername,
tomcatPassword,
tomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
task shengLongTomcatUndeploy(type: JavaExec) {
main = 'gradle.TomcatDeploy'
args = ['undeploy',
project.name,
shengLongTomcatUsername,
shengLongTomcatPassword,
shengLongTomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
doFirst {
println "removing war file from Tomcat."
}
}
task shengLongTomcatDeploy(type: JavaExec, dependsOn: warCas) {
doFirst {
println "deploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['deploy',
project.name,
tomcatWarFile,
shengLongTomcatUsername,
shengLongTomcatPassword,
shengLongTomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
task shengLongTomcatRedeploy(type: JavaExec, dependsOn: warCas) {
doFirst {
println "redeploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['redeploy',
project.name,
tomcatWarFile,
shengLongTomcatUsername,
shengLongTomcatPassword,
shengLongTomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
task tomcatWLinDeployCas(type: JavaExec, dependsOn: warCas) {
doFirst {
println "deploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['deploy',
project.name,
tomcatWarFile,
tomcatUsername,
tomcatPassword,
wlinTomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
task tomcatWLinRedeployCas(type: JavaExec, dependsOn: warCas) {
doFirst {
println "redeploying war file " + tomcatWarFile + " to Tomcat."
}
main = 'gradle.TomcatDeploy'
args = ['redeploy',
project.name,
tomcatWarFile,
tomcatUsername,
tomcatPassword,
wlinTomcatHost]
classpath = sourceSets.deployment.runtimeClasspath
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/kerry200408/UniAuth.git
git@gitee.com:kerry200408/UniAuth.git
kerry200408
UniAuth
UniAuth
master

搜索帮助