Bump dokka from 1.4.10.2 to 1.4.30

Remove workaround for Kotlin/dokka#1644
This commit is contained in:
Andreas Dangel
2021-04-15 14:10:44 +02:00
parent 3989c080f3
commit ab416a19ff
7 changed files with 1 additions and 71 deletions

View File

@ -49,14 +49,6 @@ established.
More information about configuring this can be found at [wagon-http](https://maven.apache.org/wagon/wagon-providers/wagon-http/).
However, this doesn't work when [dokka-maven-plugin](https://github.com/Kotlin/dokka) is used: This plugin
downloads additional dokka plugins at runtime and reconfigures somehow Maven. After this plugin is loaded,
the above system properties have no effect anymore.
See [dokka/dokka-maven-plugin#1625](https://github.com/Kotlin/dokka/issues/1625) and
[dokka/dokka-maven-plugin#1626](https://github.com/Kotlin/dokka/issues/1626).
The workaround now in place is, to download all the dependencies first, see `inc/maven-dependencies.inc`.
## Hints
### Remote debugging

View File

@ -3,7 +3,6 @@
source $(dirname $0)/inc/logger.inc
source $(dirname $0)/inc/setup-secrets.inc
source $(dirname $0)/inc/install-openjdk.inc
source $(dirname $0)/inc/maven-dependencies.inc
set -e
@ -15,10 +14,6 @@ log_group_start "Setup private env and OpenJDK"
export CI_BRANCH="${PMD_CI_GIT_REF##refs/heads/}"
log_group_end
log_group_start "Downloading maven dependencies"
maven_dependencies_resolve
log_group_end
log_group_start "Executing build with coveralls"
./mvnw \
-Dmaven.javadoc.skip=true \

View File

@ -3,7 +3,6 @@
source $(dirname $0)/inc/logger.inc
source $(dirname $0)/inc/install-openjdk.inc
source $(dirname $0)/inc/regression-tester.inc
source $(dirname $0)/inc/maven-dependencies.inc
set -e
@ -19,10 +18,6 @@ log_group_start "Installing Java"
fi
log_group_end
log_group_start "Downloading maven dependencies"
maven_dependencies_resolve
log_group_end
log_group_start "Building with maven"
./mvnw -e -V -B clean verify ${PMD_EXTRA_OPT}
log_group_end

View File

@ -3,7 +3,6 @@
source $(dirname $0)/inc/logger.inc
source $(dirname $0)/inc/setup-secrets.inc
source $(dirname $0)/inc/install-openjdk.inc
source $(dirname $0)/inc/maven-dependencies.inc
set -e
@ -12,10 +11,6 @@ log_group_start "Setup private env and OpenJDK"
install_openjdk_setdefault 11
log_group_end
log_group_start "Downloading maven dependencies"
maven_dependencies_resolve
log_group_end
log_group_start "Executing build with sonar"
./mvnw \
-Dmaven.javadoc.skip=true \

View File

@ -7,7 +7,6 @@ source $(dirname $0)/inc/pmd-doc.inc
source $(dirname $0)/inc/pmd-code-api.inc
source $(dirname $0)/inc/regression-tester.inc
source $(dirname $0)/inc/github-releases-api.inc
source $(dirname $0)/inc/maven-dependencies.inc
source $(dirname $0)/inc/install-openjdk.inc
set -e
@ -27,10 +26,6 @@ function pmd_ci_build_main() {
pmd_ci_build_setup_env
log_group_end
log_group_start "Downloading maven dependencies"
maven_dependencies_resolve
log_group_end
log_group_start "Build and Deploy"
pmd_ci_build_run
pmd_ci_deploy_build_artifacts

View File

@ -1,42 +0,0 @@
#
# needs "inc/logger.inc"
#
#
# On azure, outgoing idle connection are dropped after 4 minutes.
# Usually, you can configure wagon with ttl. But these settings are
# ignored, as soon as dokka-maven-plugin is loaded.
# dokka-maven-plugin tries to load additional dependencies at runtime
# and injects a different http client, which is not configured correctly
# and thus maven fails if it tries to download later in the build process
# further dependencies.
#
# The workaround applied here is: first resolve all dependencies,
# then explicitly get dokka-maven-plugin and then resolve all plugins
# execpt for dokka-maven-plugin, as it does not play well with dependency-plugin.
#
function maven_dependencies_resolve() {
dokka_version=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${dokka.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec)
# build first the modules, that have dependencies between themselves
# first build pmd-lang-test, pmd-test and pmd-core - used by all modules
./mvnw clean install -pl pmd-core,pmd-test,pmd-lang-test -DskipTests -Dpmd.skip=true \
-B -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
# then build dependencies for pmd-visualforce needs: pmd-apex->pmd-apex-jorje+pmd-test+pmd-core
./mvnw clean install -pl pmd-core,pmd-test,pmd-lang-test,pmd-apex-jorje,pmd-apex -DskipTests -Dpmd.skip=true \
-B -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
# the resolve most other projects. The excluded projects depend on other projects in the reactor, which is not
# completely built yet, so these are excluded.
./mvnw dependency:resolve -pl '!pmd-dist,!pmd-java8,!pmd-doc,!pmd-scala' -Dsilent -B
./mvnw dependency:get -B -Dsilent \
-DgroupId=org.jetbrains.dokka \
-DartifactId=dokka-maven-plugin \
-Dversion=${dokka_version} \
-Dpackaging=jar \
-DremoteRepositories=jcenter::default::https://jcenter.bintray.com/
./mvnw dependency:resolve-plugins -B -Dsilent -DexcludeGroupIds=org.jetbrains.dokka -Psign
}

View File

@ -87,7 +87,7 @@
<kotlin.compiler.jvmTarget>${maven.compiler.test.target}</kotlin.compiler.jvmTarget>
<kotlin.version>1.4.10</kotlin.version>
<kotest.version>4.3.1</kotest.version>
<dokka.version>1.4.10.2</dokka.version>
<dokka.version>1.4.30</dokka.version>
<javacc.version>5.0</javacc.version>