Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UMlet to 15.0.0 #1456

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ SERVICES_TIMEOUT=15
default:

installLocalDependencies:
mvn install:install-file -Dfile=./umlet/lib/umlet-mini-14.3.0.jar -DgroupId=com.umlet -DartifactId=umlet-mini -Dversion=14.3.0 -Dpackaging=jar
mvn install:install-file -Dfile=./umlet/lib/umlet-mini-15.0.0.jar -DgroupId=com.umlet -DartifactId=umlet-mini -Dversion=15.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=./umlet/lib/umlet-parent-15.0.0.pom -DgroupId=com.umlet -DartifactId=umlet-parent -Dversion=15.0.0 -Dpackaging=pom
mvn install:install-file -Dfile=./server/lib/ditaamini-1.0.3.jar -DgroupId=ditaa -DartifactId=ditaa-mini -Dversion=1.0.3 -Dpackaging=jar

buildServer:
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/java/io/kroki/server/service/Umlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonObject;

import java.io.IOException;
import java.lang.Exception;
import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -53,7 +53,7 @@ public void convert(String sourceDecoded, String serviceName, FileFormat fileFor
try {
byte[] result = UmletConverter.convert(sourceDecoded, fileFormat.getName());
future.complete(result);
} catch (IOException e) {
} catch (Exception e) {
future.fail(e);
}
}, res -> handler.handle(res.map(o -> Buffer.buffer((byte[]) o))));
Expand Down
Binary file removed umlet/lib/umlet-mini-14.3.0.jar
Binary file not shown.
Binary file added umlet/lib/umlet-mini-15.0.0.jar
Binary file not shown.
313 changes: 313 additions & 0 deletions umlet/lib/umlet-parent-15.0.0.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.umlet</groupId>
<artifactId>umlet-parent</artifactId>
<version>15.0.0</version>
<packaging>pom</packaging>
<url>http://www.umlet.com/</url>

<licenses>
<license>
<name>GNU General Public License (GPL)</name>
<url>http://www.gnu.org/licenses/gpl.txt</url>
</license>
</licenses>

<issueManagement>
<system>GitHub Issues</system>
<url>http://github.com/umlet/umlet/issues</url>
</issueManagement>

<scm>
<url>http://github.com/umlet/umlet</url>
<connection>scm:git:git://github.com/umlet/umlet.git</connection>
<developerConnection>scm:git:ssh://[email protected]/umlet/umlet.git</developerConnection>
<tag>HEAD</tag>
</scm>

<properties>
<tycho.version>1.7.0</tycho.version> <!-- versions after 1.7.0 require Java11 for the build (not for execution of the plugin). so only update if necessary -->

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<animal.sniffer.java.api>java16</animal.sniffer.java.api>
</properties>

<modules>
<module>umlet-elements</module>
<module>umlet-res</module>
<module>umlet-mini</module>
</modules>

<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<!-- better assertions than junit and hamcrest; update to v2.3.0 if Umlet switches to Java7 -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.13</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/BuildInfo.properties</include>
<include>**/about.html</include>
<include>**/startuphelp.html</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<!-- use buildnumber-maven-plugin to create several versions of timestamp variables -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>build.date</id>
<phase>initialize</phase>
<goals>
<goal>create-timestamp</goal>
</goals>
<configuration>
<timestampFormat>yyyy-MM-dd</timestampFormat>
<timestampPropertyName>build.date</timestampPropertyName>
</configuration>
</execution>
<execution>
<id>build.time</id>
<phase>initialize</phase>
<goals>
<goal>create-timestamp</goal>
</goals>
<configuration>
<timestampFormat>yyyy-MM-dd HH:mm:ss</timestampFormat>
<timestampPropertyName>build.time</timestampPropertyName>
</configuration>
</execution>
<execution>
<id>build.time.urlsafe</id>
<phase>initialize</phase>
<goals>
<goal>create-timestamp</goal>
</goals>
<configuration>
<timestampFormat>yyyy-MM-dd_HH-mm-ss</timestampFormat>
<timestampPropertyName>build.time.urlsafe</timestampPropertyName>
</configuration>
</execution>
</executions>
</plugin>
<!-- generate sources (e.g. needed by GWT for shared code) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.17</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>checks</id>
<build>
<plugins>
<!-- use SpotBugs to detect potential errors -->
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.8</version>
<executions>
<!-- Ensures that FindBugs inspects source code when project is compiled. -->
<execution>
<id>analyze-compile</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<excludeFilterFile>${basedir}/src/main/findbugs/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<!-- use animal sniffer plugin to verify that only Java APIs up to a specific version are used -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.16</version>
<executions>
<execution>
<id>check-java-api</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>${animal.sniffer.java.api}</artifactId>
<version>1.1</version>
</signature>
<!-- <excludeDependencies> -->
<!-- <excludeDependency>org.eclipse.jdt:ecj:*</excludeDependency> -->
<!-- </excludeDependencies> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- use https://github.com/google/error-prone compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.4.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<excludePackageNames>com.baselet.element.facet.customdrawings.gen:com.baselet.element.facet.specific.sequence_aio.gen</excludePackageNames>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.5</version>
</dependency>
<!-- override plexus-compiler-javac-errorprone's dependency on Error Prone with the latest version -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion umlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<umlet-mini.version>14.3.0</umlet-mini.version>
<umlet-mini.version>15.0.0</umlet-mini.version>
</properties>

<artifactId>umlet</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions umlet/src/main/java/io/kroki/umlet/UmletConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.baselet.diagram.io.OutputHandler;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.Exception;

import static com.baselet.control.util.Utils.readBuildInfo;

Expand All @@ -20,7 +20,7 @@ public class UmletConverter {
ConfigHandler.loadConfig();
}

public static byte[] convert(String source, String outputFormat) throws IOException {
public static byte[] convert(String source, String outputFormat) throws Exception {
DiagramHandler handler = DiagramHandler.forExport(source);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutputHandler.createToStream(outputFormat, baos, handler);
Expand Down