-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
99 lines (86 loc) · 3.55 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
ext {
springVersion = "4.0.3.RELEASE"
mysqlConnectorJavaVersion = "5.1.6"
groovyVersion = "2.3.10"
jmsApiVersion = "1.1-rev-1"
facturacionConfigurationDir = "${System.getProperty('user.home')}/.factura/"
currentEnvironment = project.hasProperty("environment") ? environment : "development"
}
buildscript {
repositories { jcenter() }
dependencies { classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.4' }
}
apply plugin:"java"
apply plugin:'groovy'
apply plugin:'eclipse'
repositories {
mavenCentral()
mavenLocal()
maven { url "http://trama.mx:8082/archiva/repository/snapshots" }
maven { url "http://trama.mx:8082/archiva/repository/internal" }
}
apply plugin:"war"
war.archiveName "facturacion.war"
apply plugin:"jetty"
httpPort=8081
apply plugin: 'tomcat'
tomcat { httpPort = 8081 }
dependencies {
def tomcatVersion = '7.0.54'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
}
providedCompile "javax.servlet:servlet-api:2.5"
compile "log4j:log4j:1.2.17"
compile 'org.apache.servicemix.bundles:org.apache.servicemix.bundles.not-yet-commons-ssl:0.3.11_1'
compile "org.codehaus.groovy:groovy-all:$groovyVersion"
compile 'commons-io:commons-io:1.4'
compile "org.springframework:spring-webmvc:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile "org.springframework:spring-orm:$springVersion"
compile "org.springframework:spring-jms:$springVersion"
compile "javax.jms:jms-api:$jmsApiVersion"
compile "com.google.code.gson:gson:2.2.2"
compile "org.apache.commons:commons-lang3:3.0.1"
compile 'org.springframework.security.oauth:spring-security-oauth2:2.0.5.RELEASE'
compile "org.apache.activemq:activemq-spring:5.8.0"
compile "mysql:mysql-connector-java:$mysqlConnectorJavaVersion"
testCompile "junit:junit:4.12"
testCompile "org.mockito:mockito-all:1.10.19"
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
testCompile 'org.spockframework:spock-spring:0.7-groovy-2.0'
testCompile 'org.springframework:spring-test:4.1.2.RELEASE'
compile 'org.xhtmlrenderer:core-renderer:R8'
compile 'com.lowagie:itext:2.1.0'
compile files('libs/finkok-stamp-demo.jar')
compile files('libs/finkok-cancel-demo.jar')
compile files('libs/finkok-valida-demo.jar')
}
def filesToInclude = ["facturacion-${currentEnvironment}.properties"]
def toDirectory = 'src/main/resources/config'
task settingMainEnvironment(type:Copy){
from facturacionConfigurationDir
into toDirectory
include filesToInclude
rename { String fileName -> fileName.replace("-${currentEnvironment}", '') }
}
toDirectory = 'src/test/resources'
task settingTestEnvironment(type:Copy){
from facturacionConfigurationDir
into toDirectory
include filesToInclude
rename { String fileName -> fileName.replace("-${currentEnvironment}", '') }
}
task settingLog4jProperties(type:Copy){
from "${System.getProperty('user.home')}/.factura/log4j-${currentEnvironment}.properties"
into "src/main/resources/config"
rename { String fileName -> fileName.replace("-${currentEnvironment}", '') }
}
task settingOauth2Properties(type:Copy){
from "${System.getProperty('user.home')}/.factura/oauth2-${currentEnvironment}.properties"
into "src/main/resources/config"
rename { String fileName -> fileName.replace("-${currentEnvironment}", '') }
}
processResources.dependsOn "settingMainEnvironment", "settingTestEnvironment", "settingLog4jProperties", "settingOauth2Properties"