diff --git a/.classpath b/.classpath deleted file mode 100644 index aa5166e40e8e1436cb92625816a89b1becb00f1f..0000000000000000000000000000000000000000 --- a/.classpath +++ /dev/null @@ -1,240 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/> - <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/> - <classpathentry kind="src" path="src/main/java" including="**/*.java"/> - <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> - <classpathentry kind="src" path="src/main/webapp/WEB-INF" including="aggregator.properties" excluding="**/*.java"/> - <classpathentry kind="output" path="target/classes"/> - <classpathentry kind="var" path="M2_REPO/javax/ws/rs/javax.ws.rs-api/2.0-m10/javax.ws.rs-api-2.0-m10.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> - <classpathentry kind="var" path="M2_REPO/junit/junit/4.11/junit-4.11.jar" sourcepath="M2_REPO/junit/junit/4.11/junit-4.11-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/com/google/guava/guava/15.0/guava-15.0.jar" sourcepath="M2_REPO/com/google/guava/guava/15.0/guava-15.0-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/middleware/tgcrud-client/2.6.0/tgcrud-client-2.6.0.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-frontend-jaxws/2.7.11/cxf-rt-frontend-jaxws-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar" sourcepath="M2_REPO/xml-resolver/xml-resolver/1.2/xml-resolver-1.2-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/asm/asm/3.3.1/asm-3.3.1.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-api/2.7.11/cxf-api-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/woodstox-core-asl/4.2.1/woodstox-core-asl-4.2.1.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar" sourcepath="M2_REPO/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/ws/xmlschema/xmlschema-core/2.1.0/xmlschema-core-2.1.0.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar" sourcepath="M2_REPO/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar" sourcepath="M2_REPO/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-core/2.7.11/cxf-rt-core-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13.jar" sourcepath="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-bindings-soap/2.7.11/cxf-rt-bindings-soap-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-databinding-jaxb/2.7.11/cxf-rt-databinding-jaxb-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-bindings-xml/2.7.11/cxf-rt-bindings-xml-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-frontend-simple/2.7.11/cxf-rt-frontend-simple-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-ws-addr/2.7.11/cxf-rt-ws-addr-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-ws-policy/2.7.11/cxf-rt-ws-policy-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/neethi/neethi/3.0.3/neethi-3.0.3.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-transports-http/2.7.11/cxf-rt-transports-http-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/namespaces/metadata-core-jaxb/1.2.0/metadata-core-jaxb-1.2.0.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/middleware/tgsearch-client/3.6.2/tgsearch-client-3.6.2.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-frontend-jaxrs/2.7.11/cxf-rt-frontend-jaxrs-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/3.2.2.RELEASE/spring-core-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.3.3/jettison-1.3.3.jar" sourcepath="M2_REPO/org/codehaus/jettison/jettison/1.3.3/jettison-1.3.3-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/middleware/tgsearch-api/3.6.2/tgsearch-api-3.6.2.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/middleware/confclient/1.4.0/confclient-1.4.0.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/net/sf/saxon/Saxon-HE/9.5.1-5/Saxon-HE-9.5.1-5.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/info/textgrid/utils/link-rewriter-core/0.4.1-RELEASE/link-rewriter-core-0.4.1-RELEASE.jar" sourcepath="M2_REPO/info/textgrid/utils/link-rewriter-core/0.4.1-RELEASE/link-rewriter-core-0.4.1-RELEASE-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/51.1/icu4j-51.1.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4.jar" sourcepath="M2_REPO/commons-io/commons-io/2.4/commons-io-2.4-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-management/2.7.11/cxf-rt-management-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/3.2.2.RELEASE/spring-web-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/3.2.2.RELEASE/spring-aop-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/3.2.2.RELEASE/spring-beans-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/3.2.2.RELEASE/spring-context-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/springframework/spring-expression/3.2.2.RELEASE/spring-expression-3.2.2.RELEASE.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> - <classpathentry kind="var" path="M2_REPO/org/idpf/epubcheck/4.0.0-alpha11/epubcheck-4.0.0-alpha11.jar"/> - <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-compress/1.5/commons-compress-1.5.jar"/> - <classpathentry kind="var" path="M2_REPO/org/daisy/libs/jing/20120724.0.0/jing-20120724.0.0.jar"/> - <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar"/> - <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.12/jackson-core-asl-1.9.12.jar"/> - <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.12/jackson-mapper-asl-1.9.12.jar"/> - <classpathentry kind="var" path="M2_REPO/org/javatuples/javatuples/1.2/javatuples-1.2.jar"/> - <classpathentry kind="var" path="M2_REPO/xmlunit/xmlunit/1.5/xmlunit-1.5.jar" sourcepath="M2_REPO/xmlunit/xmlunit/1.5/xmlunit-1.5-sources.jar"/> - <classpathentry kind="var" path="M2_REPO/org/apache/cxf/cxf-rt-rs-security-cors/2.7.11/cxf-rt-rs-security-cors-2.7.11.jar"> - <attributes> - <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/> - </attributes> - </classpathentry> -</classpath> \ No newline at end of file diff --git a/.gitignore b/.gitignore index abd1e98bb51ecfb371afa8acee6312632a0eae1d..7a6c3682136dcb2b56eae529a55bd0e00eae56d7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ src/main/resources/git.properties /.project /maven-eclipse.xml +/.externalToolBuilders/ +/bin/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..4a960783d4b9c11c342ae93e1160aa97320b7a0c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,153 @@ +include: + - project: 'dariah-de/gitlab-templates' + ref: 'main' + file: '/templates/SBOM-Upload.gitlab-ci.yml' + +variables: + # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log. + # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. + MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -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" + # As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used + # when running from the command line. + #MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true" + MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" + # Nexus Deployment settings, please use env vars in Settings -> CI/CD -> Variables. + MAVEN_SETTINGS_PATH: ".m2/settings.xml" + MAVEN_DEPLOY_OPTS: "--settings=$MAVEN_SETTINGS_PATH" + # File for storing the POM project.version + VARIABLES_FILE: ./variables.txt + CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA + +################### +### TEMPLATES ### +################### +.webapp: &webapp + image: alpine:3.14 + stage: deploy + script: + - source $VARIABLES_FILE + - 'apk add --no-cache bash' + - 'apk add --no-cache curl' + - export PLOC="$(ls ./${PPATH}/*.deb)" + - DEB_NAME=$PNAME-$PVERSION.deb + - 'if [[ $PVERSION =~ .*${PKEY}$ ]]; then' + - echo "---A ${PKEY} BUILD IS BEING PERFORMED---" + - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}' + - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/${APTLY_TARGET}/file/${DEB_NAME}' + - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy' + - fi + +.kaniko-setup_template: &kaniko-setup + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json + +.crane-setup_template: &crane-setup + - crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + +stages: + - prepare + - test + - build + - deploy + +# Cache downloaded dependencies and plugins between builds. +# To keep cache across branches add 'key: "$CI_JOB_NAME"' +cache: + key: $CI_JOB_NAME + paths: + - .m2/repository + +# Get the project version from main POM file and store it to artifact. +get_version: + image: maven:3.8.3-jdk-8 + stage: prepare + script: + - 'PVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -q -DforceStdout)' + - echo "export PVERSION=$PVERSION" > $VARIABLES_FILE + - echo "Project version from main pom file is $PVERSION" + - 'TEI_STYLESHEETS_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=tei-stylesheet-version -q -DforceStdout)' + - echo "export TEI_STYLESHEET_VERSION=$TEI_STYLESHEETS_VERSION" >> $VARIABLES_FILE + - echo "TEI Stylesheets version from main pom file is $TEI_STYLESHEETS_VERSION" + artifacts: + name: POM_VERSION + paths: + - $VARIABLES_FILE + +# run junit tests +test: + stage: test + image: maven:3.8.3-jdk-8 + script: + - git submodule update --recursive --init + - git -C src/main/webapp/tei-stylesheets/ checkout $TEI_STYLESHEETS_VERSION + - mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean verify + artifacts: + reports: + junit: target/surefire-reports/TEST-*.xml + +# Build and deploy all the JARs to GWDG Nexus, and build all the DEBs and store DEBs to artifacts. +build_and_deploy: + only: + - develop + - tags + image: maven:3.8.3-jdk-8 + stage: build + script: + - source $VARIABLES_FILE + - git submodule update --recursive --init + - git -C src/main/webapp/tei-stylesheets/ checkout $TEI_STYLESHEETS_VERSION + # REMOVE SKIPTESTS AS SOON AS TESTS ARE WORKING...!! + - mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean verify -Ptextgrid.deb -Psbom -DskipTests=true + - cp target/bom.json . + artifacts: + name: WEBAPP_DEB_PACKAGES + paths: + - ./target/*.deb + - bom.json + +build_container_image: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + stage: build + before_script: + - *kaniko-setup + script: + - /kaniko/executor + --context $CI_PROJECT_DIR + --dockerfile $CI_PROJECT_DIR/Dockerfile + --destination $CONTAINER_IMAGE + +tag_container_image: + image: + name: gcr.io/go-containerregistry/crane:debug + entrypoint: [""] + stage: deploy + before_script: + - *crane-setup + script: + - source $VARIABLES_FILE + - crane tag $CONTAINER_IMAGE latest + - crane tag $CONTAINER_IMAGE $PVERSION-$CI_COMMIT_SHORT_SHA + +# Deploy DEB files to APTLY repository. +# All four DEB files are deployed with SNAPSHOT version (branch: develop)! +deploy_aggregator_dev: + only: + - develop + variables: + PNAME: 'aggregator' + PPATH: './target' + PKEY: 'SNAPSHOT' + APTLY_TARGET: 'indy-snapshots' + <<: *webapp + +deploy_aggregator_prd: + only: + - tags + variables: + PNAME: 'aggregator' + PPATH: './target' + PKEY: 'RELEASE' + APTLY_TARGET: 'indy-releases' + <<: *webapp diff --git a/.m2/settings.xml b/.m2/settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fdd646dd2e5a9034694c303e6321db0575e4024 --- /dev/null +++ b/.m2/settings.xml @@ -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>${env.NEXUS_REPO_ID}</id> + <username>${env.NEXUS_REPO_USER}</username> + <password>${env.NEXUS_REPO_PW}</password> + </server> + </servers> +</settings> diff --git a/.project b/.project index 0f3ca5d147321fbd881a1f4e6f0f5b745d378949..cbf1984ff0285eba8457adce15615ca9d0ddacc8 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>aggregator-1.4.14-SNAPSHOT</name> + <name>aggregator-1.4.16-SNAPSHOT</name> <comment>The TextGrid Aggregator is a service that can walk aggregations (including editions and collections) and export the objects therein to various formats, e.g., HTML, TEI corpus, EPUB, and ZIP. It can also be used to transform single files (it is the component that is responsible for HTML rendering of TEI objects in TextGrid) and export search results as ZIP files. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment> <projects/> <buildSpec> diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..be1c6c569201a5468c78331a84178f4cd90f99b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM maven:3-jdk-8 as builder + +COPY . /build +WORKDIR /build +# clone the tei stylesheets +RUN git submodule update --recursive --init +RUN mvn package -Dmaven.test.skip=true -P \!textgrid.deb + + +FROM tomcat:8-jdk8-openjdk-slim-bullseye + +# latex for PDF generation (TODO: test if PDF generation is really working, otherwise safe that space) +RUN apt-get update -y && apt-get upgrade -y && apt-get install --no-install-recommends -y \ + #texlive-xetex \ + texlive-latex-base \ + texlive-latex-extra \ + texlive-plain-generic \ + # save some space + && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /build/target/aggregator-*.war /usr/local/tomcat/webapps/aggregator.war + diff --git a/Jenkinsfile b/Jenkinsfile_OLD similarity index 100% rename from Jenkinsfile rename to Jenkinsfile_OLD diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..08a86d5949bb1f2c1cbcaa184360e31d1b9a488e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# DARIAH-DE Aggregator Services + +The TextGrid Aggregator is the export and conversion tool for data from the TextGrid repository. While TG-crud allows you to get individual objects and their metadata in their original format, this tool allows you to collect a whole bunch of resources in one go (e.g., by walking down aggregation trees, hence the name) and convert them to popular output formats, e.g., HTML. + +For the time being the agregator service is only used for TextGrid Lab and Repositiory, it could also be adapted to the use within the DARIAH-DE Repository for aggragating and delivering things such as all objects of one collection from the index pages, and more. diff --git a/docs/html.rst b/docs/html.rst index 85d71be0f8893b670420026759ed217bec46a66c..e33c0691406ee2d439e611b73f31ef29276f30be 100644 --- a/docs/html.rst +++ b/docs/html.rst @@ -8,7 +8,7 @@ Synopsis:: /html/{object}?stylesheet&pi&refreshStylesheet&sid&embedded&css&linkPattern&mediatype&id&simulate resource-wide template parameters - + +--------------------------+--------------------------+--------------------------+ | parameter | value | description | @@ -88,8 +88,8 @@ There are some ways to specify how something is rendered. Although all this actu copied to HTML ``style`` attributes. * You can use TEI's ``rendition`` mechanism to formally specify custom styling - for your document. See `Feature Request #11740 - <https://projects.gwdg.de/issues/11740>`_, and especially the files attached + for your document. See `Feature Request #2 + <https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/-/issues/2>`_, and especially the files attached there, for an example on how this can be used in your TEI document. This stuff, and also some built-in rules to deal with, e.g., run-in headers, @@ -148,7 +148,7 @@ textgridrep.de uses the aggregator to render TEI files as HTML. It will activate * Embedded ``<style>`` elements from the HTML header will be moved to the body and converted to a `scoped style element <https://davidwalsh.name/scoped-css>`_. * The ``<body>`` element will be converted to a ``<div class="body">`` and returned to be embedded into the container HTML. Everything else your XSLT delivers, especially the HTML ``<head>``, is thrown away. Thus, if you load any JavaScript, make sure to load it from ``<script>`` tags in the body. -You will of course need to pay attention to the usual web development issues, e.g., make sure that any resource you load from within the HTML can be loaded from within pages that are served at <https://textgridrep.de/>. +You will of course need to pay attention to the usual web development issues, e.g., make sure that any resource you load from within the HTML can be loaded from within pages that are served at <https://textgridrep.de/>. You can use the simulate mode to partially simulate embedding; it will run the same embed code, but instead of returning just an XHTML fragment it embeds the fragment into a full HTML frame that resembles the TextGridRep.de design. This method can also be used even for unpublished data from within the TextGridLab using the TextGridRep Preview tool that is available from the Marketplace. diff --git a/docs/index.rst b/docs/index.rst index 084b9417a60948995e7df60ba7589861532750ab..c2488828955c5d0cb86d575f7edaa1ff6a00dbb0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,6 +35,6 @@ License See LICENCE_ -.. _LICENCE: https://projects.gwdg.de/projects/aggregator/repository/revisions/master/entry/LICENSE.txt -.. _aggregator_sources: https://projects.gwdg.de/projects/aggregator/repository -.. _aggregator_bugtracking: https://projects.gwdg.de/projects/tg/work_packages +.. _LICENCE: https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/-/blob/main/LICENSE.txt +.. _aggregator_sources: https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/-/tree/main +.. _aggregator_bugtracking: https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/-/issues diff --git a/pom.xml b/pom.xml index 8b50c7753b8f84031a179921ae73c69a92035eb6..25dd6d2925a6a6d1c01c55dccef578d84847bff5 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>info.textgrid.services</groupId> <artifactId>aggregator</artifactId> - <version>1.4.14</version> + <version>1.5.0</version> <packaging>war</packaging> <name>TextGrid Aggregator Service</name> @@ -16,28 +16,51 @@ <email>thorsten.vitt@uni-wuerzburg.de</email> <url>http://www.thorstenvitt.de/</url> <organization>Universität Würzburg</organization> - <organizationUrl>http://www.germanistik.uni-wuerzburg.de/lehrstuehle/computerphilologie</organizationUrl> + <organizationUrl>https://www.germanistik.uni-wuerzburg.de/lehrstuehle/computerphilologie/</organizationUrl> </developer> </developers> <properties> - <commons-io-version>2.4</commons-io-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <java-source-version>1.8</java-source-version> + <java-target-version>1.8</java-target-version> + + <!-- Referenced from .gitlab-ci.yml for use in git submodule --> + <tei-stylesheet-version>v7.33.0</tei-stylesheet-version> + + <commons-io-version>2.7</commons-io-version> <link-rewriter-version>0.4.1-RELEASE</link-rewriter-version> <saxon-version>9.5.1-5</saxon-version> <!-- XXX mind dependency from epubcheck --> - <cxf-version>2.7.11</cxf-version> - <confclient-version>1.4.0</confclient-version> - <tgsearch-version>3.6.2</tgsearch-version> - <tgcrud-version>2.6.0</tgcrud-version> + <cxf-version>3.5.2</cxf-version> + <confclient-version>4.1.0</confclient-version> + <cyclonedx-maven-plugin.version>2.7.0</cyclonedx-maven-plugin.version> + <tgsearch-version>4.0.5</tgsearch-version> + <tgcrud-version>11.7.0</tgcrud-version> <guava-version>15.0</guava-version> - <junit-version>4.11</junit-version> - <spring-version>3.2.2.RELEASE</spring-version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - - <!-- The following properties are used for configuring the web service + <junit-version>4.13.2</junit-version> + <servlet-api-version>3.1.0</servlet-api-version> + <spring-version>5.3.21</spring-version> + <git-commit-id-plugin-version>2.1.15</git-commit-id-plugin-version> + <maven-compiler-plugin-version>3.9.0</maven-compiler-plugin-version> + <maven-eclipse-plugin-version>2.10</maven-eclipse-plugin-version> + <maven-failsafe-plugin-version>2.8.1</maven-failsafe-plugin-version> + <maven-site-plugin-version>3.4</maven-site-plugin-version> + <tomcat6-maven-plugin-version>2.1</tomcat6-maven-plugin-version> + <build-helper-maven-plugin-version>1.5</build-helper-maven-plugin-version> + <maven-surefire-plugin-version>2.14</maven-surefire-plugin-version> + <maven-war-plugin-version>3.3.2</maven-war-plugin-version> + <maven-project-info-reports-plugin>2.8</maven-project-info-reports-plugin> + <sphinx-maven-plugin-version>1.0.3</sphinx-maven-plugin-version> + <icu4j-version>51.1</icu4j-version> + <vafer-version>1.4</vafer-version> + <epubcheck-version>4.0.0-alpha11</epubcheck-version> + <xmlunit-version>1.5</xmlunit-version> + <lifecycle-mapping-version>1.0.0</lifecycle-mapping-version> + <!-- The following properties are used for configuring the web service and can be overridden in profiles --> <aggregator.endpoint.published>http://localhost:13000/aggregator</aggregator.endpoint.published> - <aggregator.textgridrep.default>https://www.textgridlab.org/1.0/confserv</aggregator.textgridrep.default> - <aggregator.textgridrep.dev>https://www.textgridlab.org/dev/confserv</aggregator.textgridrep.dev> + <aggregator.textgridrep.default>https://textgridlab.org/1.0/confserv</aggregator.textgridrep.default> + <aggregator.textgridrep.dev>https://dev.textgridlab.org/1.0/confserv</aggregator.textgridrep.dev> <aggregator.classifier /> </properties> @@ -47,10 +70,11 @@ <name>GWDG Nexus DARIAH-DE Repository</name> <url> https://nexus.gwdg.de/repository/maven-dariah-public/</url> </repository> + <!-- <repository> <id>dh.nexus.releases</id> <name>Cophi Nexus Releases</name> - <url>http://dev.digital-humanities.de/nexus/content/repositories/releases</url> + <url>https://dev.digital-humanities.de/nexus/content/repositories/releases</url> <releases> <enabled>true</enabled> </releases> @@ -69,6 +93,7 @@ <enabled>true</enabled> </snapshots> </repository> + --> </repositories> <distributionManagement> @@ -111,11 +136,6 @@ <artifactId>confclient</artifactId> <version>${confclient-version}</version> </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-frontend-jaxrs</artifactId> - <version>${cxf-version}</version> - </dependency> <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> @@ -131,48 +151,75 @@ <artifactId>commons-io</artifactId> <version>${commons-io-version}</version> </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-frontend-jaxrs</artifactId> + <version>${cxf-version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-frontend-jaxws</artifactId> + <version>${cxf-version}</version> + </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${cxf-version}</version> </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-security-cors</artifactId> + <version>${cxf-version}</version> + </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-management</artifactId> <version>${cxf-version}</version> </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-service-description</artifactId> + <version>${cxf-version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-client</artifactId> + <version>${cxf-version}</version> + </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring-version}</version> </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring-version}</version> + </dependency> <dependency> <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.5</version> + <artifactId>javax.servlet-api</artifactId> + <version>${servlet-api-version}</version> </dependency> <dependency> <groupId>com.ibm.icu</groupId> <artifactId>icu4j</artifactId> - <version>51.1</version> + <version>${icu4j-version}</version> </dependency> <dependency> <groupId>org.idpf</groupId> <artifactId>epubcheck</artifactId> - <version>4.0.0-alpha11</version> + <version>${epubcheck-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> - <version>1.5</version> + <version>${xmlunit-version}</version> <scope>test</scope> </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-security-cors</artifactId> - <version>${cxf-version}</version> - </dependency> + + </dependencies> <build> @@ -181,7 +228,7 @@ <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> - <version>2.1</version> + <version>${tomcat6-maven-plugin-version}</version> <executions> <execution> <id>default-cli</id> @@ -199,14 +246,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> + <version>${maven-compiler-plugin-version}</version> <configuration> - <source>1.7</source> - <target>1.7</target> + <source>${java-source-version}</source> + <target>${java-target-version}</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> + <version>${maven-eclipse-plugin-version}</version> <configuration> <projectNameTemplate>[artifactId]-[version]</projectNameTemplate> <wtpmanifest>true</wtpmanifest> @@ -214,12 +263,12 @@ <wtpversion>2.0</wtpversion> </configuration> </plugin> - <!--This plugin's configuration is used to store Eclipse m2e settings + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> + <version>${lifecycle-mapping-version}</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> @@ -252,7 +301,7 @@ <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> - <version>2.1.5</version> + <version>${git-commit-id-plugin-version}</version> <executions> <execution> <goals> @@ -274,16 +323,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.1</version> + <version>${maven-compiler-plugin-version}</version> <configuration> - <source>1.7</source> - <target>1.7</target> + <source>${java-source-version}</source> + <target>${java-target-version}</target> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>1.5</version> + <version>${build-helper-maven-plugin-version}</version> <executions> <execution> <id>reserve-network-port</id> @@ -318,6 +367,7 @@ <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> + <version>${tomcat6-maven-plugin-version}</version> <executions> <execution> <id>start-tomcat</id> @@ -347,7 +397,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>2.8.1</version> + <version>${maven-failsafe-plugin-version}</version> <executions> <execution> <id>integration-test</id> @@ -371,7 +421,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.14</version> + <version>${maven-surefire-plugin-version}</version> <configuration> <systemPropertyVariables> <webapp.directory>${project.basedir}/src/main/webapp</webapp.directory> @@ -381,7 +431,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> - <version>2.3</version> + <version>${maven-war-plugin-version}</version> <configuration> <webResources> <resource> @@ -399,29 +449,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.4</version> - <configuration> - <reportPlugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-project-info-reports-plugin</artifactId> - <version>2.8</version> - <reportSets> - <reportSet> - <reports /> - </reportSet> - </reportSets> - </plugin> - <plugin> - <groupId>org.tomdz.maven</groupId> - <artifactId>sphinx-maven-plugin</artifactId> - <version>1.0.3</version> - <configuration> - <sourceDirectory>${basedir}/docs</sourceDirectory> - </configuration> - </plugin> - </reportPlugins> - </configuration> + <version>${maven-site-plugin-version}</version> </plugin> </plugins> <resources> @@ -439,14 +467,36 @@ </resource> </resources> </build> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>${maven-project-info-reports-plugin}</version> + <reportSets> + <reportSet> + <reports /> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.tomdz.maven</groupId> + <artifactId>sphinx-maven-plugin</artifactId> + <version>${sphinx-maven-plugin-version}</version> + <configuration> + <sourceDirectory>${basedir}/docs</sourceDirectory> + </configuration> + </plugin> + </plugins> + </reporting> <profiles> <profile> - <id>esx1</id> + <id>dev</id> <properties> - <aggregator.endpoint.published>http://textgrid-esx1.gwdg.de/1.0/aggregator</aggregator.endpoint.published> - <aggregator.textgridrep.default>http://textgrid-esx1.gwdg.de/1.0/confserv</aggregator.textgridrep.default> - <aggregator.textgridrep.dev>https://textgridlab.org/dev/confserv</aggregator.textgridrep.dev> - <aggregator.classifier>esx1</aggregator.classifier> + <aggregator.endpoint.published>https://dev.textgridlab.org/1.0/aggregator</aggregator.endpoint.published> + <aggregator.textgridrep.default>https://dev.textgridlab.org/1.0/confserv</aggregator.textgridrep.default> + <aggregator.textgridrep.dev>https://dev.textgridlab.org/1.0/confserv</aggregator.textgridrep.dev> + <aggregator.classifier>dev</aggregator.classifier> </properties> </profile> <profile> @@ -463,10 +513,10 @@ <profile> <id>testserver</id> <properties> - <aggregator.endpoint.published>http://test.textgridlab.org/1.0/aggregator</aggregator.endpoint.published> - <aggregator.textgridrep.default>http://test.textgridlab.org/1.0/confserv</aggregator.textgridrep.default> - <aggregator.textgridrep.dev>https://textgridlab.org/dev/confserv</aggregator.textgridrep.dev> - <aggregator.classifier>esx1</aggregator.classifier> + <aggregator.endpoint.published>https://test.textgridlab.org/1.0/aggregator</aggregator.endpoint.published> + <aggregator.textgridrep.default>https://test.textgridlab.org/1.0/confserv</aggregator.textgridrep.default> + <aggregator.textgridrep.dev>https://dev.textgridlab.org/1.0/confserv</aggregator.textgridrep.dev> + <aggregator.classifier>dev</aggregator.classifier> </properties> </profile> <profile> @@ -481,7 +531,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> - <version>2.8.1</version> + <version>${maven-failsafe-plugin-version}</version> <executions> <execution> <id>integration-test</id> @@ -513,14 +563,14 @@ <profile> <id>textgrid.deb</id> <activation> - <activeByDefault>true</activeByDefault> + <activeByDefault>false</activeByDefault> </activation> <build> <plugins> <plugin> <artifactId>jdeb</artifactId> <groupId>org.vafer</groupId> - <version>1.4</version> + <version>${vafer-version}</version> <executions> <execution> <phase>package</phase> @@ -549,6 +599,29 @@ </plugins> </build> </profile> + <profile> + <id>sbom</id> + <build> + <plugins> + <plugin> + <groupId>org.cyclonedx</groupId> + <artifactId>cyclonedx-maven-plugin</artifactId> + <version>${cyclonedx-maven-plugin.version}</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>makeAggregateBom</goal> + </goals> + </execution> + </executions> + <configuration> + <outputFormat>JSON</outputFormat> + </configuration> + </plugin> + </plugins> + </build> + </profile> </profiles> <organization> <name>TextGrid</name> @@ -557,17 +630,17 @@ <description>The TextGrid Aggregator is a service that can walk aggregations (including editions and collections) and export the objects therein to various formats, e.g., HTML, TEI corpus, EPUB, and ZIP. It can also be used to transform single files (it is the component that is responsible for HTML rendering of TEI objects in TextGrid) and export search results as ZIP files.</description> <inceptionYear>2012</inceptionYear> <scm> - <url>https://projects.gwdg.de/projects/aggregator/repository</url> - <connection>scm:git:git://projects.gwdg.de/dariah-de/tg/textgrid-services/aggregator.git</connection> - <developerConnection>scm:git:ssh://git:@projects.gwdg.de/dariah-de/tg/textgrid-services/aggregator.git</developerConnection> + <url>https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services</url> + <connection>scm:git:git://gitlab.gwdg.de:dariah-de/dariah-de-aggragator-services.git</connection> + <developerConnection>scm:git:ssh://git:@gitlab.gwdg.de:dariah-de/dariah-de-aggragator-services.git</developerConnection> </scm> <issueManagement> - <system>OpenProjects</system> - <url>https://projects.gwdg.de/projects/tg</url> + <system>Gitlab</system> + <url>https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/issues</url> </issueManagement> <ciManagement> - <system>Jenkins</system> - <url>http://dev.digital-humanities.de/ci/job/Aggregator/</url> + <system>Gitlab</system> + <url>https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services/pipelines</url> </ciManagement> - <url>https://projects.gwdg.de/projects/aggregator</url> + <url>https://gitlab.gwdg.de/dariah-de/dariah-de-aggragator-services</url> </project> diff --git a/src/main/java/info/textgrid/services/aggregator/util/TextGridRepProvider.java b/src/main/java/info/textgrid/services/aggregator/util/TextGridRepProvider.java index 550e4dc6810348d157b74bf2d97b00cf27b1535b..8ed243a15bdf161d432fff64aa9bb92a9983cb4f 100644 --- a/src/main/java/info/textgrid/services/aggregator/util/TextGridRepProvider.java +++ b/src/main/java/info/textgrid/services/aggregator/util/TextGridRepProvider.java @@ -172,8 +172,14 @@ public Properties getLocalConfig() { public TGCrudService getCRUDService() { if (crud == null) { try { - crud = TGCrudClientUtilities.getTgcrud( + + logger.info("Confserv TG-crud entry: " + getConfValue(ConfservClientConstants.TG_CRUD)); + + crud = TGCrudClientUtilities.getTgcrud( getConfValue(ConfservClientConstants.TG_CRUD), true); + + logger.info("TG-crud version: " + crud.getVersion()); + } catch (final MalformedURLException e) { throw new IllegalArgumentException(e); } diff --git a/src/main/webapp/WEB-INF/beans.xml b/src/main/webapp/WEB-INF/beans.xml index 93d4235c664b51011d20cb269653dc528796870e..23ec1ff0a66c639cc09c268c1b9eb0a3e48f60df 100644 --- a/src/main/webapp/WEB-INF/beans.xml +++ b/src/main/webapp/WEB-INF/beans.xml @@ -17,7 +17,7 @@ http://cxf.apache.org/schemas/jaxrs.xsd"> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <context:annotation-config/> - <bean id="propertyPlaceholderConfigurer" + <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> @@ -30,9 +30,6 @@ http://cxf.apache.org/schemas/jaxrs.xsd"> <property name="ignoreUnresolvablePlaceholders" value="false" /> </bean> - - - <bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"/> <bean class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"/> <cxf:bus id="aggregator"/> diff --git a/src/main/webapp/stylesheets/tohtml.xsl b/src/main/webapp/stylesheets/tohtml.xsl index 469f4d2e144869b98f5b4a3c30f9a976a1599195..ed31ff23ff0ca38cc03519542d00884e569b7dae 100644 --- a/src/main/webapp/stylesheets/tohtml.xsl +++ b/src/main/webapp/stylesheets/tohtml.xsl @@ -107,7 +107,7 @@ </a> <xsl:if test="$currentDepth < $tocDepth and (descendant::div[head] or descendant::TEI)"> <ul> - <xsl:apply-templates> + <xsl:apply-templates mode="#current"> <xsl:with-param name="currentDepth" tunnel="yes" select="$currentDepth + 1"/> </xsl:apply-templates> </ul> diff --git a/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java b/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java index 5ed4c3d60679b751e9e7205bc537b3958f76c7dd..f5524b02c8bb22d809dbfd21fdbf6de6beffd6c3 100644 --- a/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java +++ b/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java @@ -15,7 +15,7 @@ public class SearchResultListTest { @Test public void test() { SearchResultList results = SearchResultList - .create(repository.getPublicSearchClient(), "genre:\"verse\" AND edition.agent.value:\"anakreon\"", "both", null, false) + .create(repository.getPublicSearchClient(), "work.genre:\"verse\" AND edition.agent.value:\"anakreon\"", "both", null, false) .chunkSize(10); int i = 0; for (ObjectType object : results) {