diff --git a/LICENSE b/LICENSE index 3ddb6ba..c90d3b3 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2021-2023 Athena Research and Innovation Center (ARC) + Copyright 2021-2024 OpenAIRE AMKE Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/build.gradle b/build.gradle index 2c93e69..93fe9de 100644 --- a/build.gradle +++ b/build.gradle @@ -12,9 +12,14 @@ java { repositories { mavenCentral() - flatDir { - dirs 'libs' + maven { + name "d4science" + url "https://maven.d4science.org/nexus/content/repositories/dnet45-snapshots/" } + // Enable the following, in case you want to test temporal-jars. + /*flatDir { + dirs 'libs' + }*/ } dependencies { @@ -32,7 +37,7 @@ dependencies { // Enable the validation annotations. //implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: '3.0.2' - implementation ("eu.openaire:publications_retriever:1.1-SNAPSHOT") { + implementation ("eu.openaire:publications_retriever:1.2-SNAPSHOT") { exclude group: 'ch.qos.logback', module: 'logback-core' exclude group: 'ch.qos.logback', module: 'logback-classic' exclude group: 'org.slf4j', module: 'slf4j-api' diff --git a/createSwapStorage.sh b/createSwapStorage.sh index 51be9d8..8bf7a1c 100755 --- a/createSwapStorage.sh +++ b/createSwapStorage.sh @@ -21,5 +21,5 @@ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab # Adjusting the Swappiness Property cat /proc/sys/vm/swappiness -sudo sysctl vm.swappiness=10 # Setting it closer to 0, makes the swaps more rare. (10 %) +sudo sysctl vm.swappiness=10 # Setting it closer to 0, makes the swaps more rare: 10%. The default is 60%. echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf # Append it to that file in order for the custom "swappiness" to be available on restart. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1af9e09..a80b22c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/installAndRun.sh b/installAndRun.sh index 03c66ac..d3a6d8f 100755 --- a/installAndRun.sh +++ b/installAndRun.sh @@ -11,55 +11,19 @@ handle_error () { cd "${0%/*}" || handle_error "Could not change-dir to this script's dir!" 1 justRun=0 -avoidReInstallingPublicationsRetriever=0 if [[ $# -eq 1 ]]; then justRun=$1 -elif [[ $# -eq 2 ]]; then - justRun=$1 - avoidReInstallingPublicationsRetriever=$2 -elif [[ $# -gt 2 ]]; then - echo -e "Wrong number of arguments given: ${#} (more than 2)\nPlease execute it like: script.sh "; exit 2 +elif [[ $# -gt 1 ]]; then + echo -e "Wrong number of arguments given: ${#} (more than 1)\nPlease execute it like: script.sh "; exit 2 fi -gradleVersion="8.5" +gradleVersion="8.6" shouldBeCarefulWithMaxHeap=0 # This is NOT a cmd-arg. if [[ justRun -eq 0 ]]; then - if [[ avoidReInstallingPublicationsRetriever -eq 1 ]]; then - if [[ ! -f ./libs/publications_retriever-1.1-SNAPSHOT.jar ]]; then - echo -e "\n\nThe required \"PublicationsRetriever\" software has not been installed yet, thus the script will override the user-defined value of \"avoidReInstallingPublicationsRetriever\" to FALSE..\n\n" - avoidReInstallingPublicationsRetriever=0; # In case the jar-file does not exists, then make sure we follow the normal procedure, independently from what the user requested. - fi - fi - - if [[ avoidReInstallingPublicationsRetriever -eq 0 ]]; then - - if [ ! -d libs ]; then - mkdir libs || handle_error "The directory \"libs\" could not be created! Exiting.." 3 - fi - cd libs || exit 4 - git clone https://github.com/LSmyrnaios/PublicationsRetriever.git # We assume there is no previously source-code here, if so, it will be overwritten. - - # Keep a backup of the previous JAR file, if it exists. - if [ -f ./publications_retriever-1.1-SNAPSHOT.jar ]; then - mv ./publications_retriever-1.1-SNAPSHOT.jar ./publications_retriever-1.1-SNAPSHOT_BACKUP.jar - fi - - cd PublicationsRetriever && sudo apt install -y maven && mvn clean install - - # Copy the created JAR file to the top libs directory. - cp target/publications_retriever-1.1-SNAPSHOT.jar ../publications_retriever-1.1-SNAPSHOT.jar - - # Delete the directory with the source-code. - cd ../ && rm -rf PublicationsRetriever - - # Clean, (re)build and run the project. - cd ../ - fi - # Install the specified Gradle-build-tool version, if it does not exist. if [[ ! -d /opt/gradle/gradle-${gradleVersion} ]]; then wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip @@ -86,7 +50,7 @@ if [[ justRun -eq 0 ]]; then #gradle tasks # For debugging installation #gradle -v # For debugging installation - gradle clean build + gradle clean build # --refresh-dependencies # --info else export PATH=/opt/gradle/gradle-${gradleVersion}/bin:$PATH # Make sure the gradle is still accessible (it usually isn't without the "export"). fi diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index c7b8875..aca8638 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -34,6 +34,7 @@ workerReportsDirPath: ${HOME}/workerReports/ # LOGGING LEVELS logging.config=classpath:logback-spring.xml +logging.file.path=logs logging.level.root=INFO logging.level.org.springframework.web=INFO logging.level.org.springframework.security=WARN diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 40bffc7..9184c83 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -2,7 +2,7 @@ - logs/UrlsWorker.log + ${LOG_PATH}/UrlsWorker.log logs/UrlsWorker.%i.log.zip @@ -27,7 +27,10 @@ + + \ No newline at end of file