mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Compare commits
6 commits
827eded0ed
...
b24e97e43f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b24e97e43f | ||
|
|
361ed5863d | ||
|
|
0092c2f0e1 | ||
|
|
ef6ea7a92c | ||
|
|
864c36b3c2 | ||
|
|
7bfd3309d1 |
20 changed files with 113 additions and 427 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
.idea
|
|
||||||
#*.iml
|
#*.iml
|
||||||
|
|
||||||
# Package Files #
|
# Package Files #
|
||||||
|
|
@ -35,9 +34,15 @@ src/generated
|
||||||
.project
|
.project
|
||||||
.classpath
|
.classpath
|
||||||
.factorypath
|
.factorypath
|
||||||
.settings
|
.idea/
|
||||||
|
.settings/
|
||||||
.vscode
|
.vscode
|
||||||
*.code-workspace
|
*.code-workspace
|
||||||
*.xpr
|
*.xpr
|
||||||
# Testing stuff
|
# Testing stuff
|
||||||
xrechnung
|
xrechnung
|
||||||
|
|
||||||
|
# Mac stuff
|
||||||
|
.DS_Store
|
||||||
|
andre*-simple.xml
|
||||||
|
somePrefix*.xml
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@ image: maven:latest
|
||||||
variables:
|
variables:
|
||||||
BUILD_PROPS: "-Dbuild.revision=$CI_COMMIT_SHA -Dbuild.branch=$CI_COMMIT_REF_NAME -Dbuild.number=$CI_PIPELINE_IID -Dfile.encoding=UTF-8 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false"
|
BUILD_PROPS: "-Dbuild.revision=$CI_COMMIT_SHA -Dbuild.branch=$CI_COMMIT_REF_NAME -Dbuild.number=$CI_PIPELINE_IID -Dfile.encoding=UTF-8 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false"
|
||||||
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
|
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
|
||||||
MAVEN_CLI_OPTS: " --batch-mode --errors --fail-at-end --show-version -s .mvn/settings.xml"
|
MAVEN_CLI_OPTS: " --batch-mode --update-snapshots --errors --fail-at-end --show-version -s .mvn/settings.xml"
|
||||||
|
MAVEN_CLI_OPTS_CENTRAL: " --batch-mode --show-version -s .mvn/settings-maven-central.xml"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- export CI_JOB_TIMESTAMP="-Dbuild.timestamp=$(date --utc --iso-8601=seconds)"
|
- export CI_JOB_TIMESTAMP="-Dbuild.timestamp=$(date --utc --iso-8601=seconds)"
|
||||||
|
|
@ -92,6 +93,11 @@ deploy:
|
||||||
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-sources.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="sources" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
|
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}-sources.jar -DgroupId=kosit -DartifactId=validator -Dclassifier="sources" -Dversion=${PROJECT_VERSION} -Dpackaging=jar -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
|
||||||
when: manual
|
when: manual
|
||||||
|
|
||||||
|
deploy-snapshot:
|
||||||
|
extends: java-8
|
||||||
|
script:
|
||||||
|
- mvn $MAVEN_CLI_OPTS_CENTRAL -P release-snapshot deploy
|
||||||
|
|
||||||
create-build-image:
|
create-build-image:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
|
|
|
||||||
16
.idea/checkstyle-idea.xml
generated
16
.idea/checkstyle-idea.xml
generated
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CheckStyle-IDEA">
|
|
||||||
<option name="configuration">
|
|
||||||
<map>
|
|
||||||
<entry key="checkstyle-version" value="8.16" />
|
|
||||||
<entry key="copy-libs" value="true" />
|
|
||||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
|
||||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
|
||||||
<entry key="scan-before-checkin" value="false" />
|
|
||||||
<entry key="scanscope" value="JavaOnly" />
|
|
||||||
<entry key="suppress-errors" value="false" />
|
|
||||||
</map>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
18
.idea/compiler.xml
generated
18
.idea/compiler.xml
generated
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<annotationProcessing>
|
|
||||||
<profile default="true" name="Default" enabled="true" />
|
|
||||||
<profile name="Maven default annotation processors profile" enabled="true">
|
|
||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
|
||||||
<outputRelativeToContentRoot value="true" />
|
|
||||||
<module name="validator" />
|
|
||||||
<module name="validationtool" />
|
|
||||||
</profile>
|
|
||||||
</annotationProcessing>
|
|
||||||
<bytecodeTargetLevel>
|
|
||||||
<module name="validator" target="1.8" />
|
|
||||||
</bytecodeTargetLevel>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
6
.idea/copyright/KoSIT_Validator.xml
generated
6
.idea/copyright/KoSIT_Validator.xml
generated
|
|
@ -1,6 +0,0 @@
|
||||||
<component name="CopyrightManager">
|
|
||||||
<copyright>
|
|
||||||
<option name="notice" value="Copyright 2017-2022 Koordinierungsstelle für IT-Standards (KoSIT) 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 http://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." />
|
|
||||||
<option name="myName" value="KoSIT Validator" />
|
|
||||||
</copyright>
|
|
||||||
</component>
|
|
||||||
7
.idea/copyright/profiles_settings.xml
generated
7
.idea/copyright/profiles_settings.xml
generated
|
|
@ -1,7 +0,0 @@
|
||||||
<component name="CopyrightManager">
|
|
||||||
<settings default="KoSIT Validator">
|
|
||||||
<module2copyright>
|
|
||||||
<element module="All" copyright="KoSIT Validator" />
|
|
||||||
</module2copyright>
|
|
||||||
</settings>
|
|
||||||
</component>
|
|
||||||
17
.idea/eclipseCodeFormatter.xml
generated
17
.idea/eclipseCodeFormatter.xml
generated
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="EclipseCodeFormatterProjectSettings">
|
|
||||||
<option name="projectSpecificProfile">
|
|
||||||
<ProjectSpecificProfile>
|
|
||||||
<option name="disabledFileTypes" value="xml" />
|
|
||||||
<option name="formatSeletedTextInAllFileTypes" value="false" />
|
|
||||||
<option name="formatter" value="ECLIPSE" />
|
|
||||||
<option name="importOrderConfigFilePath" value="$PROJECT_DIR$/.settings/org.eclipse.jdt.ui.prefs" />
|
|
||||||
<option name="importOrderFromFile" value="true" />
|
|
||||||
<option name="pathToConfigFileJava" value="$PROJECT_DIR$/formatter.xml" />
|
|
||||||
<option name="selectedJavaProfile" value="init" />
|
|
||||||
<option name="useForLiveTemplates" value="true" />
|
|
||||||
</ProjectSpecificProfile>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
11
.idea/encodings.xml
generated
11
.idea/encodings.xml
generated
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/model" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/target/generated-sources/xjc" charset="UTF-8" />
|
|
||||||
<file url="PROJECT" charset="UTF-8" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
89
.idea/misc.xml
generated
89
.idea/misc.xml
generated
|
|
@ -1,89 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="JavaScriptSettings">
|
|
||||||
<option name="languageLevel" value="ES6" />
|
|
||||||
</component>
|
|
||||||
<component name="JavadocGenerationManager">
|
|
||||||
<option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/target" />
|
|
||||||
</component>
|
|
||||||
<component name="MarkdownProjectSettings">
|
|
||||||
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="LINE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true">
|
|
||||||
<PanelProvider>
|
|
||||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
|
|
||||||
</PanelProvider>
|
|
||||||
</PreviewSettings>
|
|
||||||
<ParserSettings>
|
|
||||||
<PegdownExtensions>
|
|
||||||
<option name="ABBREVIATIONS" value="false" />
|
|
||||||
<option name="ANCHORLINKS" value="true" />
|
|
||||||
<option name="ATXHEADERSPACE" value="true" />
|
|
||||||
<option name="AUTOLINKS" value="true" />
|
|
||||||
<option name="DEFINITIONS" value="false" />
|
|
||||||
<option name="FENCED_CODE_BLOCKS" value="true" />
|
|
||||||
<option name="FOOTNOTES" value="false" />
|
|
||||||
<option name="HARDWRAPS" value="false" />
|
|
||||||
<option name="INSERTED" value="false" />
|
|
||||||
<option name="QUOTES" value="false" />
|
|
||||||
<option name="RELAXEDHRULES" value="true" />
|
|
||||||
<option name="SMARTS" value="false" />
|
|
||||||
<option name="STRIKETHROUGH" value="true" />
|
|
||||||
<option name="SUBSCRIPT" value="false" />
|
|
||||||
<option name="SUPERSCRIPT" value="false" />
|
|
||||||
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
|
|
||||||
<option name="SUPPRESS_INLINE_HTML" value="false" />
|
|
||||||
<option name="TABLES" value="true" />
|
|
||||||
<option name="TASKLISTITEMS" value="true" />
|
|
||||||
<option name="TOC" value="false" />
|
|
||||||
<option name="WIKILINKS" value="true" />
|
|
||||||
</PegdownExtensions>
|
|
||||||
<ParserOptions>
|
|
||||||
<option name="COMMONMARK_LISTS" value="false" />
|
|
||||||
<option name="DUMMY" value="false" />
|
|
||||||
<option name="EMOJI_SHORTCUTS" value="true" />
|
|
||||||
<option name="FLEXMARK_FRONT_MATTER" value="false" />
|
|
||||||
<option name="GFM_TABLE_RENDERING" value="true" />
|
|
||||||
<option name="GITBOOK_URL_ENCODING" value="false" />
|
|
||||||
<option name="GITHUB_EMOJI_URL" value="false" />
|
|
||||||
<option name="GITHUB_LISTS" value="true" />
|
|
||||||
<option name="GITHUB_WIKI_LINKS" value="true" />
|
|
||||||
<option name="JEKYLL_FRONT_MATTER" value="false" />
|
|
||||||
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
|
|
||||||
</ParserOptions>
|
|
||||||
</ParserSettings>
|
|
||||||
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
|
|
||||||
<GeneratorProvider>
|
|
||||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
|
|
||||||
</GeneratorProvider>
|
|
||||||
<headerTop />
|
|
||||||
<headerBottom />
|
|
||||||
<bodyTop />
|
|
||||||
<bodyBottom />
|
|
||||||
</HtmlSettings>
|
|
||||||
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
|
|
||||||
<StylesheetProvider>
|
|
||||||
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
|
|
||||||
</StylesheetProvider>
|
|
||||||
<ScriptProviders />
|
|
||||||
<cssText />
|
|
||||||
</CssSettings>
|
|
||||||
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
|
|
||||||
<LinkMapSettings>
|
|
||||||
<textMaps />
|
|
||||||
</LinkMapSettings>
|
|
||||||
</component>
|
|
||||||
<component name="MavenProjectsManager">
|
|
||||||
<option name="originalFiles">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="NodePackageJsonFileManager">
|
|
||||||
<packageJsonPaths />
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="oracle-1.8" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
<component name="jetbrains.communicator.idea.IdProvider" IDEtalkID="4B2DA906C3A7DF4F7B6EA28093E19A3F" />
|
|
||||||
</project>
|
|
||||||
22
.idea/saveactions_settings.xml
generated
22
.idea/saveactions_settings.xml
generated
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="SaveActionSettings">
|
|
||||||
<option name="actions">
|
|
||||||
<set>
|
|
||||||
<option value="activate" />
|
|
||||||
<option value="activateOnShortcut" />
|
|
||||||
<option value="activateOnBatch" />
|
|
||||||
<option value="organizeImports" />
|
|
||||||
<option value="reformatChangedCode" />
|
|
||||||
<option value="rearrange" />
|
|
||||||
<option value="fieldCanBeFinal" />
|
|
||||||
<option value="localCanBeFinal" />
|
|
||||||
<option value="methodMayBeStatic" />
|
|
||||||
<option value="unqualifiedFieldAccess" />
|
|
||||||
<option value="missingOverrideAnnotation" />
|
|
||||||
<option value="useBlocks" />
|
|
||||||
</set>
|
|
||||||
</option>
|
|
||||||
<option name="configurationPath" value="" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
11
.mvn/settings-maven-central.xml
Normal file
11
.mvn/settings-maven-central.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>central</id>
|
||||||
|
<username>${MVN_CENTRAL_USER}</username>
|
||||||
|
<password>${MVN_CENTRAL_TOKEN}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
</settings>
|
||||||
|
|
@ -1,36 +1,6 @@
|
||||||
<!--
|
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
~ Copyright 2017-2022 Koordinierungsstelle für IT-Standards (KoSIT)
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
~
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
~ 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
|
|
||||||
~
|
|
||||||
~ http://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.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
|
|
||||||
<!--
|
|
||||||
~ Copyright 2017-2021 Koordinierungsstelle für IT-Standards (KoSIT)
|
|
||||||
~
|
|
||||||
~ 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
|
|
||||||
~
|
|
||||||
~ http://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.
|
|
||||||
-->
|
|
||||||
<servers>
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>gitlab-maven</id>
|
<id>gitlab-maven</id>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,47 +0,0 @@
|
||||||
<!--
|
|
||||||
~ Copyright 2017-2022 Koordinierungsstelle für IT-Standards (KoSIT)
|
|
||||||
~
|
|
||||||
~ 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
|
|
||||||
~
|
|
||||||
~ http://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.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
|
|
||||||
<!--
|
|
||||||
~ Copyright 2017-2021 Koordinierungsstelle für IT-Standards (KoSIT)
|
|
||||||
~
|
|
||||||
~ 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
|
|
||||||
~
|
|
||||||
~ http://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.
|
|
||||||
-->
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>gitlab-maven</id>
|
|
||||||
<configuration>
|
|
||||||
<httpHeaders>
|
|
||||||
<property>
|
|
||||||
<name>Job-Token</name>
|
|
||||||
<value>${env.CI_JOB_TOKEN}</value>
|
|
||||||
</property>
|
|
||||||
</httpHeaders>
|
|
||||||
</configuration>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
</settings>
|
|
||||||
65
pom.xml
65
pom.xml
|
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
<name>KoSIT XML Prüftool Implementierung</name>
|
<name>KoSIT XML Prüftool Implementierung</name>
|
||||||
|
|
||||||
<groupId>de.kosit</groupId>
|
<groupId>org.kosit</groupId>
|
||||||
<version>1.5.1</version>
|
|
||||||
|
|
||||||
<artifactId>validationtool</artifactId>
|
<artifactId>validationtool</artifactId>
|
||||||
|
<version>1.5.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description>
|
<description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description>
|
||||||
<developers>
|
<developers>
|
||||||
<!-- In alphabetical order by last name -->
|
<!-- In alphabetical order by last name -->
|
||||||
|
|
@ -67,12 +67,25 @@
|
||||||
<version.saxon-he>12.8</version.saxon-he>
|
<version.saxon-he>12.8</version.saxon-he>
|
||||||
<version.slf4j>2.0.17</version.slf4j>
|
<version.slf4j>2.0.17</version.slf4j>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>project.local</id>
|
<id>project.local</id>
|
||||||
<name>project</name>
|
<name>project</name>
|
||||||
<url>file:${project.basedir}/libs</url>
|
<url>file:${project.basedir}/libs</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<name>Central Portal Snapshots</name>
|
||||||
|
<id>central-portal-snapshots</id>
|
||||||
|
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
@ -173,6 +186,26 @@
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.central</groupId>
|
||||||
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
|
<version>0.8.0</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<publishingServerId>central</publishingServerId>
|
||||||
|
<autoPublish>true</autoPublish>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>3.2.8</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- for PR 152 -->
|
<!-- for PR 152 -->
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
@ -590,7 +623,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
<version>3.2.8</version>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>sign-artifacts</id>
|
<id>sign-artifacts</id>
|
||||||
|
|
@ -660,6 +692,17 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>release-snapshot</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.central</groupId>
|
||||||
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
|
|
@ -669,12 +712,14 @@
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<connection>https://github.com/itplr-kosit/validationtool.git</connection>
|
<connection>scm:git:https://github.com/itplr-kosit/validator.git</connection>
|
||||||
<developerConnection>scm:git:https://projekte.kosit.org/kosit/validator.git</developerConnection>
|
<developerConnection>scm:git:https://projekte.kosit.org/kosit/validator.git</developerConnection>
|
||||||
<tag>v1.1.0</tag>
|
<tag>release/1.5.x</tag>
|
||||||
<url>https://github.com/itplr-kosit/validator</url>
|
<url>https://github.com/itplr-kosit/validator</url>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<url>https://github.com/itplr-kosit/validator</url>
|
<url>https://github.com/itplr-kosit/validator</url>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
<name>Apache License, Version 2.0</name>
|
<name>Apache License, Version 2.0</name>
|
||||||
|
|
@ -682,12 +727,4 @@
|
||||||
<distribution>repo</distribution>
|
<distribution>repo</distribution>
|
||||||
</license>
|
</license>
|
||||||
</licenses>
|
</licenses>
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<id>sonatype-nexus-staging</id>
|
|
||||||
<name>Nexus Release Repository</name>
|
|
||||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -16,22 +16,20 @@
|
||||||
|
|
||||||
package de.kosit.validationtool.impl;
|
package de.kosit.validationtool.impl;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import javax.xml.transform.URIResolver;
|
import javax.xml.transform.URIResolver;
|
||||||
import javax.xml.validation.Schema;
|
import javax.xml.validation.Schema;
|
||||||
|
|
||||||
|
import de.kosit.validationtool.api.ResolvingConfigurationStrategy;
|
||||||
|
import de.kosit.validationtool.model.scenarios.ResourceType;
|
||||||
|
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import de.kosit.validationtool.api.ResolvingConfigurationStrategy;
|
|
||||||
import de.kosit.validationtool.model.scenarios.ResourceType;
|
|
||||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
|
||||||
|
|
||||||
import net.sf.saxon.lib.UnparsedTextURIResolver;
|
import net.sf.saxon.lib.UnparsedTextURIResolver;
|
||||||
import net.sf.saxon.s9api.XPathExecutable;
|
import net.sf.saxon.s9api.XPathExecutable;
|
||||||
import net.sf.saxon.s9api.XPathSelector;
|
import net.sf.saxon.s9api.XPathSelector;
|
||||||
|
|
@ -80,7 +78,11 @@ public class Scenario {
|
||||||
private Transformation reportTransformation;
|
private Transformation reportTransformation;
|
||||||
|
|
||||||
public List<Transformation> getSchematronValidations() {
|
public List<Transformation> getSchematronValidations() {
|
||||||
return this.schematronValidations == null ? Collections.emptyList() : this.schematronValidations;
|
// Must return a mutable list
|
||||||
|
if (this.schematronValidations == null) {
|
||||||
|
this.schematronValidations = new ArrayList<>();
|
||||||
|
}
|
||||||
|
return this.schematronValidations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
@ -95,9 +97,9 @@ public class Scenario {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Liefert einen neuen XPath-Selector zur Evaluierung der {@link de.kosit.validationtool.api.AcceptRecommendation}.
|
* Returns a new XPath selector for evaluating the {@link de.kosit.validationtool.api.AcceptRecommendation}.
|
||||||
*
|
*
|
||||||
* @return neuer Selector
|
* @return new selector
|
||||||
*/
|
*/
|
||||||
public Optional<XPathSelector> getAcceptSelector() {
|
public Optional<XPathSelector> getAcceptSelector() {
|
||||||
final XPathSelector selector = this.acceptExecutable != null ? this.acceptExecutable.load() : null;
|
final XPathSelector selector = this.acceptExecutable != null ? this.acceptExecutable.load() : null;
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ import de.kosit.validationtool.impl.Scenario;
|
||||||
import de.kosit.validationtool.impl.model.Result;
|
import de.kosit.validationtool.impl.model.Result;
|
||||||
import de.kosit.validationtool.model.scenarios.NamespaceType;
|
import de.kosit.validationtool.model.scenarios.NamespaceType;
|
||||||
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
import de.kosit.validationtool.model.scenarios.ScenarioType;
|
||||||
|
|
||||||
import net.sf.saxon.s9api.XPathExecutable;
|
import net.sf.saxon.s9api.XPathExecutable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -140,6 +139,25 @@ public class ScenarioBuilderTest {
|
||||||
assertThat(configuration.getNamespace()).isEmpty();
|
assertThat(configuration.getNamespace()).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testConfigureWithSchematron() {
|
||||||
|
final ContentRepository repository = Simple.createContentRepository();
|
||||||
|
final XPathExecutable match = repository.createXPath("//*", null);
|
||||||
|
final XPathExecutable accept = repository.createXPath("//*", null);
|
||||||
|
final ScenarioBuilder builder = createScenario();
|
||||||
|
builder.getNamespaces().clear();
|
||||||
|
|
||||||
|
builder.match(match);
|
||||||
|
builder.acceptWith(accept);
|
||||||
|
final Result<Scenario, String> result = builder.build(repository);
|
||||||
|
assertThat(result.isValid()).isTrue();
|
||||||
|
final ScenarioType configuration = result.getObject().getConfiguration();
|
||||||
|
assertThat(configuration.getMatch()).isNotEmpty();
|
||||||
|
assertThat(configuration.getAcceptMatch()).isNotEmpty();
|
||||||
|
assertThat(configuration.getNamespace()).isEmpty();
|
||||||
|
assertThat(configuration.getValidateWithSchematron()).isNotEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBasicAttributes() {
|
public void testBasicAttributes() {
|
||||||
final ContentRepository repository = Simple.createContentRepository();
|
final ContentRepository repository = Simple.createContentRepository();
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import static de.kosit.validationtool.config.ConfigurationBuilder.fallback;
|
||||||
import static de.kosit.validationtool.config.ConfigurationBuilder.report;
|
import static de.kosit.validationtool.config.ConfigurationBuilder.report;
|
||||||
import static de.kosit.validationtool.config.ConfigurationBuilder.scenario;
|
import static de.kosit.validationtool.config.ConfigurationBuilder.scenario;
|
||||||
import static de.kosit.validationtool.config.ConfigurationBuilder.schema;
|
import static de.kosit.validationtool.config.ConfigurationBuilder.schema;
|
||||||
|
import static de.kosit.validationtool.config.ConfigurationBuilder.schematron;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -46,6 +47,7 @@ public class TestConfigurationFactory {
|
||||||
|
|
||||||
public static ScenarioBuilder createScenario() {
|
public static ScenarioBuilder createScenario() {
|
||||||
return scenario("simple").validate(schema("Sample Schema").schemaLocation(URI.create("simple.xsd")))
|
return scenario("simple").validate(schema("Sample Schema").schemaLocation(URI.create("simple.xsd")))
|
||||||
|
.validate(schematron("Sample Schematron").source(Simple.SCHEMATRON))
|
||||||
.with(report("Report für eRechnung").source("report.xsl")).acceptWith("count(//test:rejected) = 0")
|
.with(report("Report für eRechnung").source("report.xsl")).acceptWith("count(//test:rejected) = 0")
|
||||||
.declareNamespace("cri", "http://www.xoev.de/de/validator/framework/1/createreportinput")
|
.declareNamespace("cri", "http://www.xoev.de/de/validator/framework/1/createreportinput")
|
||||||
.declareNamespace("rpt", "http://validator.kosit.de/test-report")
|
.declareNamespace("rpt", "http://validator.kosit.de/test-report")
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import de.kosit.validationtool.impl.model.Result;
|
||||||
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
import de.kosit.validationtool.impl.tasks.DocumentParseAction;
|
||||||
import de.kosit.validationtool.impl.xml.ProcessorProvider;
|
import de.kosit.validationtool.impl.xml.ProcessorProvider;
|
||||||
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
import de.kosit.validationtool.model.reportInput.XMLSyntaxError;
|
||||||
|
|
||||||
import net.sf.saxon.s9api.Processor;
|
import net.sf.saxon.s9api.Processor;
|
||||||
import net.sf.saxon.s9api.SaxonApiException;
|
import net.sf.saxon.s9api.SaxonApiException;
|
||||||
import net.sf.saxon.s9api.Serializer;
|
import net.sf.saxon.s9api.Serializer;
|
||||||
|
|
@ -84,6 +83,8 @@ public class Helper {
|
||||||
|
|
||||||
public static final URI SCHEMA = REPOSITORY_URI.resolve("simple.xsd");
|
public static final URI SCHEMA = REPOSITORY_URI.resolve("simple.xsd");
|
||||||
|
|
||||||
|
public static final URI SCHEMATRON = REPOSITORY_URI.resolve("simple-schematron-error.xsl");
|
||||||
|
|
||||||
public static final ContentRepository createContentRepository() {
|
public static final ContentRepository createContentRepository() {
|
||||||
final ResolvingConfigurationStrategy strategy = ResolvingMode.STRICT_RELATIVE.getStrategy();
|
final ResolvingConfigurationStrategy strategy = ResolvingMode.STRICT_RELATIVE.getStrategy();
|
||||||
return new ContentRepository(Helper.getTestProcessor(), strategy, Simple.REPOSITORY_URI);
|
return new ContentRepository(Helper.getTestProcessor(), strategy, Simple.REPOSITORY_URI);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue