1
1
package xsbt .boot
2
2
3
- import java .net .URL
3
+ import java .net .URI
4
4
5
5
object ConfigurationParserTest extends verify.BasicTestSuite {
6
6
test(" Configuration parser should correct parse bootOnly" ) {
@@ -19,67 +19,69 @@ object ConfigurationParserTest extends verify.BasicTestSuite {
19
19
repoFileContains(
20
20
""" |[repositories]
21
21
| id: https://repo1.maven.org""" .stripMargin,
22
- Repository .Maven (" id" , new URL (" https://repo1.maven.org" ), false )
22
+ Repository .Maven (" id" , new URI (" https://repo1.maven.org" ).toURL , false )
23
23
)
24
24
25
25
repoFileContains(
26
26
""" |[repositories]
27
27
| id: https://repo1.maven.org, bootOnly""" .stripMargin,
28
- Repository .Maven (" id" , new URL (" https://repo1.maven.org" ), true )
28
+ Repository .Maven (" id" , new URI (" https://repo1.maven.org" ).toURL , true )
29
29
)
30
30
31
31
repoFileContains(
32
32
""" |[repositories]
33
33
| id: http://repo1.maven.org, bootOnly, allowInsecureProtocol""" .stripMargin,
34
- Repository .Maven (" id" , new URL (" http://repo1.maven.org" ), true , true )
34
+ Repository .Maven (" id" , new URI (" http://repo1.maven.org" ).toURL , true , true )
35
35
)
36
36
37
37
repoFileContains(
38
38
""" |[repositories]
39
39
| id: https://repo1.maven.org, [orgPath]""" .stripMargin,
40
40
Repository
41
- .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [orgPath]" , false , false )
41
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL , " [orgPath]" , " [orgPath]" , false , false )
42
42
)
43
43
44
44
repoFileContains(
45
45
""" |[repositories]
46
46
| id: https://repo1.maven.org, [orgPath], mavenCompatible""" .stripMargin,
47
47
Repository
48
- .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [orgPath]" , true , false )
48
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL , " [orgPath]" , " [orgPath]" , true , false )
49
49
)
50
50
51
51
repoFileContains(
52
52
""" |[repositories]
53
53
| id: https://repo1.maven.org, [orgPath], mavenCompatible, bootOnly""" .stripMargin,
54
- Repository .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [orgPath]" , true , true )
54
+ Repository
55
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL, " [orgPath]" , " [orgPath]" , true , true )
55
56
)
56
57
57
58
repoFileContains(
58
59
""" |[repositories]
59
60
| id: https://repo1.maven.org, [orgPath], bootOnly, mavenCompatible""" .stripMargin,
60
- Repository .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [orgPath]" , true , true )
61
+ Repository
62
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL, " [orgPath]" , " [orgPath]" , true , true )
61
63
)
62
64
63
65
repoFileContains(
64
66
""" |[repositories]
65
67
| id: https://repo1.maven.org, [orgPath], bootOnly""" .stripMargin,
66
68
Repository
67
- .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [orgPath]" , false , true )
69
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL , " [orgPath]" , " [orgPath]" , false , true )
68
70
)
69
71
70
72
repoFileContains(
71
73
""" |[repositories]
72
74
| id: https://repo1.maven.org, [orgPath], [artPath]""" .stripMargin,
73
75
Repository
74
- .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [artPath]" , false , false )
76
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL , " [orgPath]" , " [artPath]" , false , false )
75
77
)
76
78
77
79
repoFileContains(
78
80
""" |[repositories]
79
81
| id: https://repo1.maven.org, [orgPath], [artPath], descriptorOptional""" .stripMargin,
80
82
Repository .Ivy (
81
83
" id" ,
82
- new URL (" https://repo1.maven.org" ),
84
+ new URI (" https://repo1.maven.org" ).toURL ,
83
85
" [orgPath]" ,
84
86
" [artPath]" ,
85
87
false ,
@@ -94,7 +96,7 @@ object ConfigurationParserTest extends verify.BasicTestSuite {
94
96
| id: https://repo1.maven.org, [orgPath], [artPath], descriptorOptional, skipConsistencyCheck""" .stripMargin,
95
97
Repository .Ivy (
96
98
" id" ,
97
- new URL (" https://repo1.maven.org" ),
99
+ new URI (" https://repo1.maven.org" ).toURL ,
98
100
" [orgPath]" ,
99
101
" [artPath]" ,
100
102
false ,
@@ -109,7 +111,7 @@ object ConfigurationParserTest extends verify.BasicTestSuite {
109
111
| id: https://repo1.maven.org, [orgPath], [artPath], skipConsistencyCheck, descriptorOptional""" .stripMargin,
110
112
Repository .Ivy (
111
113
" id" ,
112
- new URL (" https://repo1.maven.org" ),
114
+ new URI (" https://repo1.maven.org" ).toURL ,
113
115
" [orgPath]" ,
114
116
" [artPath]" ,
115
117
false ,
@@ -124,7 +126,7 @@ object ConfigurationParserTest extends verify.BasicTestSuite {
124
126
| id: https://repo1.maven.org, [orgPath], [artPath], skipConsistencyCheck, descriptorOptional, mavenCompatible, bootOnly""" .stripMargin,
125
127
Repository .Ivy (
126
128
" id" ,
127
- new URL (" https://repo1.maven.org" ),
129
+ new URI (" https://repo1.maven.org" ).toURL ,
128
130
" [orgPath]" ,
129
131
" [artPath]" ,
130
132
true ,
@@ -138,27 +140,29 @@ object ConfigurationParserTest extends verify.BasicTestSuite {
138
140
""" |[repositories]
139
141
| id: https://repo1.maven.org, [orgPath], [artPath], bootOnly""" .stripMargin,
140
142
Repository
141
- .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [artPath]" , false , true )
143
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL , " [orgPath]" , " [artPath]" , false , true )
142
144
)
143
145
144
146
repoFileContains(
145
147
""" |[repositories]
146
148
| id: https://repo1.maven.org, [orgPath], [artPath], bootOnly, mavenCompatible""" .stripMargin,
147
- Repository .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [artPath]" , true , true )
149
+ Repository
150
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL, " [orgPath]" , " [artPath]" , true , true )
148
151
)
149
152
150
153
repoFileContains(
151
154
""" |[repositories]
152
155
| id: https://repo1.maven.org, [orgPath], [artPath], mavenCompatible, bootOnly""" .stripMargin,
153
- Repository .Ivy (" id" , new URL (" https://repo1.maven.org" ), " [orgPath]" , " [artPath]" , true , true )
156
+ Repository
157
+ .Ivy (" id" , new URI (" https://repo1.maven.org" ).toURL, " [orgPath]" , " [artPath]" , true , true )
154
158
)
155
159
156
160
repoFileContains(
157
161
""" |[repositories]
158
162
| id: http://repo1.maven.org, [orgPath], [artPath], mavenCompatible, bootOnly, allowInsecureProtocol""" .stripMargin,
159
163
Repository .Ivy (
160
164
" id" ,
161
- new URL (" http://repo1.maven.org" ),
165
+ new URI (" http://repo1.maven.org" ).toURL ,
162
166
" [orgPath]" ,
163
167
" [artPath]" ,
164
168
mavenCompatible = true ,
0 commit comments