From a7c824905fb3d9b021d2b88582c9b50c6c52d1e0 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 7 Jun 2020 13:15:33 +0200 Subject: [PATCH] [doc] fix warnings while generate javadoc links This is due to changed project structure in pmd-scala --- docs/_plugins/javadoc_tag.rb | 5 +++++ docs/_plugins/jdoc_namespace_tag.rb | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/_plugins/javadoc_tag.rb b/docs/_plugins/javadoc_tag.rb index 59fba20088..0182729dc5 100644 --- a/docs/_plugins/javadoc_tag.rb +++ b/docs/_plugins/javadoc_tag.rb @@ -226,6 +226,11 @@ class JavadocTag < Liquid::Tag def self.fqcn_type(artifact_id, fqcn) artifact_dir = File.join(BASE_PMD_DIR, artifact_id) + # special case for scala as we have a different directory structure there + if artifact_id =~ /scala/ + artifact_dir = File.join(BASE_PMD_DIR, "pmd-scala-modules/pmd-scala-common") + end + src_dirs = [ File.join(artifact_dir, "src", "main", "java"), File.join(artifact_dir, "target", "generated-sources", "javacc") diff --git a/docs/_plugins/jdoc_namespace_tag.rb b/docs/_plugins/jdoc_namespace_tag.rb index 6fe9f8bf24..01373ad410 100644 --- a/docs/_plugins/jdoc_namespace_tag.rb +++ b/docs/_plugins/jdoc_namespace_tag.rb @@ -86,9 +86,14 @@ class JDocNamespaceDeclaration < Liquid::Tag expanded_fqcn += "." + fqcn_suffix end + artifactId = resolved_nspace.first + + if artifactId =~ /scala/ + artifactId = "pmd-scala_2.13" + end # Return the resolved artifactId + the expanded FQCN - [resolved_nspace.first, expanded_fqcn] + [artifactId, expanded_fqcn] end private