Commit 6927b2f8 by 钟明宏

'更新okhttp的版本'

parent ce14cec6
......@@ -35,7 +35,7 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>1.3.9-SNAPSHOT</version>
<version>1.3.9.1-RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
......
......@@ -3,6 +3,7 @@ package cn.yunmaozj.upload;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
......@@ -25,5 +26,11 @@ public class Directories {
this.directories.add(file);
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Directories{");
sb.append("directories=").append(Arrays.toString(directories.toArray()));
sb.append('}');
return sb.toString();
}
}
......@@ -31,4 +31,13 @@ public class Directory {
public void setPath(File path) {
this.path = path;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Directory{");
sb.append("name='").append(name).append('\'');
sb.append(", path=").append(path);
sb.append('}');
return sb.toString();
}
}
......@@ -75,6 +75,7 @@ public class DocumentUploadMojo extends AbstractMojo {
getLog().info("skip document-upload");
return;
}
getLog().info(directories.toString());
for (Directory directory : directories.getFileList()) {
File inputDirectory = directory.getPath();
if (!inputDirectory.exists()) {
......@@ -129,6 +130,7 @@ public class DocumentUploadMojo extends AbstractMojo {
.post(body).build();
Response response = getClient().newCall(request).execute();
getLog().info("Uploading file:[" + outFile + "] to [" + request.url() + "]");
getLog().info(response.toString());
if (!response.isSuccessful())
getLog().info("Response Body[" + response.body().string() + "]");
}
......
......@@ -6,7 +6,7 @@
<parent>
<groupId>cn.yunmaozj</groupId>
<artifactId>yunmaozj-parent</artifactId>
<version>1.0.0.13</version>
<version>1.0.0.14</version>
</parent>
<groupId>cn.yunmaozj.tools</groupId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment