Skip to content

Commit

Permalink
updated all libs to the newest version
Browse files Browse the repository at this point in the history
  • Loading branch information
sterlp committed Oct 20, 2019
1 parent 2bb7818 commit d7539e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
27 changes: 14 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<artifactId>svg2png</artifactId>
<packaging>jar</packaging>
<version>0.2.0-SNAPSHOT</version>
<url>https://github.com/puel/SvgToPng</url>
<url>https://github.com/sterlp/svg2png</url>
<inceptionYear>2015</inceptionYear>
<name>Svg to PNG CL util</name>
<name>SVG to PNG CL util</name>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand All @@ -20,50 +20,51 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<batik.version>1.11</batik.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<version>3.9</version>
</dependency>
<!-- https://xmlgraphics.apache.org/batik/using/transcoder.html -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.8</version>
<version>${batik.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.8</version>
<version>${batik.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>1.8</version>
<version>${batik.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>2.1</version>
<version>2.3</version>
</dependency>

<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.3.1</version>
<version>1.4</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.6</version>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -78,7 +79,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -87,7 +88,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.2</version>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -130,7 +131,7 @@
<plugin>
<groupId>org.skife.maven</groupId>
<artifactId>really-executable-jar-maven-plugin</artifactId>
<version>1.4.1</version>
<version>1.5.0</version>
<configuration>
<!-- value of flags will be interpolated into the java invocation -->
<!-- as "java $flags -jar ..." -->
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/org/sterl/svg2png/TestSvg2Png.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.sterl.svg2png.Main;
import org.sterl.svg2png.Svg2Png;
import org.sterl.svg2png.config.OutputConfig;
import org.sterl.svg2png.util.FileUtil;

public class TestSvg2Png {

Expand Down Expand Up @@ -83,22 +84,21 @@ public void testNameMultipleFilesOutputs() throws Exception {
assertEquals(5, files.size());
for (File file : files) {
assertEquals("testConversion.png", file.getName());
file.delete();
FileUtils.deleteDirectory(file.getParentFile());
}
}

@Test
public void testConversionDirectory() throws Exception {
OutputConfig cfg = OutputConfig.fromPath(new File(getClass().getResource("/sample.svg").toURI()).getParent());
List<File> convert = new Svg2Png(cfg).convert();
convert.stream().forEach(f -> {
f.deleteOnExit();
});
convert.stream().forEach(f -> f.deleteOnExit());

assertEquals(2, convert.size());
System.out.println(convert);
assertEquals("sample.png", convert.get(0).getName());
assertEquals("sample2.png", convert.get(1).getName());
assertTrue("sample.png not found",
convert.stream().filter(f -> "sample.png".equals(f.getName())).findFirst().isPresent());
assertTrue("sample2.png not found",
convert.stream().filter(f -> "sample2.png".equals(f.getName())).findFirst().isPresent());

convert.stream().forEach(f -> f.delete());
}
Expand Down

0 comments on commit d7539e0

Please sign in to comment.