mirror of https://github.com/apache/jclouds.git
Remove commons-io dependency from virtualbox
This commit is contained in:
parent
6d0071401c
commit
281172e637
|
@ -76,11 +76,6 @@
|
||||||
<artifactId>jetty-server</artifactId>
|
<artifactId>jetty-server</artifactId>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>commons-io</groupId>
|
|
||||||
<artifactId>commons-io</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jclouds.driver</groupId>
|
<groupId>org.jclouds.driver</groupId>
|
||||||
<artifactId>jclouds-sshj</artifactId>
|
<artifactId>jclouds-sshj</artifactId>
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.io.InputStreamReader;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.jclouds.util.Strings2;
|
||||||
import org.jclouds.virtualbox.config.VirtualBoxConstants;
|
import org.jclouds.virtualbox.config.VirtualBoxConstants;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
|
@ -58,7 +58,7 @@ public class YamlImagesFromFileConfig implements Supplier<String> {
|
||||||
String yamlDesc = null;
|
String yamlDesc = null;
|
||||||
// if the yaml file does not exist just use default-images.yaml
|
// if the yaml file does not exist just use default-images.yaml
|
||||||
if (!yamlFile.exists()) {
|
if (!yamlFile.exists()) {
|
||||||
yamlDesc = IOUtils.toString(new InputStreamReader(getClass().getResourceAsStream("/default-images.yaml")));
|
yamlDesc = Strings2.toStringAndClose(getClass().getResourceAsStream("/default-images.yaml"));
|
||||||
} else {
|
} else {
|
||||||
yamlDesc = Files.toString(yamlFile, Charsets.UTF_8);
|
yamlDesc = Files.toString(yamlFile, Charsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.net.URL;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.jclouds.compute.domain.Image;
|
import org.jclouds.compute.domain.Image;
|
||||||
|
import org.jclouds.util.Strings2;
|
||||||
import org.jclouds.virtualbox.config.VirtualBoxConstants;
|
import org.jclouds.virtualbox.config.VirtualBoxConstants;
|
||||||
import org.jclouds.virtualbox.domain.YamlImage;
|
import org.jclouds.virtualbox.domain.YamlImage;
|
||||||
import org.jclouds.virtualbox.functions.YamlImagesFromFileConfig;
|
import org.jclouds.virtualbox.functions.YamlImagesFromFileConfig;
|
||||||
|
@ -59,7 +59,7 @@ public class PreseedCfgServerTest {
|
||||||
|
|
||||||
starter.start(preconfigurationUrl, getDefaultImage().preseed_cfg);
|
starter.start(preconfigurationUrl, getDefaultImage().preseed_cfg);
|
||||||
|
|
||||||
String preseedFileFromJetty = IOUtils.toString(new URL("http://127.0.0.1:" + port + "/preseed.cfg").openStream());
|
String preseedFileFromJetty = Strings2.toStringAndClose(new URL("http://127.0.0.1:" + port + "/preseed.cfg").openStream());
|
||||||
String preseedFileFromFile = getDefaultImage().preseed_cfg + lineSeparator;
|
String preseedFileFromFile = getDefaultImage().preseed_cfg + lineSeparator;
|
||||||
assertEquals(preseedFileFromFile, preseedFileFromJetty);
|
assertEquals(preseedFileFromFile, preseedFileFromJetty);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue