-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
183 lines (160 loc) · 4.35 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
buildscript {
repositories {
jcenter()
maven {
url "http://ec2-54-210-118-101.compute-1.amazonaws.com:8081/nexus/content/groups/public/"
}
}
dependencies {
classpath 'org.spockframework:spock-core:1.0-groovy-2.3'
classpath 'com.netflix.nebula:gradle-ospackage-plugin:2.0.2'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
}
}
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
apply plugin: "jacoco"
apply plugin: 'war'
apply plugin: 'nebula.rpm'
//apply plugin: 'maven-publish'
apply plugin: 'pmd'
apply plugin: "findbugs"
apply plugin: 'checkstyle'
apply plugin: "sonar-runner"
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
}
}
//testing git push hook 2
// JDK version source compatibility
sourceCompatibility = 1.8
// project version
version = '1.0.2'
// War file name
war.baseName = 'hello-world'
// Web directory, this overrides the default value "webapp"
// project.webAppDirName = 'WebContent'
// Set source directory
/*sourceSets {
main {
java {
srcDir 'src'
}
}
}*/
task app1Rpm(type: Rpm) {
packageName 'hello-world'
version '1.0.2'
arch NOARCH
os LINUX
into ('/usr/share/tomcat/webapps/') {
// into ('/var/lib/tomcat/webapps') {
addParentDirs = false
from (war.outputs.files) {
addParentDirs = false
}
}
}
//UPLOAD ARCHIVES STUFF USE THIS OR MAVEN STUFF
artifacts {
archives app1Rpm
}
//new comment
uploadArchives {
repositories {
maven {
credentials {
username "admin"
password "admin123"
}
// change to point to your repo, e.g. http://my.org/repo
url "http://ec2-54-210-118-101.compute-1.amazonaws.com:8081/nexus/content/repositories/snapshots"
}
}
}
// Some comment
/*
modifyPom {
project {
name 'Tomcat HelloWorld'
description 'Hello World app for Tomcat'
url 'https://github.com/Coveros/tomcat_hello_world'
inceptionYear '2015'
scm {
url 'https://github.com/Coveros/tomcat_hello_world'
}
developers {
developer {
id 'devin909'
name 'Devin Lee'
email '[email protected]'
}
}
}
}
extraArchive {
sources = false
tests = true
javadoc = false
}
nexus {
sign = true
repositoryUrl = 'http://ec2-54-208-196-52.compute-1.amazonaws.com:8081/nexus/content/repositories/'
snapshotRepositoryUrl = 'http://ec2-54-208-196-52.compute-1.amazonaws.com:8081/nexus/content/repositories/snapshots/'
}*/
//MAVEN PUBLISH STUFF
/*publishing {
publications {
helloWorld(MavenPublication) {
groupId 'com.coveros'
artifactId 'hello-world-sample-random-gen-rpm'
version '1.0.2-SNAPSHOT'
//from components.web
artifact (app1Rpm) {
classifier "rpm"
extension "rpm"
}
}
}
}
publishing {
repositories {
maven {
credentials {
username "admin"
password "admin123"
}
// change to point to your repo, e.g. http://my.org/repo
url "http://ec2-54-210-118-101.compute-1.amazonaws.com:8081/nexus/content/repositories/snapshots/"
}
}
}*/
pmd {
ignoreFailures = true
//sourceSets = ['src/main', 'src/test']
reportsDir = file("$project.buildDir/reports/pmd")
ruleSets = [
"java-basic",
"java-braces",
"java-comments"
]
}
sonarRunner {
sonarProperties {
property "sonar.host.url", "http://ec2-54-210-118-101.compute-1.amazonaws.com:9000"
property "sonar.username", "admin"
property "sonar.password", "admin"
property "sonar.jdbc.url", "jdbc:mysql://ec2-54-210-118-101.compute-1.amazonaws.com:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "sonarqube"
property "sonar.jdbc.password", "coveros1"
property "sonar.java.source", "1.8"
}
}