mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-21 16:29:03 +00:00
create parent pom to improve the maintanace
This commit is contained in:
parent
f6fa448ed8
commit
98dfd1763a
574
pom.jdk8.xml
574
pom.jdk8.xml
@ -6,121 +6,30 @@
|
||||
>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantumlservlet</artifactId>
|
||||
<artifactId>plantumlservlet-parent</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
<relativePath>pom.parent.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>plantumlservlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>PlantUML Servlet</name>
|
||||
<url>https://plantuml.github.io/plantuml-server/index.html</url>
|
||||
|
||||
<properties>
|
||||
<java.version>8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<!--
|
||||
Skip tests by default.
|
||||
Run tests manually:
|
||||
- mvn test -DskipTests=false
|
||||
- mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
-->
|
||||
<skipTests>true</skipTests>
|
||||
<!--
|
||||
JS and CSS compression / minify
|
||||
-->
|
||||
<withoutCSSJSCompress>false</withoutCSSJSCompress>
|
||||
|
||||
<!--
|
||||
This artifact is required for:
|
||||
1. EmbeddedJettyServer -> scope: test
|
||||
2. Tomcat docker image -> scope: compile
|
||||
BUT: Jetty docker image as well as jetty-runner will crash on runtime if
|
||||
this artifact is included because it's already provided so that the
|
||||
artifact would apear multiple times on the classpath.
|
||||
You can test it via: `mvn jetty:run [-Dapache-jsp.scope=compile]`
|
||||
Error: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: org.eclipse.jetty.apache.jsp.JuliLog not a subtype
|
||||
HENCE: Default is the "test" scope and for Tomcat docker image building add:
|
||||
-Dapache-jsp.scope=compile
|
||||
-->
|
||||
<apache-jsp.scope>test</apache-jsp.scope>
|
||||
|
||||
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
|
||||
<wtp.version>1.5</wtp.version>
|
||||
<wtp.contextName>plantuml</wtp.contextName>
|
||||
|
||||
<jetty.http.port>8080</jetty.http.port>
|
||||
<jetty.contextpath>/${wtp.contextName}</jetty.contextpath>
|
||||
|
||||
<!-- main versions -->
|
||||
<plantuml.version>1.2023.8</plantuml.version>
|
||||
<!-- Please keep the jetty version identical with the docker image -->
|
||||
<jetty.version>11.0.15</jetty.version>
|
||||
<monaco-editor.version>0.36.1</monaco-editor.version>
|
||||
|
||||
<!-- dependencies -->
|
||||
<jstl.version>1.2</jstl.version>
|
||||
<apache-jsp.version>${jetty.version}</apache-jsp.version>
|
||||
<jetty-annotations.version>${jetty.version}</jetty-annotations.version>
|
||||
<glassfish-jstl.version>${jetty.version}</glassfish-jstl.version>
|
||||
<!-- jlatexmath -->
|
||||
<jlatexmath.version>1.0.7</jlatexmath.version>
|
||||
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
|
||||
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
|
||||
<!-- PDF -->
|
||||
<batik-all.version>1.16</batik-all.version>
|
||||
<fop.version>2.8</fop.version>
|
||||
|
||||
<!-- Testing -->
|
||||
<junit.version>5.9.3</junit.version>
|
||||
<junit-suite.version>1.9.3</junit-suite.version>
|
||||
<selenium.version>4.9.1</selenium.version>
|
||||
<selenium-webdrivermanager.version>5.3.3</selenium-webdrivermanager.version>
|
||||
<commons-io.version>2.11.0</commons-io.version>
|
||||
<jetty-server.version>${jetty.version}</jetty-server.version>
|
||||
|
||||
<!-- build plugin management -->
|
||||
<!-- lock down plugins versions to avoid using Maven defaults -->
|
||||
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
|
||||
<maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
<versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
|
||||
<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
|
||||
<maven-project-info-reports-plugin.version>3.4.3</maven-project-info-reports-plugin.version>
|
||||
<maven-checkstyle-plugin.version>3.2.2</maven-checkstyle-plugin.version>
|
||||
<checkstyle.version>9.3</checkstyle.version><!-- no JDK8 support starting version 10.0.0 -->
|
||||
<!-- no JDK8 support starting version 10.0.0 -->
|
||||
<checkstyle.version>9.3</checkstyle.version>
|
||||
|
||||
<!-- plugins -->
|
||||
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
|
||||
<jetty-runner.version>${jetty.version}</jetty-runner.version>
|
||||
<jetty-maven-plugin.version>${jetty.version}</jetty-maven-plugin.version>
|
||||
<duplicate-finder-maven-plugin.version>1.5.1</duplicate-finder-maven-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
|
||||
<resources-optimizer-maven-plugin.version>2.4.4</resources-optimizer-maven-plugin.version><!-- no JDK8 support starting version 2.5.0 -->
|
||||
<!-- no JDK8 support starting version 2.5.0 -->
|
||||
<resources-optimizer-maven-plugin.version>2.4.4</resources-optimizer-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantuml</artifactId>
|
||||
<version>${plantuml.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
@ -155,82 +64,8 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- jlatexmath -->
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath</artifactId>
|
||||
<version>${jlatexmath.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-greek</artifactId>
|
||||
<version>${jlatexmath-font-greek.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-cyrillic</artifactId>
|
||||
<version>${jlatexmath-font-cyrillic.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- PDF
|
||||
PlantUMLs PDF generation requires:
|
||||
- batik-dom
|
||||
- batik-svgrasterizer (includes batik-dom)
|
||||
- batik-svggen
|
||||
- fop
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svgrasterizer</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svggen</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>fop</artifactId>
|
||||
<version>${fop.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-suite-api</artifactId>
|
||||
<version>${junit-suite.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>${selenium.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>webdrivermanager</artifactId>
|
||||
<version>${selenium-webdrivermanager.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
@ -244,393 +79,4 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>plantuml</finalName>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>${maven-clean-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${maven-resources-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>${maven-install-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
|
||||
<linkXRef>false</linkXRef>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<outputFile>${project.build.directory}/outdated-dependencies.txt</outputFile>
|
||||
<rulesUri>file:///${basedir}/src/main/config/rules.xml</rulesUri>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<skipTests>${skipTests}</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>display-property-updates</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.basepom.maven</groupId>
|
||||
<artifactId>duplicate-finder-maven-plugin</artifactId>
|
||||
<version>${duplicate-finder-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<ignoredResourcePatterns>
|
||||
<ignoredResourcePattern>^about\.html$</ignoredResourcePattern>
|
||||
<ignoredResourcePattern>^license/LICENSE\.dom-software\.txt$</ignoredResourcePattern>
|
||||
<ignoredResourcePattern>^org/apache/batik/apps/rasterizer/resources/rasterizer\.policy$</ignoredResourcePattern>
|
||||
</ignoredResourcePatterns>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
<source>${java.version}</source>
|
||||
<failOnWarnings>true</failOnWarnings>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<!-- To provide webjars for the embedded jetty server for junit tests -->
|
||||
<id>unpack-resources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<includes>**/min/vs/loader.js,**/min/vs/**/*,**/min-maps/vs/**/*</includes>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
<version>${jetty-runner.version}</version>
|
||||
<destFileName>jetty-runner.jar</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>${maven-eclipse-plugin.version}</version>
|
||||
<configuration>
|
||||
<wtpversion>${wtp.version}</wtpversion>
|
||||
<wtpContextName>${wtp.contextName}</wtpContextName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${jetty-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<!-- jetty.xml
|
||||
Only necessary to support old proxy.
|
||||
The old proxy needs empty path segments support in URIs.
|
||||
Hence: allow AMBIGUOUS_EMPTY_SEGMENT
|
||||
-->
|
||||
<jettyXmls>${basedir}/src/main/config/jetty.xml</jettyXmls>
|
||||
<scanIntervalSeconds>5</scanIntervalSeconds>
|
||||
<webApp>
|
||||
<contextPath>${jetty.contextpath}</contextPath>
|
||||
</webApp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>*.jspf</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-minified-resources</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludeDefaultDirectories>true</excludeDefaultDirectories>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp/min</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.primefaces.extensions</groupId>
|
||||
<artifactId>resources-optimizer-maven-plugin</artifactId>
|
||||
<version>${resources-optimizer-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>optimize</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>optimize</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<warningLevel>DEFAULT</warningLevel>
|
||||
<failOnWarning>true</failOnWarning>
|
||||
<suffix>.min</suffix>
|
||||
<languageIn>ECMASCRIPT_2020</languageIn>
|
||||
<languageOut>ECMASCRIPT5_STRICT</languageOut>
|
||||
<emitUseStrict>true</emitUseStrict>
|
||||
<resourcesSets>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp</inputDir>
|
||||
<includes>
|
||||
<include>components/**/*.js</include>
|
||||
<include>js/**/*.js</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>js/language/**</exclude>
|
||||
</excludes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/js/language</inputDir>
|
||||
<includes>
|
||||
<include>language.js</include>
|
||||
<include>validation/validation.js</include>
|
||||
<include>**/*.js</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml-language.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/components</inputDir>
|
||||
<includes>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.css</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
</resourcesSets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>index</report>
|
||||
<report>dependencies</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<!-- <report>dependency-updates-report</report> -->
|
||||
<!-- <report>plugin-updates-report</report> -->
|
||||
<report>property-updates-report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>html</id>
|
||||
<reports>
|
||||
<report>javadoc</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>checkstyle</report>
|
||||
<report>checkstyle-aggregate</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
||||
|
673
pom.parent.xml
Normal file
673
pom.parent.xml
Normal file
@ -0,0 +1,673 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>org.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantumlservlet-parent</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>PlantUML Servlet</name>
|
||||
<url>https://plantuml.github.io/plantuml-server/index.html</url>
|
||||
|
||||
<properties>
|
||||
<!-- NOTE: property `java.version` has to be set inside the child pom. -->
|
||||
<!-- <java.version>XX</java.version> -->
|
||||
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<!--
|
||||
Skip tests by default.
|
||||
Run tests manually:
|
||||
- mvn test -DskipTests=false
|
||||
- mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
-->
|
||||
<skipTests>true</skipTests>
|
||||
<!--
|
||||
JS and CSS compression / minify
|
||||
If false minify is enabled.
|
||||
Dev Tipp: set to `true` and run `mvn fizzed-watcher:run` while developing the frontend
|
||||
-->
|
||||
<withoutCSSJSCompress>false</withoutCSSJSCompress>
|
||||
|
||||
<!--
|
||||
This artifact is required for:
|
||||
1. EmbeddedJettyServer -> scope: test
|
||||
2. Tomcat docker image -> scope: compile
|
||||
BUT: Jetty docker image as well as jetty-runner will crash on runtime if
|
||||
this artifact is included because it's already provided so that the
|
||||
artifact would apear multiple times on the classpath.
|
||||
You can test it via: `mvn jetty:run [-Dapache-jsp.scope=compile]`
|
||||
Error: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: org.eclipse.jetty.apache.jsp.JuliLog not a subtype
|
||||
HENCE: Default is the "test" scope and for Tomcat docker image building add:
|
||||
-Dapache-jsp.scope=compile
|
||||
-->
|
||||
<apache-jsp.scope>test</apache-jsp.scope>
|
||||
|
||||
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
|
||||
<wtp.version>1.5</wtp.version>
|
||||
<wtp.contextName>plantuml</wtp.contextName>
|
||||
|
||||
<jetty.http.port>8080</jetty.http.port>
|
||||
<jetty.contextpath>/${wtp.contextName}</jetty.contextpath>
|
||||
|
||||
<!-- main versions -->
|
||||
<plantuml.version>1.2023.8</plantuml.version>
|
||||
<!-- Please keep the jetty version identical with the docker image -->
|
||||
<jetty.version>11.0.15</jetty.version>
|
||||
<!--
|
||||
While changing the version, please update the versions in the following files as well:
|
||||
- src/main/webapp/components/app-head.jsp (script import)
|
||||
- src/main/webapp/components/editor/editor.js : loadMonacoCodeEditorAsync (require.config)
|
||||
- src/test/java/net/sourceforge/plantuml/servlet/TestDependencies.java : testMonacoEditorWebJar (JUnit Test)
|
||||
-->
|
||||
<monaco-editor.version>0.36.1</monaco-editor.version>
|
||||
|
||||
<!-- dependencies -->
|
||||
<jstl.version>1.2</jstl.version>
|
||||
<apache-jsp.version>${jetty.version}</apache-jsp.version>
|
||||
<jetty-annotations.version>${jetty.version}</jetty-annotations.version>
|
||||
<glassfish-jstl.version>${jetty.version}</glassfish-jstl.version>
|
||||
<!-- jlatexmath -->
|
||||
<jlatexmath.version>1.0.7</jlatexmath.version>
|
||||
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
|
||||
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
|
||||
<!-- PDF -->
|
||||
<batik-all.version>1.16</batik-all.version>
|
||||
<fop.version>2.8</fop.version>
|
||||
|
||||
<!-- Testing -->
|
||||
<junit.version>5.9.3</junit.version>
|
||||
<junit-suite.version>1.9.3</junit-suite.version>
|
||||
<selenium.version>4.10.0</selenium.version>
|
||||
<selenium-webdrivermanager.version>5.3.3</selenium-webdrivermanager.version>
|
||||
<commons-io.version>2.11.0</commons-io.version>
|
||||
<jetty-server.version>${jetty.version}</jetty-server.version>
|
||||
|
||||
<!-- build plugin management -->
|
||||
<!-- lock down plugins versions to avoid using Maven defaults -->
|
||||
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
|
||||
<maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
<versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
|
||||
<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
|
||||
<maven-project-info-reports-plugin.version>3.4.3</maven-project-info-reports-plugin.version>
|
||||
<maven-checkstyle-plugin.version>3.2.2</maven-checkstyle-plugin.version>
|
||||
<checkstyle.version>10.12.0</checkstyle.version>
|
||||
|
||||
<!-- plugins -->
|
||||
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
|
||||
<jetty-runner.version>${jetty.version}</jetty-runner.version>
|
||||
<jetty-maven-plugin.version>${jetty.version}</jetty-maven-plugin.version>
|
||||
<duplicate-finder-maven-plugin.version>1.5.1</duplicate-finder-maven-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
|
||||
<resources-optimizer-maven-plugin.version>2.5.6</resources-optimizer-maven-plugin.version>
|
||||
<fizzed-watcher-maven-plugin.verson>1.0.6</fizzed-watcher-maven-plugin.verson>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantuml</artifactId>
|
||||
<version>${plantuml.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
<version>${apache-jsp.version}</version>
|
||||
<scope>${apache-jsp.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>${jetty-annotations.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- jlatexmath -->
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath</artifactId>
|
||||
<version>${jlatexmath.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-greek</artifactId>
|
||||
<version>${jlatexmath-font-greek.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-cyrillic</artifactId>
|
||||
<version>${jlatexmath-font-cyrillic.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- PDF
|
||||
PlantUMLs PDF generation requires:
|
||||
- batik-dom
|
||||
- batik-svgrasterizer (includes batik-dom)
|
||||
- batik-svggen
|
||||
- fop
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svgrasterizer</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svggen</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>fop</artifactId>
|
||||
<version>${fop.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-suite-api</artifactId>
|
||||
<version>${junit-suite.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>${selenium.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>webdrivermanager</artifactId>
|
||||
<version>${selenium-webdrivermanager.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${jetty-server.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>plantuml</finalName>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>${maven-clean-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${maven-resources-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>${maven-install-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
</plugin>
|
||||
<!-- set up java style rules -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
|
||||
<linkXRef>false</linkXRef>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- set up version validation rules -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<outputFile>${project.build.directory}/outdated-dependencies.txt</outputFile>
|
||||
<rulesUri>file:///${basedir}/src/main/config/rules.xml</rulesUri>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<!-- set java compile version -->
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- configure surefire to skip unit tests if skipTests is set -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<skipTests>${skipTests}</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- configure plugin for project's reports -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<!-- setup java style checks -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- check and display possible version updates during validation
|
||||
manual execution:
|
||||
- mvn versions:display-property-updates
|
||||
- mvn versions:display-dependency-updates
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>display-property-updates</goal>
|
||||
<goal>display-dependency-updates</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- check for duplicate classes/resources
|
||||
also see:
|
||||
- mvn dependency:analyze
|
||||
- mvn dependency:tree
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.basepom.maven</groupId>
|
||||
<artifactId>duplicate-finder-maven-plugin</artifactId>
|
||||
<version>${duplicate-finder-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<ignoredResourcePatterns>
|
||||
<ignoredResourcePattern>^about\.html$</ignoredResourcePattern>
|
||||
<ignoredResourcePattern>^license/LICENSE\.dom-software\.txt$</ignoredResourcePattern>
|
||||
<!-- <ignoredResourcePattern>^org/apache/batik/apps/rasterizer/resources/rasterizer\.policy$</ignoredResourcePattern> -->
|
||||
</ignoredResourcePatterns>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- check for missing java documentation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
<source>${java.version}</source>
|
||||
<failOnWarnings>true</failOnWarnings>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- provide dependencies -->
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
<executions>
|
||||
<!-- provide webjars for the embedded jetty server for junit tests -->
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<id>unpack-resources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<includes>**/min/vs/loader.js,**/min/vs/**/*,**/min-maps/vs/**/*</includes>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- provide jetty-runner -->
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
<version>${jetty-runner.version}</version>
|
||||
<destFileName>jetty-runner.jar</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- configure eclipse web tools platform (WTP) -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>${maven-eclipse-plugin.version}</version>
|
||||
<configuration>
|
||||
<wtpversion>${wtp.version}</wtpversion>
|
||||
<wtpContextName>${wtp.contextName}</wtpContextName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- configure jetty -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${jetty-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<!-- jetty.xml
|
||||
Only necessary to support old proxy.
|
||||
The old proxy needs empty path segments support in URIs.
|
||||
Hence: allow AMBIGUOUS_EMPTY_SEGMENT
|
||||
-->
|
||||
<jettyXmls>${basedir}/src/main/config/jetty.xml</jettyXmls>
|
||||
<scanIntervalSeconds>5</scanIntervalSeconds>
|
||||
<webApp>
|
||||
<contextPath>${jetty.contextpath}</contextPath>
|
||||
</webApp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- configure java server pages (JSP) web resources -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>*.jspf</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- remove minified web resources (css, js) before regeneration -->
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-minified-resources</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludeDefaultDirectories>true</excludeDefaultDirectories>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp/min</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- optimize/minimize web resources (css, js) -->
|
||||
<plugin>
|
||||
<groupId>org.primefaces.extensions</groupId>
|
||||
<artifactId>resources-optimizer-maven-plugin</artifactId>
|
||||
<version>${resources-optimizer-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>optimize</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>optimize</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<warningLevel>DEFAULT</warningLevel>
|
||||
<failOnWarning>true</failOnWarning>
|
||||
<suffix>.min</suffix>
|
||||
<languageIn>ECMASCRIPT_2020</languageIn>
|
||||
<languageOut>ECMASCRIPT5_STRICT</languageOut>
|
||||
<emitUseStrict>true</emitUseStrict>
|
||||
<resourcesSets>
|
||||
<!-- combine and optimize all JS files for the web server except the PlantUML JS language features -->
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp</inputDir>
|
||||
<includes>
|
||||
<include>components/**/*.js</include>
|
||||
<include>js/**/*.js</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>js/language/**</exclude>
|
||||
</excludes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<!-- combine and optimize all PlantUML JS language features -->
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/js/language</inputDir>
|
||||
<includes>
|
||||
<include>language.js</include>
|
||||
<include>validation/validation.js</include>
|
||||
<include>**/*.js</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml-language.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<!-- combine and optimize all web server style files -->
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/components</inputDir>
|
||||
<includes>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.css</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
</resourcesSets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- watch for changes in web resources (css, js) and regenerate minified resources (only for development) -->
|
||||
<plugin>
|
||||
<groupId>com.fizzed</groupId>
|
||||
<artifactId>fizzed-watcher-maven-plugin</artifactId>
|
||||
<version>${fizzed-watcher-maven-plugin.verson}</version>
|
||||
<configuration>
|
||||
<watches>
|
||||
<watch>
|
||||
<directory>${basedir}/src/main/webapp/components</directory>
|
||||
<recursive>true</recursive>
|
||||
<includes>
|
||||
<include>*.js</include>
|
||||
<include>*.css</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>*.min.js</exclude>
|
||||
<exclude>*.min.css</exclude>
|
||||
</excludes>
|
||||
</watch>
|
||||
</watches>
|
||||
<goals>
|
||||
<goal>clean:clean@clean-minified-resources</goal>
|
||||
<goal>org.primefaces.extensions:resources-optimizer-maven-plugin:optimize</goal>
|
||||
</goals>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>index</report>
|
||||
<report>dependencies</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<!-- <report>dependency-updates-report</report> -->
|
||||
<!-- <report>plugin-updates-report</report> -->
|
||||
<report>property-updates-report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>html</id>
|
||||
<reports>
|
||||
<report>javadoc</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>checkstyle</report>
|
||||
<report>checkstyle-aggregate</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
633
pom.xml
633
pom.xml
@ -6,638 +6,17 @@
|
||||
>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantumlservlet</artifactId>
|
||||
<artifactId>plantumlservlet-parent</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<relativePath>pom.parent.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<name>PlantUML Servlet</name>
|
||||
<url>https://plantuml.github.io/plantuml-server/index.html</url>
|
||||
<artifactId>plantumlservlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<!--
|
||||
Skip tests by default.
|
||||
Run tests manually:
|
||||
- mvn test -DskipTests=false
|
||||
- mvn test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
|
||||
-->
|
||||
<skipTests>true</skipTests>
|
||||
<!--
|
||||
JS and CSS compression / minify
|
||||
If false minify is enabled.
|
||||
Dev Tipp: set to `true` and run `mvn fizzed-watcher:run` while developing the frontend
|
||||
-->
|
||||
<withoutCSSJSCompress>false</withoutCSSJSCompress>
|
||||
|
||||
<!--
|
||||
This artifact is required for:
|
||||
1. EmbeddedJettyServer -> scope: test
|
||||
2. Tomcat docker image -> scope: compile
|
||||
BUT: Jetty docker image as well as jetty-runner will crash on runtime if
|
||||
this artifact is included because it's already provided so that the
|
||||
artifact would apear multiple times on the classpath.
|
||||
You can test it via: `mvn jetty:run [-Dapache-jsp.scope=compile]`
|
||||
Error: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: org.eclipse.jetty.apache.jsp.JuliLog not a subtype
|
||||
HENCE: Default is the "test" scope and for Tomcat docker image building add:
|
||||
-Dapache-jsp.scope=compile
|
||||
-->
|
||||
<apache-jsp.scope>test</apache-jsp.scope>
|
||||
|
||||
<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
|
||||
<wtp.version>1.5</wtp.version>
|
||||
<wtp.contextName>plantuml</wtp.contextName>
|
||||
|
||||
<jetty.http.port>8080</jetty.http.port>
|
||||
<jetty.contextpath>/${wtp.contextName}</jetty.contextpath>
|
||||
|
||||
<!-- main versions -->
|
||||
<plantuml.version>1.2023.8</plantuml.version>
|
||||
<!-- Please keep the jetty version identical with the docker image -->
|
||||
<jetty.version>11.0.15</jetty.version>
|
||||
<!--
|
||||
While changing the version, please update the versions in the following files as well:
|
||||
- src/main/webapp/components/app-head.jsp (script import)
|
||||
- src/main/webapp/components/editor/editor.js : loadMonacoCodeEditorAsync (require.config)
|
||||
- src/test/java/net/sourceforge/plantuml/servlet/TestDependencies.java : testMonacoEditorWebJar (JUnit Test)
|
||||
as well as inside the pom.jdk8.xml :D
|
||||
-->
|
||||
<monaco-editor.version>0.36.1</monaco-editor.version>
|
||||
|
||||
<!-- dependencies -->
|
||||
<jstl.version>1.2</jstl.version>
|
||||
<apache-jsp.version>${jetty.version}</apache-jsp.version>
|
||||
<jetty-annotations.version>${jetty.version}</jetty-annotations.version>
|
||||
<glassfish-jstl.version>${jetty.version}</glassfish-jstl.version>
|
||||
<!-- jlatexmath -->
|
||||
<jlatexmath.version>1.0.7</jlatexmath.version>
|
||||
<jlatexmath-font-greek.version>${jlatexmath.version}</jlatexmath-font-greek.version>
|
||||
<jlatexmath-font-cyrillic.version>${jlatexmath.version}</jlatexmath-font-cyrillic.version>
|
||||
<!-- PDF -->
|
||||
<batik-all.version>1.16</batik-all.version>
|
||||
<fop.version>2.8</fop.version>
|
||||
|
||||
<!-- Testing -->
|
||||
<junit.version>5.9.3</junit.version>
|
||||
<junit-suite.version>1.9.3</junit-suite.version>
|
||||
<selenium.version>4.9.1</selenium.version>
|
||||
<selenium-webdrivermanager.version>5.3.3</selenium-webdrivermanager.version>
|
||||
<commons-io.version>2.11.0</commons-io.version>
|
||||
<jetty-server.version>${jetty.version}</jetty-server.version>
|
||||
|
||||
<!-- build plugin management -->
|
||||
<!-- lock down plugins versions to avoid using Maven defaults -->
|
||||
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
|
||||
<maven-dependency-plugin.version>3.5.0</maven-dependency-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
<versions-maven-plugin.version>2.15.0</versions-maven-plugin.version>
|
||||
<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
|
||||
<maven-project-info-reports-plugin.version>3.4.3</maven-project-info-reports-plugin.version>
|
||||
<maven-checkstyle-plugin.version>3.2.2</maven-checkstyle-plugin.version>
|
||||
<checkstyle.version>10.11.0</checkstyle.version>
|
||||
|
||||
<!-- plugins -->
|
||||
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
|
||||
<jetty-runner.version>${jetty.version}</jetty-runner.version>
|
||||
<jetty-maven-plugin.version>${jetty.version}</jetty-maven-plugin.version>
|
||||
<duplicate-finder-maven-plugin.version>1.5.1</duplicate-finder-maven-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
|
||||
<resources-optimizer-maven-plugin.version>2.5.6</resources-optimizer-maven-plugin.version>
|
||||
<fizzed-watcher-maven-plugin.verson>1.0.6</fizzed-watcher-maven-plugin.verson>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.plantuml</groupId>
|
||||
<artifactId>plantuml</artifactId>
|
||||
<version>${plantuml.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>apache-jsp</artifactId>
|
||||
<version>${apache-jsp.version}</version>
|
||||
<scope>${apache-jsp.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
<version>${jetty-annotations.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- jlatexmath -->
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath</artifactId>
|
||||
<version>${jlatexmath.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-greek</artifactId>
|
||||
<version>${jlatexmath-font-greek.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.scilab.forge</groupId>
|
||||
<artifactId>jlatexmath-font-cyrillic</artifactId>
|
||||
<version>${jlatexmath-font-cyrillic.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- PDF
|
||||
PlantUMLs PDF generation requires:
|
||||
- batik-dom
|
||||
- batik-svgrasterizer (includes batik-dom)
|
||||
- batik-svggen
|
||||
- fop
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svgrasterizer</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>batik-svggen</artifactId>
|
||||
<version>${batik-all.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>fop</artifactId>
|
||||
<version>${fop.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-suite-api</artifactId>
|
||||
<version>${junit-suite.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>${selenium.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>webdrivermanager</artifactId>
|
||||
<version>${selenium-webdrivermanager.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${jetty-server.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>plantuml</finalName>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>${maven-clean-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${maven-resources-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>${maven-install-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>${basedir}/src/main/config/checkstyle.xml</configLocation>
|
||||
<linkXRef>false</linkXRef>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<failsOnError>true</failsOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<outputFile>${project.build.directory}/outdated-dependencies.txt</outputFile>
|
||||
<rulesUri>file:///${basedir}/src/main/config/rules.xml</rulesUri>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<skipTests>${skipTests}</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven-site-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>display-property-updates</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.basepom.maven</groupId>
|
||||
<artifactId>duplicate-finder-maven-plugin</artifactId>
|
||||
<version>${duplicate-finder-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<ignoredResourcePatterns>
|
||||
<ignoredResourcePattern>^about\.html$</ignoredResourcePattern>
|
||||
<ignoredResourcePattern>^license/LICENSE\.dom-software\.txt$</ignoredResourcePattern>
|
||||
<ignoredResourcePattern>^org/apache/batik/apps/rasterizer/resources/rasterizer\.policy$</ignoredResourcePattern>
|
||||
</ignoredResourcePatterns>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
<source>${java.version}</source>
|
||||
<failOnWarnings>true</failOnWarnings>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e execute onConfiguration,onIncremental?>
|
||||
<!-- To provide webjars for the embedded jetty server for junit tests -->
|
||||
<id>unpack-resources</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>monaco-editor</artifactId>
|
||||
<version>${monaco-editor.version}</version>
|
||||
<includes>**/min/vs/loader.js,**/min/vs/**/*,**/min-maps/vs/**/*</includes>
|
||||
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-runner</artifactId>
|
||||
<version>${jetty-runner.version}</version>
|
||||
<destFileName>jetty-runner.jar</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>${maven-eclipse-plugin.version}</version>
|
||||
<configuration>
|
||||
<wtpversion>${wtp.version}</wtpversion>
|
||||
<wtpContextName>${wtp.contextName}</wtpContextName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>${jetty-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<!-- jetty.xml
|
||||
Only necessary to support old proxy.
|
||||
The old proxy needs empty path segments support in URIs.
|
||||
Hence: allow AMBIGUOUS_EMPTY_SEGMENT
|
||||
-->
|
||||
<jettyXmls>${basedir}/src/main/config/jetty.xml</jettyXmls>
|
||||
<scanIntervalSeconds>5</scanIntervalSeconds>
|
||||
<webApp>
|
||||
<contextPath>${jetty.contextpath}</contextPath>
|
||||
</webApp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<configuration>
|
||||
<webResources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>*.jspf</include>
|
||||
</includes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</webResources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean-minified-resources</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludeDefaultDirectories>true</excludeDefaultDirectories>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp/min</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.primefaces.extensions</groupId>
|
||||
<artifactId>resources-optimizer-maven-plugin</artifactId>
|
||||
<version>${resources-optimizer-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>optimize</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>optimize</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<warningLevel>DEFAULT</warningLevel>
|
||||
<failOnWarning>true</failOnWarning>
|
||||
<suffix>.min</suffix>
|
||||
<languageIn>ECMASCRIPT_2020</languageIn>
|
||||
<languageOut>ECMASCRIPT5_STRICT</languageOut>
|
||||
<emitUseStrict>true</emitUseStrict>
|
||||
<resourcesSets>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp</inputDir>
|
||||
<includes>
|
||||
<include>components/**/*.js</include>
|
||||
<include>js/**/*.js</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>js/language/**</exclude>
|
||||
</excludes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/js/language</inputDir>
|
||||
<includes>
|
||||
<include>language.js</include>
|
||||
<include>validation/validation.js</include>
|
||||
<include>**/*.js</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml-language.min.js</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
<resourcesSet>
|
||||
<inputDir>${basedir}/src/main/webapp/components</inputDir>
|
||||
<includes>
|
||||
<include>**/*.css</include>
|
||||
</includes>
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<withoutCompress>${withoutCSSJSCompress}</withoutCompress>
|
||||
<removeIncluded>false</removeIncluded>
|
||||
<outputFile>${basedir}/src/main/webapp/min/plantuml.min.css</outputFile>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
</resourcesSet>
|
||||
</resourcesSets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.fizzed</groupId>
|
||||
<artifactId>fizzed-watcher-maven-plugin</artifactId>
|
||||
<version>${fizzed-watcher-maven-plugin.verson}</version>
|
||||
<configuration>
|
||||
<watches>
|
||||
<watch>
|
||||
<directory>${basedir}/src/main/webapp/components</directory>
|
||||
<recursive>true</recursive>
|
||||
<includes>
|
||||
<include>*.js</include>
|
||||
<include>*.css</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>*.min.js</exclude>
|
||||
<exclude>*.min.css</exclude>
|
||||
</excludes>
|
||||
</watch>
|
||||
</watches>
|
||||
<goals>
|
||||
<goal>clean:clean@clean-minified-resources</goal>
|
||||
<goal>org.primefaces.extensions:resources-optimizer-maven-plugin:optimize</goal>
|
||||
</goals>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>${maven-project-info-reports-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>index</report>
|
||||
<report>dependencies</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>${versions-maven-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<!-- <report>dependency-updates-report</report> -->
|
||||
<!-- <report>plugin-updates-report</report> -->
|
||||
<report>property-updates-report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>html</id>
|
||||
<reports>
|
||||
<report>javadoc</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${maven-checkstyle-plugin.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>checkstyle</report>
|
||||
<report>checkstyle-aggregate</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</project>
|
||||
|
6
src/main/webapp/min/plantuml.min.js
vendored
6
src/main/webapp/min/plantuml.min.js
vendored
@ -43,11 +43,11 @@ var r=n.substring(n.lastIndexOf(".")+1).toLowerCase();k=["txt","puml","plantuml"
|
||||
return{type:p,isDiagramCode:h,valid:p||h}}function e(h,t){function p(k){var n=new FormData;n.append("diagram",k,k.name);return makeRequest("POST","metadata",{data:n,responseType:"json",headers:{Accept:"application/json"}})}f.classList.add("wait");return(new Promise(function(k,n){if(t.type)p(h).then(function(r){setEditorValue(document.editor,r.decoded);k()},function(r){r=r.response;l.innerText=r.message||r;n()});else if(t.isDiagramCode){var q=new FileReader;q.onload=function(r){setEditorValue(document.editor,
|
||||
r.target.result)};q.readAsText(h);k()}else l.innerText="File not supported. Only PNG and SVG diagram images as well as PlantUML code text files are supported.",n()})).then(function(){return b()},function(){}).finally(function(){return f.classList.remove("wait")})}var f=document.getElementById("diagram-import"),g=document.getElementById("diagram-import-input"),m=document.getElementById("diagram-import-ok-btn"),l=document.getElementById("diagram-import-error-message");window.addEventListener("dragenter",
|
||||
function(h){h.stopPropagation();h.preventDefault();isVisible(f)||a(!1)},!1);g.addEventListener("dragenter",function(h){return h.target.classList.add("drop-able")},!1);g.addEventListener("dragover",function(h){h.stopPropagation();h.preventDefault();null!==h.dataTransfer&&(h.dataTransfer.dropEffect="copy")},!1);g.addEventListener("dragexit",function(h){return h.target.classList.remove("drop-able")},!1);g.addEventListener("drop",function(h){function t(){h.stopPropagation();h.preventDefault()}var p=h.dataTransfer.files||
|
||||
h.target.files;if(!p||1>p.length)return t();p=p[0];var k=d(p);if(!k.valid)return t();"true"!==f.dataset.isOpenManually&&(t(),e(p,k))},!1);m.addEventListener("click",function(){var h=g.files[0];e(h,d(h))});registerModalListener("diagram-import",a,b)}
|
||||
h.target.files;if(!p||1>p.length)return t();p=p[0];var k=d(p);if(!k.valid)return t();"true"!==f.dataset.isOpenManually&&(t(),e(p,k))},!1);g.addEventListener("change",function(h){return c(h.target)});m.addEventListener("click",function(){var h=g.files[0];e(h,d(h))});registerModalListener("diagram-import",a,b)}
|
||||
var $jscomp$destructuring$var16=function(){var a={};return{registerModalListener:function(b,c,d){a[b]={fnOpen:c,fnClose:d}},openModal:function(b){var c=$jscomp.getRestArguments.apply(1,arguments),d,e=null==(d=a[b])?void 0:d.fnOpen;e?e.apply(null,$jscomp.arrayFromIterable(c)):setVisibility(document.getElementById(b),!0,!0)},closeModal:function(b){var c=$jscomp.getRestArguments.apply(1,arguments),d,e=null==(d=a[b])?void 0:d.fnClose;e?e.apply(null,$jscomp.arrayFromIterable(c)):setVisibility(document.getElementById(b),
|
||||
!1)}}}(),registerModalListener=$jscomp$destructuring$var16.registerModalListener,openModal=$jscomp$destructuring$var16.openModal,closeModal=$jscomp$destructuring$var16.closeModal;
|
||||
function initModals(a){function b(c){"Escape"===c.key||"Esc"===c.key?(c.preventDefault(),closeModal(c.target.closest(".modal").id)):"Enter"===c.key&&(c.preventDefault(),(c=modal.querySelector('input.ok[type\x3d"button"]'))&&!c.disabled&&c.click())}document.querySelectorAll(".modal").forEach(function(c){c.addEventListener("keydown",b,!1)});initSettings();"previewer"!==a&&(initDiagramExport(),initDiagramImport())}function isModalOpen(a){return isVisible(document.getElementById(a))}
|
||||
function closeAllModals(){document.querySelectorAll(".modal").forEach(function(a){return closeModal(a.id)})}
|
||||
function initModals(a){function b(c){"Escape"===c.key||"Esc"===c.key?(c.preventDefault(),closeModal(c.target.closest(".modal").id)):"Enter"===c.key&&(c.preventDefault(),(c=c.target.closest(".modal").querySelector('input.ok[type\x3d"button"]'))&&!c.disabled&&c.click())}document.querySelectorAll(".modal").forEach(function(c){c.addEventListener("keydown",b,!1)});initSettings();"previewer"!==a&&(initDiagramExport(),initDiagramImport())}
|
||||
function isModalOpen(a){return isVisible(document.getElementById(a))}function closeAllModals(){document.querySelectorAll(".modal").forEach(function(a){return closeModal(a.id)})}
|
||||
function initSettings(){function a(){setVisibility(document.getElementById("settings"),!0,!0);b.value=document.appConfig.theme;c.value=document.appConfig.diagramPreviewType;d.value=document.appConfig.editorWatcherTimeout;setEditorValue(document.settingsEditor,JSON.stringify(document.appConfig.editorCreateOptions,null," "))}var b=document.getElementById("theme"),c=document.getElementById("diagramPreviewType"),d=document.getElementById("editorWatcherTimeout");document.settingsEditor=monaco.editor.create(document.getElementById("settings-monaco-editor"),
|
||||
Object.assign({},{language:"json"},document.appConfig.editorCreateOptions));b.addEventListener("change",function(e){e=e.target.value;var f=document.settingsEditor.getValue();setEditorValue(document.settingsEditor,f.replace(new RegExp('("theme"\\s*:\\s*)"'+("dark"===e?"vs":"vs-dark")+'"',"gm"),'$1"'+("dark"===e?"vs-dark":"vs")+'"'))});document.getElementById("settings-ok-btn").addEventListener("click",function(){var e=Object.assign({},document.appConfig);e.theme=b.value;e.editorWatcherTimeout=d.value;
|
||||
e.diagramPreviewType=c.value;e.editorCreateOptions=JSON.parse(document.settingsEditor.getValue());updateConfig(e);closeModal("settings")});window.addEventListener("keydown",function(e){","===e.key&&(isMac?e.metaKey:e.ctrlKey)&&(e.preventDefault(),isModalOpen("settings")||a())},!1);registerModalListener("settings",a)}
|
||||
|
Loading…
Reference in New Issue
Block a user