[ci] Update gitattributes and allow skipping docs generation for Windows CI workflows (#7273)

This commit is contained in:
Jim Schubert 2020-08-22 22:14:04 -04:00 committed by GitHub
parent da84d8e3bf
commit 0e9c6dd9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 2703 additions and 2662 deletions

29
.gitattributes vendored
View File

@ -1 +1,28 @@
**/*.mustache linguist-vendored=true
* text=auto
## Windows Specific stuff
*.vcproj text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.txt text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.json text eol=lf
*.md text eol=lf
*.xml text eol=lf
gradlew text eol=lf
*.sh text eol=lf
*.properties text eol=lf
*.java text eol=lf
.gitignore text eol=lf
.gradle text eol=lf
.sbt text eol=lf
.scala text eol=lf
.ts text eol=lf
.adoc text eol=lf
.svg text eol=lf
*.mustache text eol=lf linguist-vendored=true
*.hbs text eol=lf linguist-vendored=true
*.handlebars text eol=lf linguist-vendored=true

View File

@ -65,7 +65,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
include:
- os: windows-latest
flags: --skip-docs
steps:
- name: Check out code
uses: actions/checkout@v2
@ -79,4 +82,4 @@ jobs:
git config core.fileMode false
mkdir -p modules/openapi-generator-cli/target/
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
./bin/utils/ensure-up-to-date
./bin/utils/ensure-up-to-date ${{ matrix.flags }}

View File

@ -19,6 +19,13 @@ if [ $status -ne 0 ]; then
exit $status
fi
if [[ "--skip-docs" == "${1}" ]]; then
# We export here rather than modify our iterable so that:
# - the scripts can show they ran and echo meaningfully
# - the scripts can do cleanup (if necessary) when skipped
export SKIP_EXPORT_DOCS=true
fi
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
# Docs should always be run, regardless of batch or operation.
declare -a always_iterate=(

View File

@ -5,6 +5,11 @@ echo "# START SCRIPT: ${SCRIPT}"
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
if [[ "true" == "${SKIP_EXPORT_DOCS}" ]]; then
echo "Skipping doc exports. Note that docs generated by Windows may break paths as they have not yet been normalized to OS-specific paths."
exit 0
fi
for GENERATOR in $(java -jar ${executable} list --short --include all | sed -e 's/,/\'$'\n''/g')
do
./bin/utils/export_generator.sh ${GENERATOR}

View File

@ -110,9 +110,6 @@ hs_err_pid*
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*

View File

@ -1,84 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,100 +1,100 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1352,7 +1352,9 @@ public class DefaultGenerator implements Generator {
}
});
String relativeMeta = METADATA_DIR + File.separator + "VERSION";
// NOTE: Don't use File.separator here as we write linux-style paths to FILES, and File.separator will
// result in incorrect match on Windows machines.
String relativeMeta = METADATA_DIR + "/VERSION";
filesToSort.sort(PathFileComparator.PATH_COMPARATOR);
filesToSort.forEach(f -> {
String tmp = outDir.toPath().relativize(f.toPath()).normalize().toString();

View File

@ -1,152 +1,152 @@
package org.openapitools.codegen.asciidoc;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.io.FileUtils;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.MockDefaultGenerator;
import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.Test;
import io.swagger.v3.oas.models.OpenAPI;
/** unit test asciidoc markup generation against ping.yaml openapi spec. */
public class AsciidocGeneratorTest {
private static final Logger LOGGER = LoggerFactory.getLogger(AsciidocGeneratorTest.class);
@Test
public void testPingSpecTitle() throws Exception {
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/ping.yaml");
AsciidocDocumentationCodegen codeGen = new AsciidocDocumentationCodegen();
codeGen.preprocessOpenAPI(openAPI);
Assert.assertEquals(openAPI.getInfo().getTitle(), "ping test");
}
@Test
public void testGenerateIndexAsciidocMarkupFileWithAsciidocGenerator() throws Exception {
File output = Files.createTempDirectory("test").toFile();
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml").setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY-SNIPPET-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "MY-SPEC-DIR");
final ClientOptInput clientOptInput = configurator.toClientOptInput();
DefaultGenerator generator = new DefaultGenerator();
generator.setGenerateMetadata(false);
List<File> generatedFiles = generator.opts(clientOptInput).generate();
TestUtils.ensureContainsFile(generatedFiles, output, "index.adoc");
}
@Test
public void testGenerateIndexAsciidocMarkupContent() throws Exception {
final File output = Files.createTempDirectory("test").toFile();
output.mkdirs();
output.deleteOnExit();
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/ping.yaml");
CodegenConfig codegenConfig = new AsciidocDocumentationCodegen();
codegenConfig.setOutputDir(output.getAbsolutePath());
ClientOptInput clientOptInput = new ClientOptInput().openAPI(openAPI).config(codegenConfig);
DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(clientOptInput).generate();
boolean markupFileGenerated = false;
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
// check on some basic asciidoc markup content
Assert.assertTrue(markupContent.contains("= ping test"),
"expected = header in: " + markupContent.substring(0, 50));
Assert.assertTrue(markupContent.contains(":toc: "),
"expected = :toc: " + markupContent.substring(0, 50));
}
}
Assert.assertTrue(markupFileGenerated, "Default api file is not generated!");
}
@Test
public void testAdditionalDirectoriesGeneratedIntoHeaderAttributes() throws Exception {
File output = Files.createTempDirectory("test").toFile();
LOGGER.info("test: generating sample markup " + output.getAbsolutePath());
Map<String, Object> props = new TreeMap<String, Object>();
props.put("specDir", "spec");
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml").setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "SPEC-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY/SNIPPET/DIR");
DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(configurator.toClientOptInput()).generate();
boolean markupFileGenerated = false;
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
Assert.assertTrue(markupContent.contains(":specDir: SPEC-DIR"),
"expected :specDir: in: " + markupContent.substring(0, 250));
Assert.assertTrue(markupContent.contains(":snippetDir: MY/SNIPPET/DIR"),
"expected :snippetDir: in: " + markupContent.substring(0, 250));
}
}
Assert.assertTrue(markupFileGenerated, "index.adoc is not generated!");
}
@Test
public void testHeaderAttributesFlagRemovesAttributesFromMarkupHeaderSection() throws Exception {
File output = Files.createTempDirectory("test").toFile();
LOGGER.info("test: generating sample markup " + output.getAbsolutePath());
Map<String, Object> props = new TreeMap<String, Object>();
props.put("specDir", "spec");
final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml")
.setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.HEADER_ATTRIBUTES_FLAG, "false") // option avoids generation of attributes
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "SPEC-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY/SNIPPET/DIR");
DefaultGenerator generator = new DefaultGenerator();
boolean markupFileGenerated = false;
List<File> files = generator.opts(configurator.toClientOptInput()).generate();
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
Assert.assertFalse(markupContent.contains(":specDir: SPEC-DIR"),
"not expected :specDir: in: " + markupContent.substring(0, 250));
Assert.assertFalse(markupContent.contains(":snippetDir: MY/SNIPPET/DIR"),
"not expected :snippetDir: in: " + markupContent.substring(0, 250));
Assert.assertFalse(markupContent.contains(":toc:"),
"not expected :toc: in: " + markupContent.substring(0, 250)); // typical attributes not found in markup.
}
}
Assert.assertTrue(markupFileGenerated, "index.adoc is not generated!");
}
}
package org.openapitools.codegen.asciidoc;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.apache.commons.io.FileUtils;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.MockDefaultGenerator;
import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.Test;
import io.swagger.v3.oas.models.OpenAPI;
/** unit test asciidoc markup generation against ping.yaml openapi spec. */
public class AsciidocGeneratorTest {
private static final Logger LOGGER = LoggerFactory.getLogger(AsciidocGeneratorTest.class);
@Test
public void testPingSpecTitle() throws Exception {
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/ping.yaml");
AsciidocDocumentationCodegen codeGen = new AsciidocDocumentationCodegen();
codeGen.preprocessOpenAPI(openAPI);
Assert.assertEquals(openAPI.getInfo().getTitle(), "ping test");
}
@Test
public void testGenerateIndexAsciidocMarkupFileWithAsciidocGenerator() throws Exception {
File output = Files.createTempDirectory("test").toFile();
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml").setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY-SNIPPET-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "MY-SPEC-DIR");
final ClientOptInput clientOptInput = configurator.toClientOptInput();
DefaultGenerator generator = new DefaultGenerator();
generator.setGenerateMetadata(false);
List<File> generatedFiles = generator.opts(clientOptInput).generate();
TestUtils.ensureContainsFile(generatedFiles, output, "index.adoc");
}
@Test
public void testGenerateIndexAsciidocMarkupContent() throws Exception {
final File output = Files.createTempDirectory("test").toFile();
output.mkdirs();
output.deleteOnExit();
final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/ping.yaml");
CodegenConfig codegenConfig = new AsciidocDocumentationCodegen();
codegenConfig.setOutputDir(output.getAbsolutePath());
ClientOptInput clientOptInput = new ClientOptInput().openAPI(openAPI).config(codegenConfig);
DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(clientOptInput).generate();
boolean markupFileGenerated = false;
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
// check on some basic asciidoc markup content
Assert.assertTrue(markupContent.contains("= ping test"),
"expected = header in: " + markupContent.substring(0, 50));
Assert.assertTrue(markupContent.contains(":toc: "),
"expected = :toc: " + markupContent.substring(0, 50));
}
}
Assert.assertTrue(markupFileGenerated, "Default api file is not generated!");
}
@Test
public void testAdditionalDirectoriesGeneratedIntoHeaderAttributes() throws Exception {
File output = Files.createTempDirectory("test").toFile();
LOGGER.info("test: generating sample markup " + output.getAbsolutePath());
Map<String, Object> props = new TreeMap<String, Object>();
props.put("specDir", "spec");
final CodegenConfigurator configurator = new CodegenConfigurator().setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml").setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "SPEC-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY/SNIPPET/DIR");
DefaultGenerator generator = new DefaultGenerator();
List<File> files = generator.opts(configurator.toClientOptInput()).generate();
boolean markupFileGenerated = false;
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
Assert.assertTrue(markupContent.contains(":specDir: SPEC-DIR"),
"expected :specDir: in: " + markupContent.substring(0, 250));
Assert.assertTrue(markupContent.contains(":snippetDir: MY/SNIPPET/DIR"),
"expected :snippetDir: in: " + markupContent.substring(0, 250));
}
}
Assert.assertTrue(markupFileGenerated, "index.adoc is not generated!");
}
@Test
public void testHeaderAttributesFlagRemovesAttributesFromMarkupHeaderSection() throws Exception {
File output = Files.createTempDirectory("test").toFile();
LOGGER.info("test: generating sample markup " + output.getAbsolutePath());
Map<String, Object> props = new TreeMap<String, Object>();
props.put("specDir", "spec");
final CodegenConfigurator configurator = new CodegenConfigurator()
.setGeneratorName("asciidoc")
.setInputSpec("src/test/resources/3_0/ping.yaml")
.setOutputDir(output.getAbsolutePath())
.addAdditionalProperty(AsciidocDocumentationCodegen.HEADER_ATTRIBUTES_FLAG, "false") // option avoids generation of attributes
.addAdditionalProperty(AsciidocDocumentationCodegen.SPEC_DIR, "SPEC-DIR")
.addAdditionalProperty(AsciidocDocumentationCodegen.SNIPPET_DIR, "MY/SNIPPET/DIR");
DefaultGenerator generator = new DefaultGenerator();
boolean markupFileGenerated = false;
List<File> files = generator.opts(configurator.toClientOptInput()).generate();
for (File file : files) {
if (file.getName().equals("index.adoc")) {
markupFileGenerated = true;
String markupContent = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
Assert.assertFalse(markupContent.contains(":specDir: SPEC-DIR"),
"not expected :specDir: in: " + markupContent.substring(0, 250));
Assert.assertFalse(markupContent.contains(":snippetDir: MY/SNIPPET/DIR"),
"not expected :snippetDir: in: " + markupContent.substring(0, 250));
Assert.assertFalse(markupContent.contains(":toc:"),
"not expected :toc: in: " + markupContent.substring(0, 250)); // typical attributes not found in markup.
}
}
Assert.assertTrue(markupFileGenerated, "index.adoc is not generated!");
}
}

View File

@ -1,47 +1,47 @@
package org.openapitools.codegen.asciidoc;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.mockito.MockitoAnnotations;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.openapitools.codegen.templating.mustache.LambdaTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.Assert;
public class LinkMarkupFilterTest extends LambdaTest {
@BeforeMethod
public void setup() {
MockitoAnnotations.initMocks(this);
}
@Test
public void testLinkMarkupFilterDoesNotLinkMissingFile() {
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("link", generator.new LinkMarkupLambda("DOES_NOT_EXIST"));
final String result = execute("{{#link}}not.an.existing.file.adoc{{/link}}", ctx);
Assert.assertTrue(result.contains("// file not found, no"), "unexpected filtered: " + result);
}
@Test
public void testLinkMarkupFilterLinksFoundFileOk() throws IOException {
File tempFile = File.createTempFile("LinkMarkupFilterTestDummyfile", ".adoc");
tempFile.deleteOnExit();
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("linkIntoMarkup", generator.new LinkMarkupLambda(tempFile.getParent()));
final String result = execute("{{#linkIntoMarkup}}my link text, " + tempFile.getName() + "{{/linkIntoMarkup}}",
ctx);
Assert.assertTrue(result.contains("link:"), "unexpected filtered: " + result);
Assert.assertTrue(result.contains(tempFile.getName() + "[]"), "unexpected filtered: " + result);
}
}
package org.openapitools.codegen.asciidoc;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.mockito.MockitoAnnotations;
import org.openapitools.codegen.languages.AsciidocDocumentationCodegen;
import org.openapitools.codegen.templating.mustache.LambdaTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.Assert;
public class LinkMarkupFilterTest extends LambdaTest {
@BeforeMethod
public void setup() {
MockitoAnnotations.initMocks(this);
}
@Test
public void testLinkMarkupFilterDoesNotLinkMissingFile() {
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("link", generator.new LinkMarkupLambda("DOES_NOT_EXIST"));
final String result = execute("{{#link}}not.an.existing.file.adoc{{/link}}", ctx);
Assert.assertTrue(result.contains("// file not found, no"), "unexpected filtered: " + result);
}
@Test
public void testLinkMarkupFilterLinksFoundFileOk() throws IOException {
File tempFile = File.createTempFile("LinkMarkupFilterTestDummyfile", ".adoc");
tempFile.deleteOnExit();
final AsciidocDocumentationCodegen generator = new AsciidocDocumentationCodegen();
final Map<String, Object> ctx = context("linkIntoMarkup", generator.new LinkMarkupLambda(tempFile.getParent()));
final String result = execute("{{#linkIntoMarkup}}my link text, " + tempFile.getName() + "{{/linkIntoMarkup}}",
ctx);
Assert.assertTrue(result.contains("link:"), "unexpected filtered: " + result);
Assert.assertTrue(result.contains(tempFile.getName() + "[]"), "unexpected filtered: " + result);
}
}

View File

@ -1,314 +1,314 @@
/*
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openapitools.codegen.mysql;
import org.openapitools.codegen.languages.MysqlSchemaCodegen;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;
public class MysqlSchemaCodegenTest {
@Test
public void testGetMysqlMatchedIntegerDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(null, null, null), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-128L, 127L, false), "TINYINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 255L, true), "TINYINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, null), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, true), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, false), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-32768L, 32767L, false), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 65535L, true), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-8388608L, 8388607L, false), "MEDIUMINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 16777215L, true), "MEDIUMINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-2147483648L, 2147483647L, false), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(Long.parseLong(String.valueOf(Integer.MIN_VALUE)), Long.parseLong(String.valueOf(Integer.MAX_VALUE)), false), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 4294967295L, true), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-2147483649L, 2147483648L, false), "BIGINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 4294967296L, true), "BIGINT");
}
@Test
public void testGetMysqlMatchedStringDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getMysqlMatchedStringDataType(6, 6), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(0, 0), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(255, 255), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 100), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 255), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(50, 255), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 20), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(255, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 256), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777215, null), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777215, 100), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 16777215), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 16777215), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777216, null), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777216, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, Integer.MAX_VALUE), "LONGTEXT");
}
@Test
public void testToCodegenMysqlDataTypeArgument() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
String strArgument = "HelloWorld";
HashMap<String, Object> strProp = codegen.toCodegenMysqlDataTypeArgument(strArgument, true);
Assert.assertTrue((Boolean) strProp.get("isString"));
Assert.assertTrue((Boolean) strProp.get("hasMore"));
Assert.assertFalse((Boolean) strProp.get("isFloat"));
Assert.assertFalse((Boolean) strProp.get("isInteger"));
Assert.assertFalse((Boolean) strProp.get("isNumeric"));
Assert.assertSame((String) strProp.get("argumentValue"), strArgument);
Integer intArgument = 10;
HashMap<String, Object> intProp = codegen.toCodegenMysqlDataTypeArgument(intArgument, true);
Assert.assertFalse((Boolean) intProp.get("isString"));
Assert.assertTrue((Boolean) intProp.get("hasMore"));
Assert.assertFalse((Boolean) intProp.get("isFloat"));
Assert.assertTrue((Boolean) intProp.get("isInteger"));
Assert.assertTrue((Boolean) intProp.get("isNumeric"));
Assert.assertSame((Integer) intProp.get("argumentValue"), intArgument);
Double floatArgument = 3.14;
HashMap<String, Object> floatProp = codegen.toCodegenMysqlDataTypeArgument(floatArgument, false);
Assert.assertFalse((Boolean) floatProp.get("isString"));
Assert.assertFalse((Boolean) floatProp.get("hasMore"));
Assert.assertTrue((Boolean) floatProp.get("isFloat"));
Assert.assertFalse((Boolean) floatProp.get("isInteger"));
Assert.assertTrue((Boolean) floatProp.get("isNumeric"));
Assert.assertSame((Double) floatProp.get("argumentValue"), floatArgument);
}
@Test
public void testToCodegenMysqlDataTypeDefault() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
HashMap<String, Object> defaultMap = null;
ArrayList<String> intFixture = new ArrayList<String>(Arrays.asList(
"TINYINT", "SmallInt", "Mediumint", "INT", "bigint"
));
for(String intType : intFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("150", intType);
Assert.assertTrue((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "150");
}
defaultMap = codegen.toCodegenMysqlDataTypeDefault("SERIAL DEFAULT VALUE", "TINYINT");
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertTrue((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "SERIAL DEFAULT VALUE");
ArrayList<String> dateFixture = new ArrayList<String>(Arrays.asList(
"Timestamp", "DateTime"
));
for(String dateType : dateFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("2018-08-12", dateType);
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertTrue((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "2018-08-12");
}
defaultMap = codegen.toCodegenMysqlDataTypeDefault("CURRENT_TIMESTAMP", "Timestamp");
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertTrue((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "CURRENT_TIMESTAMP");
ArrayList<String> restFixture = new ArrayList<String>(Arrays.asList(
"VARCHAR", "CHAR", "ENUM", "UNKNOWN"
));
for(String restType : restFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("sometext", restType);
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertTrue((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "sometext");
}
}
@Test(expectedExceptions = RuntimeException.class)
public void testToCodegenMysqlDataTypeDefaultWithExceptionalColumnType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
HashMap<String, Object> defaultMap = null;
ArrayList<String> specialFixture = new ArrayList<String>(Arrays.asList(
"TINYBLOB", "Blob", "MEDIUMBLOB", "LONGBLOB", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT", "GEOMETRY", "JSON"
));
for(String specialType : specialFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("2018-08-12", specialType);
Assert.assertNull(defaultMap);
}
}
@Test
public void testIsMysqlDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
ArrayList<String> trueFixture = new ArrayList<String>(Arrays.asList(
"INTEGER", "integer", "Integer", "DATETIME", "datetime", "DateTime", "VARCHAR", "varchar", "VarChar", "POINT", "Point", "point", "JSON", "json", "Json"
));
ArrayList<String> falseFixture = new ArrayList<String>(Arrays.asList(
"unknown", "HashMap", "HASHMAP", "hashmap"
));
for(String trueValue : trueFixture) {
Assert.assertTrue(codegen.isMysqlDataType(trueValue), "'" + trueValue + "' isn't MySQL data type");
}
for(String falseValue : falseFixture) {
Assert.assertFalse(codegen.isMysqlDataType(falseValue), "'" + falseValue + "' is MySQL data type");
}
}
@Test
public void testToMysqlIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.toMysqlIdentifier("table_name", "tbl_", ""), "table_name");
Assert.assertEquals(codegen.toMysqlIdentifier("table_name ", "tbl_", ""), "table_name");
Assert.assertEquals(codegen.toMysqlIdentifier("12345678", "tbl_", ""), "tbl_12345678");
}
@Test(expectedExceptions = RuntimeException.class)
public void testToMysqlIdentifierWithEmptyString() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.toMysqlIdentifier(" ", "tbl_", "");
}
@Test
public void testEscapeMysqlUnquotedIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_"), "table1Z$_");
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_!#%~&?()*+-./"), "table1Z$_");
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_русскийтекст"), "table1Z$_русскийтекст");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table𐀀"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name!'()<29>"), "table_name!'()<29>");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name𐌅𐌌"), "table_name");
}
@Test
public void testEscapeMysqlQuotedIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table𐀀"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name!'()<29>"), "table_name!'()<29>");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name𐌅𐌌"), "table_name");
}
@Test
public void testIsReservedWord() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Set<String> reservedWords = codegen.reservedWords();
ArrayList<String> trueFixture = new ArrayList<String>(Arrays.asList(
"accessible", "asc", "between", "blob", "change", "column", "day_hour", "distinct", "enclosed", "except", "explain", "float", "for", "function", "grant", "grouping", "high_priority", "groups", "hour_minute", "insensitive", "interval", "json_table", "keys", "kill", "leave", "left", "mediumblob", "modifies", "not", "null", "numeric", "optimize", "outer", "precision", "primary", "references", "replace", "select", "sql", "then", "tinytext", "unique", "unlock", "varchar", "virtual", "when", "where", "xor", "year_month", "zerofill"
));
ArrayList<String> falseFixture = new ArrayList<String>(Arrays.asList(
"after", "boolean", "charset", "cpu", "current", "delay_key_write", "end", "format", "global", "host", "install", "json", "key_block_size", "local", "max_size", "none", "offset", "partial", "quarter", "relay", "second", "status", "timestamp", "until", "variables", "without", "xml", "year"
));
for(String trueValue : trueFixture) {
Assert.assertTrue(reservedWords.contains(trueValue), "'" + trueValue + "' isn't MySQL reserved word");
}
for(String falseValue : falseFixture) {
Assert.assertFalse(reservedWords.contains(falseValue), "'" + falseValue + "' is MySQL reserved word");
}
}
@Test
public void testSetDefaultDatabaseName() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setDefaultDatabaseName("valid_db_name");
Assert.assertSame(codegen.getDefaultDatabaseName(), "valid_db_name");
codegen.setDefaultDatabaseName("12345");
Assert.assertNotSame(codegen.getDefaultDatabaseName(), "12345");
}
@Test
public void testGetDefaultDatabaseName() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getDefaultDatabaseName(), "");
}
@Test
public void testSetJsonDataTypeEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setJsonDataTypeEnabled(true);
Assert.assertTrue(codegen.getJsonDataTypeEnabled());
codegen.setJsonDataTypeEnabled(false);
Assert.assertFalse(codegen.getJsonDataTypeEnabled());
}
@Test
public void testGetJsonDataTypeEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertTrue(codegen.getJsonDataTypeEnabled());
codegen.setJsonDataTypeEnabled(false);
Assert.assertFalse(codegen.getJsonDataTypeEnabled());
}
@Test
public void testSetNamedParametersEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setNamedParametersEnabled(true);
Assert.assertTrue(codegen.getNamedParametersEnabled());
codegen.setNamedParametersEnabled(false);
Assert.assertFalse(codegen.getNamedParametersEnabled());
}
@Test
public void testGetNamedParametersEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertFalse(codegen.getNamedParametersEnabled());
codegen.setNamedParametersEnabled(true);
Assert.assertTrue(codegen.getNamedParametersEnabled());
}
@Test
public void testSetIdentifierNamingConvention() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("invalidValue");
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("snake_case");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("anotherInvalid");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
}
@Test
public void testGetIdentifierNamingConvention() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("snake_case");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
}
}
/*
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openapitools.codegen.mysql;
import org.openapitools.codegen.languages.MysqlSchemaCodegen;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;
public class MysqlSchemaCodegenTest {
@Test
public void testGetMysqlMatchedIntegerDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(null, null, null), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-128L, 127L, false), "TINYINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 255L, true), "TINYINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, null), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, true), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(500L, 100L, false), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-32768L, 32767L, false), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 65535L, true), "SMALLINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-8388608L, 8388607L, false), "MEDIUMINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 16777215L, true), "MEDIUMINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-2147483648L, 2147483647L, false), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(Long.parseLong(String.valueOf(Integer.MIN_VALUE)), Long.parseLong(String.valueOf(Integer.MAX_VALUE)), false), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 4294967295L, true), "INT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(-2147483649L, 2147483648L, false), "BIGINT");
Assert.assertSame(codegen.getMysqlMatchedIntegerDataType(0L, 4294967296L, true), "BIGINT");
}
@Test
public void testGetMysqlMatchedStringDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getMysqlMatchedStringDataType(6, 6), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(0, 0), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(255, 255), "CHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 100), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 255), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(50, 255), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 20), "VARCHAR");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(255, null), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 256), "TEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777215, null), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777215, 100), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 16777215), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 16777215), "MEDIUMTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777216, null), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(null, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(16777216, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, 16777216), "LONGTEXT");
Assert.assertSame(codegen.getMysqlMatchedStringDataType(100, Integer.MAX_VALUE), "LONGTEXT");
}
@Test
public void testToCodegenMysqlDataTypeArgument() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
String strArgument = "HelloWorld";
HashMap<String, Object> strProp = codegen.toCodegenMysqlDataTypeArgument(strArgument, true);
Assert.assertTrue((Boolean) strProp.get("isString"));
Assert.assertTrue((Boolean) strProp.get("hasMore"));
Assert.assertFalse((Boolean) strProp.get("isFloat"));
Assert.assertFalse((Boolean) strProp.get("isInteger"));
Assert.assertFalse((Boolean) strProp.get("isNumeric"));
Assert.assertSame((String) strProp.get("argumentValue"), strArgument);
Integer intArgument = 10;
HashMap<String, Object> intProp = codegen.toCodegenMysqlDataTypeArgument(intArgument, true);
Assert.assertFalse((Boolean) intProp.get("isString"));
Assert.assertTrue((Boolean) intProp.get("hasMore"));
Assert.assertFalse((Boolean) intProp.get("isFloat"));
Assert.assertTrue((Boolean) intProp.get("isInteger"));
Assert.assertTrue((Boolean) intProp.get("isNumeric"));
Assert.assertSame((Integer) intProp.get("argumentValue"), intArgument);
Double floatArgument = 3.14;
HashMap<String, Object> floatProp = codegen.toCodegenMysqlDataTypeArgument(floatArgument, false);
Assert.assertFalse((Boolean) floatProp.get("isString"));
Assert.assertFalse((Boolean) floatProp.get("hasMore"));
Assert.assertTrue((Boolean) floatProp.get("isFloat"));
Assert.assertFalse((Boolean) floatProp.get("isInteger"));
Assert.assertTrue((Boolean) floatProp.get("isNumeric"));
Assert.assertSame((Double) floatProp.get("argumentValue"), floatArgument);
}
@Test
public void testToCodegenMysqlDataTypeDefault() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
HashMap<String, Object> defaultMap = null;
ArrayList<String> intFixture = new ArrayList<String>(Arrays.asList(
"TINYINT", "SmallInt", "Mediumint", "INT", "bigint"
));
for(String intType : intFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("150", intType);
Assert.assertTrue((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "150");
}
defaultMap = codegen.toCodegenMysqlDataTypeDefault("SERIAL DEFAULT VALUE", "TINYINT");
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertTrue((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "SERIAL DEFAULT VALUE");
ArrayList<String> dateFixture = new ArrayList<String>(Arrays.asList(
"Timestamp", "DateTime"
));
for(String dateType : dateFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("2018-08-12", dateType);
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertTrue((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "2018-08-12");
}
defaultMap = codegen.toCodegenMysqlDataTypeDefault("CURRENT_TIMESTAMP", "Timestamp");
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertFalse((Boolean) defaultMap.get("isString"));
Assert.assertTrue((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "CURRENT_TIMESTAMP");
ArrayList<String> restFixture = new ArrayList<String>(Arrays.asList(
"VARCHAR", "CHAR", "ENUM", "UNKNOWN"
));
for(String restType : restFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("sometext", restType);
Assert.assertFalse((Boolean) defaultMap.get("isNumeric"));
Assert.assertTrue((Boolean) defaultMap.get("isString"));
Assert.assertFalse((Boolean) defaultMap.get("isKeyword"));
Assert.assertSame(defaultMap.get("defaultValue"), "sometext");
}
}
@Test(expectedExceptions = RuntimeException.class)
public void testToCodegenMysqlDataTypeDefaultWithExceptionalColumnType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
HashMap<String, Object> defaultMap = null;
ArrayList<String> specialFixture = new ArrayList<String>(Arrays.asList(
"TINYBLOB", "Blob", "MEDIUMBLOB", "LONGBLOB", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT", "GEOMETRY", "JSON"
));
for(String specialType : specialFixture) {
defaultMap = codegen.toCodegenMysqlDataTypeDefault("2018-08-12", specialType);
Assert.assertNull(defaultMap);
}
}
@Test
public void testIsMysqlDataType() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
ArrayList<String> trueFixture = new ArrayList<String>(Arrays.asList(
"INTEGER", "integer", "Integer", "DATETIME", "datetime", "DateTime", "VARCHAR", "varchar", "VarChar", "POINT", "Point", "point", "JSON", "json", "Json"
));
ArrayList<String> falseFixture = new ArrayList<String>(Arrays.asList(
"unknown", "HashMap", "HASHMAP", "hashmap"
));
for(String trueValue : trueFixture) {
Assert.assertTrue(codegen.isMysqlDataType(trueValue), "'" + trueValue + "' isn't MySQL data type");
}
for(String falseValue : falseFixture) {
Assert.assertFalse(codegen.isMysqlDataType(falseValue), "'" + falseValue + "' is MySQL data type");
}
}
@Test
public void testToMysqlIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.toMysqlIdentifier("table_name", "tbl_", ""), "table_name");
Assert.assertEquals(codegen.toMysqlIdentifier("table_name ", "tbl_", ""), "table_name");
Assert.assertEquals(codegen.toMysqlIdentifier("12345678", "tbl_", ""), "tbl_12345678");
}
@Test(expectedExceptions = RuntimeException.class)
public void testToMysqlIdentifierWithEmptyString() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.toMysqlIdentifier(" ", "tbl_", "");
}
@Test
public void testEscapeMysqlUnquotedIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_"), "table1Z$_");
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_!#%~&?()*+-./"), "table1Z$_");
Assert.assertEquals(codegen.escapeMysqlUnquotedIdentifier("table1Z$_русскийтекст"), "table1Z$_русскийтекст");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table𐀀"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name!'()<29>"), "table_name!'()<29>");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name𐌅𐌌"), "table_name");
}
@Test
public void testEscapeMysqlQuotedIdentifier() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table𐀀"), "table");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name!'()<29>"), "table_name!'()<29>");
Assert.assertEquals(codegen.escapeMysqlQuotedIdentifier("table_name𐌅𐌌"), "table_name");
}
@Test
public void testIsReservedWord() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Set<String> reservedWords = codegen.reservedWords();
ArrayList<String> trueFixture = new ArrayList<String>(Arrays.asList(
"accessible", "asc", "between", "blob", "change", "column", "day_hour", "distinct", "enclosed", "except", "explain", "float", "for", "function", "grant", "grouping", "high_priority", "groups", "hour_minute", "insensitive", "interval", "json_table", "keys", "kill", "leave", "left", "mediumblob", "modifies", "not", "null", "numeric", "optimize", "outer", "precision", "primary", "references", "replace", "select", "sql", "then", "tinytext", "unique", "unlock", "varchar", "virtual", "when", "where", "xor", "year_month", "zerofill"
));
ArrayList<String> falseFixture = new ArrayList<String>(Arrays.asList(
"after", "boolean", "charset", "cpu", "current", "delay_key_write", "end", "format", "global", "host", "install", "json", "key_block_size", "local", "max_size", "none", "offset", "partial", "quarter", "relay", "second", "status", "timestamp", "until", "variables", "without", "xml", "year"
));
for(String trueValue : trueFixture) {
Assert.assertTrue(reservedWords.contains(trueValue), "'" + trueValue + "' isn't MySQL reserved word");
}
for(String falseValue : falseFixture) {
Assert.assertFalse(reservedWords.contains(falseValue), "'" + falseValue + "' is MySQL reserved word");
}
}
@Test
public void testSetDefaultDatabaseName() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setDefaultDatabaseName("valid_db_name");
Assert.assertSame(codegen.getDefaultDatabaseName(), "valid_db_name");
codegen.setDefaultDatabaseName("12345");
Assert.assertNotSame(codegen.getDefaultDatabaseName(), "12345");
}
@Test
public void testGetDefaultDatabaseName() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame(codegen.getDefaultDatabaseName(), "");
}
@Test
public void testSetJsonDataTypeEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setJsonDataTypeEnabled(true);
Assert.assertTrue(codegen.getJsonDataTypeEnabled());
codegen.setJsonDataTypeEnabled(false);
Assert.assertFalse(codegen.getJsonDataTypeEnabled());
}
@Test
public void testGetJsonDataTypeEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertTrue(codegen.getJsonDataTypeEnabled());
codegen.setJsonDataTypeEnabled(false);
Assert.assertFalse(codegen.getJsonDataTypeEnabled());
}
@Test
public void testSetNamedParametersEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
codegen.setNamedParametersEnabled(true);
Assert.assertTrue(codegen.getNamedParametersEnabled());
codegen.setNamedParametersEnabled(false);
Assert.assertFalse(codegen.getNamedParametersEnabled());
}
@Test
public void testGetNamedParametersEnabled() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertFalse(codegen.getNamedParametersEnabled());
codegen.setNamedParametersEnabled(true);
Assert.assertTrue(codegen.getNamedParametersEnabled());
}
@Test
public void testSetIdentifierNamingConvention() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("invalidValue");
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("snake_case");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("anotherInvalid");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
}
@Test
public void testGetIdentifierNamingConvention() {
final MysqlSchemaCodegen codegen = new MysqlSchemaCodegen();
Assert.assertSame("original", codegen.getIdentifierNamingConvention());
codegen.setIdentifierNamingConvention("snake_case");
Assert.assertSame("snake_case", codegen.getIdentifierNamingConvention());
}
}

View File

@ -1,16 +1,16 @@
{
"id" : "238a47e3-2533-41a4-ac62-f6654c936ada",
"request" : {
"url" : "/rest/project/",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "[{\"id\":-3,\"name\":\"a third inactive project\",\"active\":false,\"projectLeads\":[{\"id\":-2,\"name\":\"another second lead\",\"userId\":\"tlead2\"},{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]},{\"id\":-2,\"name\":\"a second active project\",\"active\":true,\"projectLeads\":[{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]},{\"id\":-1,\"name\":\"a first active project\",\"active\":true,\"projectLeads\":[{\"id\":-2,\"name\":\"another second lead\",\"userId\":\"tlead2\"},{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]}]",
"headers" : {
"Vary" : [ "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers" ],
"Content-Type" : "application/json"
}
},
"uuid" : "238a47e3-2533-41a4-ac62-f6654c936ada"
{
"id" : "238a47e3-2533-41a4-ac62-f6654c936ada",
"request" : {
"url" : "/rest/project/",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "[{\"id\":-3,\"name\":\"a third inactive project\",\"active\":false,\"projectLeads\":[{\"id\":-2,\"name\":\"another second lead\",\"userId\":\"tlead2\"},{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]},{\"id\":-2,\"name\":\"a second active project\",\"active\":true,\"projectLeads\":[{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]},{\"id\":-1,\"name\":\"a first active project\",\"active\":true,\"projectLeads\":[{\"id\":-2,\"name\":\"another second lead\",\"userId\":\"tlead2\"},{\"id\":-1,\"name\":\"a first test lead and user\",\"userId\":\"tlead1\"}]}]",
"headers" : {
"Vary" : [ "Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers" ],
"Content-Type" : "application/json"
}
},
"uuid" : "238a47e3-2533-41a4-ac62-f6654c936ada"
}

View File

@ -6,6 +6,6 @@ Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 530
[{"id":-3,"name":"a third inactive project","active":false,"projectLeads":[{"id":-1,"name":"a first test lead and user","userId":"tlead1"},{"id":-2,"name":"another second lead","userId":"tlead2"}]},{"id":-2,"name":"a second active project","active":true,"projectLeads":[{"id":-1,"name":"a first test lead and user","userId":"tlead1"}]},{"id":-1,"name":"a first active project","active":true,"projectLeads":[{"id":-1,"name":"a first test lead and user","userId":"tlead1"},{"id":-2,"name":"another second lead","userId":"tlead2"}]}]
----

View File

@ -1,2 +1,2 @@
// optional, conditionally included implementation notes.

View File

@ -1,7 +1,7 @@
// spec to include
* all _projects_ visible for the _current user_ are returned
* _projects_ may be active or closed
USER: project lead, admin
// spec to include
* all _projects_ visible for the _current user_ are returned
* _projects_ may be active or closed
USER: project lead, admin

290
mvnw.cmd vendored
View File

@ -1,145 +1,145 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%

View File

@ -1,100 +1,100 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,84 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,100 +1,100 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,89 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="106px"
height="40px" viewBox="0 0 106 40" enable-background="new 0 0 106 40" xml:space="preserve">
<g id="Ebene_1">
<title>brand</title>
<desc></desc>
<path id="Combined-Shape" fill="#585858" d="M38.194,17.148H36.27c-0.234,0-0.364-0.078-0.39-0.234
c-0.26-1.092-0.546-2.158-0.78-3.224h-4.602c-0.078,0.26-0.546,2.184-0.78,3.224c-0.026,0.182-0.182,0.234-0.364,0.234H27.56
c-0.26,0-0.442-0.156-0.338-0.442l3.822-15.262c0.052-0.182,0.182-0.338,0.468-0.338h2.574c0.26,0,0.39,0.052,0.468,0.312
l3.926,15.236C38.558,16.862,38.506,17.148,38.194,17.148z M32.734,3.915c-0.208,1.066-0.468,2.106-0.676,3.172l-1.04,4.472h3.562
l-1.04-4.394l-0.728-3.25H32.734z"/>
<path id="Path" fill="#585858" d="M49.79,16.836V9.92c0-2.574-1.404-4.368-4.03-4.368c-0.936,0-2.158,0.312-2.938,1.04
c-0.026,0-0.052-0.026-0.078-0.026V5.995c0-0.234-0.078-0.312-0.286-0.312h-1.794c-0.208,0-0.312,0.13-0.312,0.338v10.816
c0,0.208,0.13,0.312,0.338,0.312h1.794c0.234,0,0.338-0.104,0.338-0.312V9.92c0-1.274,0.962-2.236,2.262-2.236
c1.56,0,2.236,0.962,2.236,2.262v6.89c0,0.208,0.104,0.312,0.338,0.312h1.82C49.686,17.148,49.79,17.044,49.79,16.836z"/>
<path id="Combined-Shape_1_" fill="#585858" d="M53.846,13.249c-1.17-0.78-1.872-2.028-1.872-3.536
c0-2.366,2.131-4.212,4.602-4.212c1.117,0,2.392,0.312,3.197,1.04c0.91-0.65,1.795-0.962,2.627-0.962c0.285,0,0.39,0.13,0.39,0.39
v1.456c0,0.26-0.052,0.312-0.261,0.312c-0.52,0-1.092-0.052-1.664,0.13c0.391,0.676,0.521,1.248,0.521,1.846
c0,2.444-2.157,4.238-4.81,4.238c-1.066,0-2.184,0.702-2.262,1.742c1.144-0.26,2.313-0.338,2.938-0.338
c2.496,0,5.304,0.806,5.304,3.458c0,1.534-1.378,2.938-2.729,3.536c-0.234,0.104-0.521,0.182-0.676-0.104l-0.703-1.065
c-0.129-0.208-0.077-0.39,0.209-0.546c0.701-0.417,1.404-1.066,1.404-1.716c0-1.118-1.509-1.404-2.757-1.404
c-1.118,0-2.756,0.208-4.004,0.39c-0.104,0.026-0.182,0.026-0.26,0.026c-0.702,0-0.988-1.3-0.988-2.132
C52.052,14.886,52.78,13.82,53.846,13.249z M58.941,9.816c0-1.17-0.936-2.184-2.235-2.184c-1.404,0-2.341,1.014-2.341,2.184
S55.225,12,56.602,12C58.031,12,58.941,11.013,58.941,9.816z"/>
<path id="Path_1_" fill="#585858" d="M64.22,6.021v6.916c0,2.574,1.378,4.342,4.03,4.342c0.936,0,2.184-0.286,2.964-1.014
c0,0,0.026,0.026,0.052,0.026v0.572c0,0.208,0.078,0.286,0.286,0.286h1.794c0.208,0,0.313-0.104,0.313-0.312V5.995
c0-0.182-0.131-0.312-0.338-0.312h-1.795c-0.207,0-0.338,0.13-0.338,0.338v6.89c0,1.3-0.961,2.262-2.236,2.262
c-1.586,0-2.262-0.988-2.262-2.262V5.995c0-0.182-0.104-0.312-0.338-0.312h-1.82C64.35,5.683,64.22,5.813,64.22,6.021z"/>
<path id="Path_2_" fill="#585858" d="M76.727,0.847v13c0,2.366,0.649,3.51,2.989,3.51c0.156,0,0.546,0,0.806-0.052
c0.234-0.026,0.364-0.104,0.364-0.416v-1.404c0-0.182-0.026-0.442-0.286-0.442h-0.312c-0.832,0-1.093-0.26-1.093-1.352V0.82
c0-0.156-0.104-0.234-0.26-0.234H76.96C76.804,0.586,76.727,0.69,76.727,0.847z"/>
<path id="Combined-Shape_2_" fill="#585858" d="M87.152,5.475c3.275,0,4.342,1.664,4.342,4.316v7.046
c0,0.234-0.104,0.312-0.286,0.312h-1.742c-0.183,0-0.26-0.104-0.26-0.26v-0.598l-0.078-0.026c-0.78,0.78-1.742,1.04-2.808,1.04
c-2.601,0-4.03-1.612-4.03-3.979c0-2.262,1.481-4.03,4.237-4.03c0.754,0,1.795,0.182,2.393,0.65h0.078V9.349
c0-1.17-0.572-1.82-2.184-1.82c-0.703,0-1.898,0.234-2.627,0.572c-0.26,0.104-0.39,0.052-0.468-0.156L83.277,6.67
c-0.051-0.182,0-0.364,0.156-0.416C84.422,5.787,85.826,5.475,87.152,5.475z M84.578,13.249c0,1.17,0.598,2.08,2.132,2.08
c1.3,0,2.132-0.884,2.132-2.08c0-1.17-0.676-2.08-2.132-2.08C85.41,11.168,84.578,12.052,84.578,13.249z"/>
<path id="Path_3_" fill="#585858" d="M94.718,5.708c-0.208,0-0.312,0.104-0.312,0.312v10.816c0,0.208,0.13,0.312,0.338,0.312h1.82
c0.207,0,0.312-0.104,0.312-0.312v-6.006c0-1.638,0.624-2.834,2.444-2.834c0.285,0,0.649,0.104,0.961,0.104
c0.131,0,0.234-0.078,0.287-0.338l0.363-1.664c0.026-0.078,0.026-0.13,0.026-0.208c0-0.286-0.521-0.39-1.118-0.39
c-1.326,0-2.521,0.754-3.12,1.742h-0.077V5.995c0-0.208-0.131-0.286-0.365-0.286H94.718z"/>
<path id="Path_4_" fill="#585858" d="M105.3,15.822c0-0.858-0.702-1.534-1.586-1.534c-0.832,0-1.534,0.702-1.534,1.534
s0.702,1.534,1.534,1.534C104.598,17.356,105.3,16.654,105.3,15.822z"/>
<path id="Path_5_" fill="#C30023" d="M38.09,34.625c0-3.146-2.496-3.979-4.758-4.811c-1.3-0.494-2.886-1.066-2.886-2.393
c0-1.715,1.17-2.287,2.522-2.287c0.91,0,1.872,0.338,2.938,0.936c0.26,0.13,0.572,0.156,0.728-0.104l0.65-1.118
c0.156-0.261,0.286-0.442-0.052-0.702c-1.378-0.962-2.99-1.248-4.472-1.248c-2.678,0-4.862,1.689-4.862,4.498
c0,2.859,2.418,3.874,4.446,4.576c1.638,0.572,3.172,1.144,3.172,2.73c0,1.455-1.092,2.34-3.016,2.34
c-1.066,0-2.34-0.494-3.198-1.326c-0.286-0.234-0.442-0.364-0.702-0.104l-0.988,1.015c-0.286,0.285-0.26,0.441-0.026,0.676
c1.118,1.326,3.042,1.976,4.966,1.976C35.75,39.278,38.09,37.537,38.09,34.625z"/>
<path id="Path_6_" fill="#C30023" d="M49.062,37.068c0.156-0.208,0.104-0.39-0.234-0.624l-1.066-0.702
c-0.312-0.208-0.442-0.156-0.65,0.104c-0.364,0.493-1.014,1.3-2.288,1.3c-1.274,0-2.262-0.91-2.262-2.158v-3.146
c0-1.273,0.988-2.209,2.288-2.209c0.598,0,1.612,0.441,2.132,1.248c0.156,0.26,0.338,0.494,0.702,0.233l1.17-0.832
c0.234-0.155,0.234-0.468,0.13-0.624c-0.988-1.43-2.444-2.158-4.082-2.158c-2.73,0-4.81,1.717-4.81,4.473v2.964
c0,2.678,1.898,4.368,4.758,4.368C46.618,39.305,48.022,38.603,49.062,37.068z"/>
<path id="Path_7_" fill="#C30023" d="M60.58,38.811V31.92c0-2.573-1.352-4.394-4.082-4.394c-0.832,0-2.028,0.208-2.809,0.91
l-0.104-0.026v-5.486c0-0.233-0.104-0.338-0.312-0.338h-1.82c-0.208,0-0.312,0.104-0.312,0.338v15.912
c0,0.209,0.13,0.313,0.338,0.313h1.794c0.234,0,0.337-0.104,0.337-0.338v-6.864c0-1.3,0.885-2.288,2.263-2.288
c1.56,0,2.235,0.963,2.235,2.288v6.89c0,0.209,0.104,0.313,0.338,0.313h1.82C60.477,39.148,60.58,39.045,60.58,38.811z"/>
<path id="Path_8_" fill="#C30023" d="M63.206,28.021v6.916c0,2.573,1.378,4.342,4.03,4.342c0.936,0,2.184-0.286,2.963-1.014
c0,0,0.027,0.026,0.053,0.026v0.571c0,0.208,0.078,0.286,0.286,0.286h1.794c0.208,0,0.313-0.104,0.313-0.313V27.994
c0-0.182-0.131-0.312-0.338-0.312h-1.795c-0.208,0-0.338,0.13-0.338,0.338v6.89c0,1.301-0.962,2.262-2.236,2.262
c-1.586,0-2.262-0.987-2.262-2.262v-6.916c0-0.182-0.104-0.312-0.338-0.312h-1.82C63.336,27.683,63.206,27.813,63.206,28.021z"/>
<path id="Path_9_" fill="#C30023" d="M75.712,22.847v13c0,2.366,0.649,3.51,2.989,3.51c0.156,0,0.547,0,0.807-0.052
c0.234-0.026,0.364-0.104,0.364-0.416v-1.404c0-0.182-0.026-0.441-0.286-0.441h-0.313c-0.832,0-1.092-0.261-1.092-1.353V22.82
c0-0.156-0.104-0.234-0.26-0.234h-1.977C75.79,22.586,75.712,22.69,75.712,22.847z"/>
<path id="Combined-Shape_3_" fill="#C30023" d="M90.844,33.246c0,0.416-0.313,0.702-0.624,0.702h-6.344v0.91
c0,1.248,0.676,2.313,2.262,2.313c1.04,0,1.872-0.676,2.366-1.273c0.208-0.26,0.391-0.234,0.572-0.104l1.066,0.728
c0.182,0.104,0.416,0.26,0.207,0.624c-0.91,1.534-2.496,2.158-4.264,2.158c-2.859,0-4.68-1.717-4.68-4.342v-2.938
c0-2.678,1.949-4.524,4.731-4.524c2.834,0,4.706,1.82,4.706,4.524V33.246z M86.138,29.606c-1.3,0-2.235,0.78-2.235,2.132v0.416
h4.472v-0.441C88.374,30.543,87.594,29.606,86.138,29.606z"/>
</g>
<g id="Ebene_2">
<g id="brand" transform="translate(-172.000000, -30.000000)">
<g transform="translate(172.000000, 30.000000)">
<g id="Group-2_1_" transform="translate(0.000000, 1.000000)">
<polygon id="Shape_2_" fill="#C30023" points="17.23,4.218 17.23,23.445 17.23,38 2.628,29.697 0,6.308 17.23,0 "/>
<polygon fill="none" points="14.282,20.012 20.164,20.012 17.225,12.752 "/>
</g>
</g>
</g>
<g>
<polygon fill="none" points="17.207,21.012 17.207,13.794 14.282,21.012 "/>
<polygon fill="#F8F8F8" points="14.348,21.012 17.271,13.794 17.271,6.265 7.22,29.391 10.975,29.391 12.999,24.207
17.271,24.207 17.271,21.012 "/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="106px"
height="40px" viewBox="0 0 106 40" enable-background="new 0 0 106 40" xml:space="preserve">
<g id="Ebene_1">
<title>brand</title>
<desc></desc>
<path id="Combined-Shape" fill="#585858" d="M38.194,17.148H36.27c-0.234,0-0.364-0.078-0.39-0.234
c-0.26-1.092-0.546-2.158-0.78-3.224h-4.602c-0.078,0.26-0.546,2.184-0.78,3.224c-0.026,0.182-0.182,0.234-0.364,0.234H27.56
c-0.26,0-0.442-0.156-0.338-0.442l3.822-15.262c0.052-0.182,0.182-0.338,0.468-0.338h2.574c0.26,0,0.39,0.052,0.468,0.312
l3.926,15.236C38.558,16.862,38.506,17.148,38.194,17.148z M32.734,3.915c-0.208,1.066-0.468,2.106-0.676,3.172l-1.04,4.472h3.562
l-1.04-4.394l-0.728-3.25H32.734z"/>
<path id="Path" fill="#585858" d="M49.79,16.836V9.92c0-2.574-1.404-4.368-4.03-4.368c-0.936,0-2.158,0.312-2.938,1.04
c-0.026,0-0.052-0.026-0.078-0.026V5.995c0-0.234-0.078-0.312-0.286-0.312h-1.794c-0.208,0-0.312,0.13-0.312,0.338v10.816
c0,0.208,0.13,0.312,0.338,0.312h1.794c0.234,0,0.338-0.104,0.338-0.312V9.92c0-1.274,0.962-2.236,2.262-2.236
c1.56,0,2.236,0.962,2.236,2.262v6.89c0,0.208,0.104,0.312,0.338,0.312h1.82C49.686,17.148,49.79,17.044,49.79,16.836z"/>
<path id="Combined-Shape_1_" fill="#585858" d="M53.846,13.249c-1.17-0.78-1.872-2.028-1.872-3.536
c0-2.366,2.131-4.212,4.602-4.212c1.117,0,2.392,0.312,3.197,1.04c0.91-0.65,1.795-0.962,2.627-0.962c0.285,0,0.39,0.13,0.39,0.39
v1.456c0,0.26-0.052,0.312-0.261,0.312c-0.52,0-1.092-0.052-1.664,0.13c0.391,0.676,0.521,1.248,0.521,1.846
c0,2.444-2.157,4.238-4.81,4.238c-1.066,0-2.184,0.702-2.262,1.742c1.144-0.26,2.313-0.338,2.938-0.338
c2.496,0,5.304,0.806,5.304,3.458c0,1.534-1.378,2.938-2.729,3.536c-0.234,0.104-0.521,0.182-0.676-0.104l-0.703-1.065
c-0.129-0.208-0.077-0.39,0.209-0.546c0.701-0.417,1.404-1.066,1.404-1.716c0-1.118-1.509-1.404-2.757-1.404
c-1.118,0-2.756,0.208-4.004,0.39c-0.104,0.026-0.182,0.026-0.26,0.026c-0.702,0-0.988-1.3-0.988-2.132
C52.052,14.886,52.78,13.82,53.846,13.249z M58.941,9.816c0-1.17-0.936-2.184-2.235-2.184c-1.404,0-2.341,1.014-2.341,2.184
S55.225,12,56.602,12C58.031,12,58.941,11.013,58.941,9.816z"/>
<path id="Path_1_" fill="#585858" d="M64.22,6.021v6.916c0,2.574,1.378,4.342,4.03,4.342c0.936,0,2.184-0.286,2.964-1.014
c0,0,0.026,0.026,0.052,0.026v0.572c0,0.208,0.078,0.286,0.286,0.286h1.794c0.208,0,0.313-0.104,0.313-0.312V5.995
c0-0.182-0.131-0.312-0.338-0.312h-1.795c-0.207,0-0.338,0.13-0.338,0.338v6.89c0,1.3-0.961,2.262-2.236,2.262
c-1.586,0-2.262-0.988-2.262-2.262V5.995c0-0.182-0.104-0.312-0.338-0.312h-1.82C64.35,5.683,64.22,5.813,64.22,6.021z"/>
<path id="Path_2_" fill="#585858" d="M76.727,0.847v13c0,2.366,0.649,3.51,2.989,3.51c0.156,0,0.546,0,0.806-0.052
c0.234-0.026,0.364-0.104,0.364-0.416v-1.404c0-0.182-0.026-0.442-0.286-0.442h-0.312c-0.832,0-1.093-0.26-1.093-1.352V0.82
c0-0.156-0.104-0.234-0.26-0.234H76.96C76.804,0.586,76.727,0.69,76.727,0.847z"/>
<path id="Combined-Shape_2_" fill="#585858" d="M87.152,5.475c3.275,0,4.342,1.664,4.342,4.316v7.046
c0,0.234-0.104,0.312-0.286,0.312h-1.742c-0.183,0-0.26-0.104-0.26-0.26v-0.598l-0.078-0.026c-0.78,0.78-1.742,1.04-2.808,1.04
c-2.601,0-4.03-1.612-4.03-3.979c0-2.262,1.481-4.03,4.237-4.03c0.754,0,1.795,0.182,2.393,0.65h0.078V9.349
c0-1.17-0.572-1.82-2.184-1.82c-0.703,0-1.898,0.234-2.627,0.572c-0.26,0.104-0.39,0.052-0.468-0.156L83.277,6.67
c-0.051-0.182,0-0.364,0.156-0.416C84.422,5.787,85.826,5.475,87.152,5.475z M84.578,13.249c0,1.17,0.598,2.08,2.132,2.08
c1.3,0,2.132-0.884,2.132-2.08c0-1.17-0.676-2.08-2.132-2.08C85.41,11.168,84.578,12.052,84.578,13.249z"/>
<path id="Path_3_" fill="#585858" d="M94.718,5.708c-0.208,0-0.312,0.104-0.312,0.312v10.816c0,0.208,0.13,0.312,0.338,0.312h1.82
c0.207,0,0.312-0.104,0.312-0.312v-6.006c0-1.638,0.624-2.834,2.444-2.834c0.285,0,0.649,0.104,0.961,0.104
c0.131,0,0.234-0.078,0.287-0.338l0.363-1.664c0.026-0.078,0.026-0.13,0.026-0.208c0-0.286-0.521-0.39-1.118-0.39
c-1.326,0-2.521,0.754-3.12,1.742h-0.077V5.995c0-0.208-0.131-0.286-0.365-0.286H94.718z"/>
<path id="Path_4_" fill="#585858" d="M105.3,15.822c0-0.858-0.702-1.534-1.586-1.534c-0.832,0-1.534,0.702-1.534,1.534
s0.702,1.534,1.534,1.534C104.598,17.356,105.3,16.654,105.3,15.822z"/>
<path id="Path_5_" fill="#C30023" d="M38.09,34.625c0-3.146-2.496-3.979-4.758-4.811c-1.3-0.494-2.886-1.066-2.886-2.393
c0-1.715,1.17-2.287,2.522-2.287c0.91,0,1.872,0.338,2.938,0.936c0.26,0.13,0.572,0.156,0.728-0.104l0.65-1.118
c0.156-0.261,0.286-0.442-0.052-0.702c-1.378-0.962-2.99-1.248-4.472-1.248c-2.678,0-4.862,1.689-4.862,4.498
c0,2.859,2.418,3.874,4.446,4.576c1.638,0.572,3.172,1.144,3.172,2.73c0,1.455-1.092,2.34-3.016,2.34
c-1.066,0-2.34-0.494-3.198-1.326c-0.286-0.234-0.442-0.364-0.702-0.104l-0.988,1.015c-0.286,0.285-0.26,0.441-0.026,0.676
c1.118,1.326,3.042,1.976,4.966,1.976C35.75,39.278,38.09,37.537,38.09,34.625z"/>
<path id="Path_6_" fill="#C30023" d="M49.062,37.068c0.156-0.208,0.104-0.39-0.234-0.624l-1.066-0.702
c-0.312-0.208-0.442-0.156-0.65,0.104c-0.364,0.493-1.014,1.3-2.288,1.3c-1.274,0-2.262-0.91-2.262-2.158v-3.146
c0-1.273,0.988-2.209,2.288-2.209c0.598,0,1.612,0.441,2.132,1.248c0.156,0.26,0.338,0.494,0.702,0.233l1.17-0.832
c0.234-0.155,0.234-0.468,0.13-0.624c-0.988-1.43-2.444-2.158-4.082-2.158c-2.73,0-4.81,1.717-4.81,4.473v2.964
c0,2.678,1.898,4.368,4.758,4.368C46.618,39.305,48.022,38.603,49.062,37.068z"/>
<path id="Path_7_" fill="#C30023" d="M60.58,38.811V31.92c0-2.573-1.352-4.394-4.082-4.394c-0.832,0-2.028,0.208-2.809,0.91
l-0.104-0.026v-5.486c0-0.233-0.104-0.338-0.312-0.338h-1.82c-0.208,0-0.312,0.104-0.312,0.338v15.912
c0,0.209,0.13,0.313,0.338,0.313h1.794c0.234,0,0.337-0.104,0.337-0.338v-6.864c0-1.3,0.885-2.288,2.263-2.288
c1.56,0,2.235,0.963,2.235,2.288v6.89c0,0.209,0.104,0.313,0.338,0.313h1.82C60.477,39.148,60.58,39.045,60.58,38.811z"/>
<path id="Path_8_" fill="#C30023" d="M63.206,28.021v6.916c0,2.573,1.378,4.342,4.03,4.342c0.936,0,2.184-0.286,2.963-1.014
c0,0,0.027,0.026,0.053,0.026v0.571c0,0.208,0.078,0.286,0.286,0.286h1.794c0.208,0,0.313-0.104,0.313-0.313V27.994
c0-0.182-0.131-0.312-0.338-0.312h-1.795c-0.208,0-0.338,0.13-0.338,0.338v6.89c0,1.301-0.962,2.262-2.236,2.262
c-1.586,0-2.262-0.987-2.262-2.262v-6.916c0-0.182-0.104-0.312-0.338-0.312h-1.82C63.336,27.683,63.206,27.813,63.206,28.021z"/>
<path id="Path_9_" fill="#C30023" d="M75.712,22.847v13c0,2.366,0.649,3.51,2.989,3.51c0.156,0,0.547,0,0.807-0.052
c0.234-0.026,0.364-0.104,0.364-0.416v-1.404c0-0.182-0.026-0.441-0.286-0.441h-0.313c-0.832,0-1.092-0.261-1.092-1.353V22.82
c0-0.156-0.104-0.234-0.26-0.234h-1.977C75.79,22.586,75.712,22.69,75.712,22.847z"/>
<path id="Combined-Shape_3_" fill="#C30023" d="M90.844,33.246c0,0.416-0.313,0.702-0.624,0.702h-6.344v0.91
c0,1.248,0.676,2.313,2.262,2.313c1.04,0,1.872-0.676,2.366-1.273c0.208-0.26,0.391-0.234,0.572-0.104l1.066,0.728
c0.182,0.104,0.416,0.26,0.207,0.624c-0.91,1.534-2.496,2.158-4.264,2.158c-2.859,0-4.68-1.717-4.68-4.342v-2.938
c0-2.678,1.949-4.524,4.731-4.524c2.834,0,4.706,1.82,4.706,4.524V33.246z M86.138,29.606c-1.3,0-2.235,0.78-2.235,2.132v0.416
h4.472v-0.441C88.374,30.543,87.594,29.606,86.138,29.606z"/>
</g>
<g id="Ebene_2">
<g id="brand" transform="translate(-172.000000, -30.000000)">
<g transform="translate(172.000000, 30.000000)">
<g id="Group-2_1_" transform="translate(0.000000, 1.000000)">
<polygon id="Shape_2_" fill="#C30023" points="17.23,4.218 17.23,23.445 17.23,38 2.628,29.697 0,6.308 17.23,0 "/>
<polygon fill="none" points="14.282,20.012 20.164,20.012 17.225,12.752 "/>
</g>
</g>
</g>
<g>
<polygon fill="none" points="17.207,21.012 17.207,13.794 14.282,21.012 "/>
<polygon fill="#F8F8F8" points="14.348,21.012 17.271,13.794 17.271,6.265 7.22,29.391 10.975,29.391 12.999,24.207
17.271,24.207 17.271,21.012 "/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB