Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to ohsome-parent 2.10 #375

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Changelog

* make sure predicate-filters are always serializable ([#353])
* improve maintainability of parts of important central processing algorithms for determining entity modification history: refactoring improves code structure, adds inline documentation and enhances test coverage ([#327])
* reorganize and update ohsome parent module ([#360])
* reorganize and update ohsome parent module, requires maven version 3.6 or higher ([#360], [#375])
* add new interfaces `OSHDBTemporal` and `OSHDBBoundable` ([#369])

### bugfixes
Expand Down Expand Up @@ -53,6 +53,7 @@ Changelog
[#353]: https://github.com/GIScience/oshdb/pull/353
[#360]: https://github.com/GIScience/oshdb/pull/360
[#369]: https://github.com/GIScience/oshdb/pull/369
[#375]: https://github.com/GIScience/oshdb/pull/375


## 0.6.4
Expand Down
34 changes: 21 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
pipeline {
agent {label 'main'}
options {
timeout(time: 30, unit: 'MINUTES')
}

environment {
REPO_NAME = sh(returnStdout: true, script: 'basename `git remote get-url origin` .git').trim()
VERSION = sh(returnStdout: true, script: 'mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev "(^\\[|Download\\w+)"').trim()
VERSION = sh(returnStdout: true, script: 'mvn --batch-mode org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev "(^\\[|Download\\w+)"').trim()
LATEST_AUTHOR = sh(returnStdout: true, script: 'git show -s --pretty=%an').trim()
LATEST_COMMIT_ID = sh(returnStdout: true, script: 'git describe --tags --long --always').trim()

Expand Down Expand Up @@ -47,7 +50,7 @@ pipeline {
rtMaven.deployer.deployArtifacts = false

withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar verify -P jacoco,sign,git -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
buildInfo = rtMaven.run pom: 'pom.xml', goals: '--batch-mode clean compile javadoc:jar source:jar verify -P jacoco,sign,git -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
}
}
}
Expand All @@ -63,7 +66,7 @@ pipeline {
script {
// START CUSTOM oshdb
withSonarQubeEnv('sonarcloud GIScience/ohsome') {
sh "mvn sonar:sonar -Dsonar.branch.name=${env.BRANCH_NAME} -Dsonar.projectName=OSHDB"
sh "mvn --batch-mode sonar:sonar -Dsonar.branch.name=${env.BRANCH_NAME} -Dsonar.projectName=OSHDB"
}
// END CUSTOM oshdb
report_basedir = "/srv/reports/${REPO_NAME}/${VERSION}_${env.BRANCH_NAME}/${env.BUILD_NUMBER}_${LATEST_COMMIT_ID}"
Expand All @@ -82,13 +85,13 @@ pipeline {
// infer
if (env.BRANCH_NAME ==~ INFER_BRANCH_REGEX) {
report_dir = report_basedir + "/infer/"
sh "mvn clean"
sh "infer run --pmd-xml -r -- mvn compile"
sh "mvn --batch-mode clean"
sh "infer run --pmd-xml -r -- mvn --batch-mode compile"
sh "mkdir -p ${report_dir} && rm -Rf ${report_dir}* && cp -R ./infer-out/* ${report_dir}"
}

// warnings plugin
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e clean compile checkstyle:checkstyle pmd:pmd pmd:cpd com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'
rtMaven.run pom: 'pom.xml', goals: '--batch-mode -V -e clean compile checkstyle:checkstyle pmd:pmd pmd:cpd spotbugs:spotbugs -Dmaven.repo.local=.m2'

recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
recordIssues enabledForFailure: true, tool: checkStyle()
Expand Down Expand Up @@ -116,7 +119,7 @@ pipeline {
// START CUSTOM oshdb
// CUSTOM: added withDep profile
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
buildInfo = rtMaven.run pom: 'pom.xml', goals: '--batch-mode clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
// END CUSTOM oshdb
rtMaven.deployer.deployArtifacts buildInfo
Expand All @@ -142,7 +145,7 @@ pipeline {
// START CUSTOM oshdb
// CUSTOM: added withDep profile
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
buildInfo = rtMaven.run pom: 'pom.xml', goals: 'clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
buildInfo = rtMaven.run pom: 'pom.xml', goals: '--batch-mode clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
// END CUSTOM oshdb
rtMaven.deployer.deployArtifacts buildInfo
Expand All @@ -153,7 +156,7 @@ pipeline {
file(credentialsId: 'ossrh-settings', variable: 'settingsFile'),
string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')
]) {
sh 'mvn clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
sh 'mvn --batch-mode clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,deploy-central -Dmaven.repo.local=.m2 -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
}
post {
Expand Down Expand Up @@ -214,12 +217,12 @@ pipeline {
steps {
script {
// load dependencies to artifactory
rtMaven.run pom: 'pom.xml', goals: 'org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -Dmaven.repo.local=.m2'
rtMaven.run pom: 'pom.xml', goals: '--batch-mode org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -Dmaven.repo.local=.m2'

javadc_dir = "/srv/javadoc/java/" + REPO_NAME + "/" + VERSION + "/"
echo javadc_dir

rtMaven.run pom: 'pom.xml', goals: 'clean javadoc:javadoc -Dadditionalparam=-Xdoclint:none -Dmaven.repo.local=.m2'
rtMaven.run pom: 'pom.xml', goals: '--batch-mode clean javadoc:javadoc -Dadditionalparam=-Xdoclint:none -Dmaven.repo.local=.m2'
sh "echo ${javadc_dir}"
// make sure jenkins uses bash not dash!
sh "mkdir -p ${javadc_dir} && rm -Rf ${javadc_dir}* && find . -path '*/target/site/apidocs' -exec cp -R --parents {} ${javadc_dir} \\; && find ${javadc_dir} -path '*/target/site/apidocs' | while read line; do echo \$line; neu=\${line/target\\/site\\/apidocs/} ; mv \$line/* \$neu ; done && find ${javadc_dir} -type d -empty -delete"
Expand All @@ -228,7 +231,7 @@ pipeline {
// START CUSTOM oshdb
script {
javadc_dir = javadc_dir + "aggregated/"
rtMaven.run pom: 'pom.xml', goals: 'clean javadoc:aggregate -Dadditionalparam=-Xdoclint:none -Dmaven.repo.local=.m2'
rtMaven.run pom: 'pom.xml', goals: '--batch-mode clean javadoc:aggregate -Dadditionalparam=-Xdoclint:none -Dmaven.repo.local=.m2'
sh "mkdir -p ${javadc_dir} && rm -Rf ${javadc_dir}* && find . -path './target/site/apidocs' -exec cp -R --parents {} ${javadc_dir} \\; && find ${javadc_dir} -path '*/target/site/apidocs' | while read line; do echo \$line; neu=\${line/target\\/site\\/apidocs/} ; mv \$line/* \$neu ; done && find ${javadc_dir} -type d -empty -delete"
}
// END CUSTOM oshdb
Expand All @@ -255,10 +258,15 @@ pipeline {
}
steps {
script {
update_notify = sh(returnStdout: true, script: 'mvn versions:display-dependency-updates | grep -Pzo "(?s)The following dependencies.*\\n.* \\n"').trim()
update_notify = sh(returnStdout: true, script: 'mvn --batch-mode versions:display-dependency-updates | grep -Pzo "(?s)The following dependencies([^\\n]*\\S\\n)*[^\\n]*\\s\\n"').trim()
echo update_notify
}
rocketSend channel: 'jenkinsohsome', emoji: ':wave:' , message: "Check your dependencies in *${REPO_NAME}*. You might have updates: ${update_notify}" , rawMessage: true
script {
update_notify = sh(returnStdout: true, script: 'mvn --batch-mode versions:display-plugin-updates | grep -Pzo "(?s)The following plugin update([^\\n]*\\S\\n)*[^\\n]*\\s\\n"').trim()
echo update_notify
}
rocketSend channel: 'jenkinsohsome', emoji: ':wave:' , message: "Check your maven plugins in *${REPO_NAME}*. You might have updates: ${update_notify}" , rawMessage: true
}
post {
failure {
Expand Down
14 changes: 0 additions & 14 deletions oshdb-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExcludes>org.slf4j:slf4j-simple</classpathDependencyExcludes>
</classpathDependencyExcludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
35 changes: 1 addition & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.heigit.ohsome</groupId>
<artifactId>ohsome-parent</artifactId>
<version>2.9</version>
<version>2.10</version>
</parent>

<artifactId>oshdb-parent</artifactId>
Expand Down Expand Up @@ -42,11 +42,8 @@
<jts.version>1.16.1</jts.version>
<junit.version>4.13.1</junit.version>
<mavenassembly.version>3.1.1</mavenassembly.version>
<mavenpmd.version>3.11.0</mavenpmd.version>
<mavensurefire.version>2.22.2</mavensurefire.version>
<orgjson.version>20160810</orgjson.version>
<osmosis.version>0.45</osmosis.version>
<pmd.version>6.11.0</pmd.version>
<postgresql.version>42.1.4</postgresql.version>
<protobuf.version>2.6.1</protobuf.version>
<roaringbitmap.version>0.6.59</roaringbitmap.version>
Expand Down Expand Up @@ -92,34 +89,4 @@
<system>GitHub</system>
<url>https://github.com/GIScience/oshdb/issues</url>
</issueManagement>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${mavensurefire.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${mavenpmd.version}</version>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>