25
25
*/
26
26
public class ArtipieAndPluginFromCentralIT {
27
27
28
- private static final Logger LOGGER =
29
- LoggerFactory .getLogger (ArtipieAndPluginFromCentralIT .class );
30
-
31
28
private GenericContainer <?> mavenClient ;
32
29
33
30
private GenericContainer <?> artipie ;
@@ -79,19 +76,18 @@ void buildsWithMavenProfile() throws IOException, InterruptedException {
79
76
this .putClasspathResourceToClient ("ArtipieAndPluginFromCentralIT/com/example/test-maven-profile/maven-settings.xml" , "/w/settings.xml" );
80
77
this .putClasspathResourceToClient ("ArtipieAndPluginFromCentralIT/com/example/test-maven-profile/pom.xml" , "/w/pom.xml" );
81
78
final Container .ExecResult exec = this .mavenClient .execInContainer (
82
- "mvn" , "install" , "-DskipTests" , "-s" , "settings.xml" , "-Daether.connector.https.securityMode=insecure"
79
+ "mvn" , "install" , "-X" , "- DskipTests" , "-s" , "settings.xml" , "-Daether.connector.https.securityMode=insecure"
83
80
);
84
81
String res = String .join ("\n " , exec .getStdout (), exec .getStderr ());
85
- LOGGER .info (res );
86
82
MatcherAssert .assertThat ("Maven install status is not successful" , exec .getExitCode () == 0 );
87
83
MatcherAssert .assertThat (
88
84
res ,
89
85
Matchers .stringContainsInOrder (
90
86
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3" ,
91
- "BUILD SUCCESS " ,
92
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33 .jar" ,
93
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my- maven-proxy/ org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar " ,
94
- "Request over HTTP/1.1 done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom "
87
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar " ,
88
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0 .jar" ,
89
+ "HTTP/1.1 request done, method=GET, resp status=200, url=https://repo. maven.apache.org/maven2/ org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom " ,
90
+ "BUILD SUCCESS "
95
91
)
96
92
);
97
93
}
@@ -104,19 +100,18 @@ void buildsWithMavenProfile() throws IOException, InterruptedException {
104
100
void buildsWithPomRepo () throws IOException , InterruptedException {
105
101
this .putClasspathResourceToClient ("ArtipieAndPluginFromCentralIT/com/example/test-pom-repo/pom.xml" , "/w/pom.xml" );
106
102
final Container .ExecResult exec = this .mavenClient .execInContainer (
107
- "mvn" , "install" , "-Daether.connector.https.securityMode=insecure"
103
+ "mvn" , "install" , "-X" , "- Daether.connector.https.securityMode=insecure"
108
104
);
109
105
String res = String .join ("\n " , exec .getStdout (), exec .getStderr ());
110
- LOGGER .info (res );
111
106
MatcherAssert .assertThat ("Maven install status is not successful" , exec .getExitCode () == 0 );
112
107
MatcherAssert .assertThat (
113
108
res ,
114
109
Matchers .stringContainsInOrder (
115
110
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3" ,
116
- "BUILD SUCCESS " ,
117
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33 .jar" ,
118
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my- maven-proxy/ org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar " ,
119
- "Request over HTTP/1.1 done, method=GET, resp status=200, url=https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom "
111
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar " ,
112
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0 .jar" ,
113
+ "HTTP/1.1 request done, method=GET, resp status=200, url=https://repo. maven.apache.org/maven2/ org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom " ,
114
+ "BUILD SUCCESS "
120
115
)
121
116
);
122
117
}
@@ -134,19 +129,18 @@ void buildsWithPomRepo() throws IOException, InterruptedException {
134
129
void buildsWithPomPluginRepo () throws IOException , InterruptedException {
135
130
this .putClasspathResourceToClient ("ArtipieAndPluginFromCentralIT/com/example/test-pom-plugin-repo/pom.xml" , "/w/pom.xml" );
136
131
final Container .ExecResult exec = this .mavenClient .execInContainer (
137
- "mvn" , "install" , "-Daether.connector.https.securityMode=insecure"
132
+ "mvn" , "install" , "-X" , "- Daether.connector.https.securityMode=insecure"
138
133
);
139
134
String res = String .join ("\n " , exec .getStdout (), exec .getStderr ());
140
- LOGGER .info (res );
141
135
MatcherAssert .assertThat ("Maven install status is not successful" , exec .getExitCode () == 0 );
142
136
MatcherAssert .assertThat (
143
137
res ,
144
138
Matchers .stringContainsInOrder (
145
139
"Downloaded from central: https://repo.maven.apache.org/maven2/com/artipie/maven/resolver/maven-resolver-transport-http3" ,
146
- "BUILD SUCCESS " ,
147
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33 .jar" ,
148
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0.jar " ,
149
- "Request over HTTP/3.0 done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom "
140
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/args4j/args4j/2.33/args4j-2.33.jar " ,
141
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/springframework/spring-web/6.1.0/spring-web-6.1.0 .jar" ,
142
+ "HTTP/3.0 request done, method=GET, resp status=200, url=https://artipie:8091/my-maven-proxy/org/apache/maven/maven-archiver/3.6.0/maven-archiver-3.6.0.pom " ,
143
+ "BUILD SUCCESS "
150
144
)
151
145
);
152
146
}
0 commit comments