File tree 2 files changed +4
-26
lines changed
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin
src/test/java/org/springframework/boot/gradle/testkit
2 files changed +4
-26
lines changed Original file line number Diff line number Diff line change @@ -8,35 +8,13 @@ repositories {
8
8
mavenCentral()
9
9
}
10
10
11
- def addDependency (configurationName , dependency ) {
12
- def coordinates = [
13
- ' group' : dependency. groupId. text(),
14
- ' name' : dependency. artifactId. text(),
15
- ' version' : dependency. version. text()
16
- ]
17
- dependencies {
18
- add configurationName, coordinates
19
- }
20
- }
21
-
22
- def effectivePomFile = file(' target/effective-pom.xml' )
23
- if (effectivePomFile. file) {
24
- def pom = new XmlSlurper (). parseText(file(' target/effective-pom.xml' ). text)
25
- pom. dependencies. dependency. each { dependency ->
26
- def scope = dependency. scope. text()
27
- if (scope == ' compile' ) {
28
- addDependency scope, dependency
29
- }
30
- else if (scope == ' test' ) {
31
- addDependency ' testCompile' , dependency
32
- }
33
- }
34
- }
35
-
36
11
dependencies {
37
12
compile localGroovy()
38
13
compile gradleApi()
14
+ compile fileTree(dir : ' target/dependencies/compile' , include : ' *.jar' )
39
15
testCompile gradleTestKit()
16
+ testCompile ' org.apache.commons:commons-compress:1.13'
17
+ testCompile fileTree(dir : ' target/dependencies/test' , include : ' *.jar' )
40
18
}
41
19
42
20
jar {
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ private static String evaluateExpression(String expression) {
196
196
XPathFactory xPathFactory = XPathFactory .newInstance ();
197
197
XPath xpath = xPathFactory .newXPath ();
198
198
XPathExpression expr = xpath .compile (expression );
199
- String version = expr .evaluate (new InputSource (new FileReader ("pom.xml" )));
199
+ String version = expr .evaluate (new InputSource (new FileReader (".flattened- pom.xml" )));
200
200
return version ;
201
201
}
202
202
catch (Exception ex ) {
You can’t perform that action at this time.
0 commit comments