From 526eb3bce36a582a3b4e9af002273b91ed6b1f63 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 10 Jul 2015 15:08:07 +0300 Subject: Build and install dokka fatjar to a local repository (to be used by maven) --- .gitignore | 1 + build.xml | 17 +++++++++++++++++ lib/maven-ant-tasks-2.1.3.jar | Bin 0 -> 1316000 bytes 3 files changed, 18 insertions(+) create mode 100644 lib/maven-ant-tasks-2.1.3.jar diff --git a/.gitignore b/.gitignore index 182d9c77..eecbb95c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.idea/workspace.xml out doc +target diff --git a/build.xml b/build.xml index bd64db8a..f8d81fc9 100644 --- a/build.xml +++ b/build.xml @@ -1,5 +1,7 @@ + + @@ -29,4 +31,19 @@ + + + + + + + + + + + diff --git a/lib/maven-ant-tasks-2.1.3.jar b/lib/maven-ant-tasks-2.1.3.jar new file mode 100644 index 00000000..bec446ff Binary files /dev/null and b/lib/maven-ant-tasks-2.1.3.jar differ -- cgit From 549ef194efc7a3eee948eac2da4ac36c2e47a6a1 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 10 Jul 2015 15:10:36 +0300 Subject: Maven plugin initial implementation --- .idea/compiler.xml | 13 +- ...rg_apache_maven_maven_aether_provider_3_0_5.xml | 14 ++ ...aven__org_apache_maven_maven_artifact_3_0_5.xml | 14 ++ .../Maven__org_apache_maven_maven_core_3_0_5.xml | 14 ++ .../Maven__org_apache_maven_maven_model_3_0_5.xml | 14 ++ ..._org_apache_maven_maven_model_builder_3_0_5.xml | 14 ++ ...en__org_apache_maven_maven_plugin_api_3_0_5.xml | 14 ++ ...pache_maven_maven_repository_metadata_3_0_5.xml | 14 ++ ...aven__org_apache_maven_maven_settings_3_0_5.xml | 14 ++ ...g_apache_maven_maven_settings_builder_3_0_5.xml | 14 ++ ...n_plugin_tools_maven_plugin_annotations_3_4.xml | 14 ++ ..._org_codehaus_plexus_plexus_classworlds_2_4.xml | 14 ++ ...s_plexus_plexus_component_annotations_1_5_5.xml | 14 ++ ...g_codehaus_plexus_plexus_interpolation_1_14.xml | 14 ++ ...en__org_codehaus_plexus_plexus_utils_3_0_22.xml | 14 ++ ...Maven__org_jetbrains_dokka_dokka_fatjar_1_0.xml | 14 ++ ...aven__org_sonatype_aether_aether_api_1_13_1.xml | 14 ++ ...ven__org_sonatype_aether_aether_impl_1_13_1.xml | 14 ++ ...aven__org_sonatype_aether_aether_spi_1_13_1.xml | 14 ++ ...ven__org_sonatype_aether_aether_util_1_13_1.xml | 14 ++ ...aven__org_sonatype_plexus_plexus_cipher_1_4.xml | 14 ++ ...g_sonatype_plexus_plexus_sec_dispatcher_1_3.xml | 14 ++ .../Maven__org_sonatype_sisu_sisu_guava_0_9_9.xml | 14 ++ ...__org_sonatype_sisu_sisu_guice_no_aop_3_1_0.xml | 14 ++ ...n__org_sonatype_sisu_sisu_inject_bean_2_3_0.xml | 14 ++ ..._org_sonatype_sisu_sisu_inject_plexus_2_3_0.xml | 14 ++ .idea/misc.xml | 10 +- .idea/modules.xml | 1 + .idea/runConfigurations/Dokka.xml | 1 + .idea/runConfigurations/Stdlib.xml | 1 + maven-plugin/maven-plugin.iml | 46 +++++++ maven-plugin/pom.xml | 149 +++++++++++++++++++++ maven-plugin/src/main/kotlin/DokkaMojo.kt | 71 ++++++++++ maven-plugin/src/main/kotlin/MavenDokkaLogger.kt | 18 +++ 34 files changed, 656 insertions(+), 4 deletions(-) create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_artifact_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_core_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_model_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_model_builder_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_plugin_api_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_settings_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_maven_settings_builder_3_0_5.xml create mode 100644 .idea/libraries/Maven__org_apache_maven_plugin_tools_maven_plugin_annotations_3_4.xml create mode 100644 .idea/libraries/Maven__org_codehaus_plexus_plexus_classworlds_2_4.xml create mode 100644 .idea/libraries/Maven__org_codehaus_plexus_plexus_component_annotations_1_5_5.xml create mode 100644 .idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_14.xml create mode 100644 .idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_22.xml create mode 100644 .idea/libraries/Maven__org_jetbrains_dokka_dokka_fatjar_1_0.xml create mode 100644 .idea/libraries/Maven__org_sonatype_aether_aether_api_1_13_1.xml create mode 100644 .idea/libraries/Maven__org_sonatype_aether_aether_impl_1_13_1.xml create mode 100644 .idea/libraries/Maven__org_sonatype_aether_aether_spi_1_13_1.xml create mode 100644 .idea/libraries/Maven__org_sonatype_aether_aether_util_1_13_1.xml create mode 100644 .idea/libraries/Maven__org_sonatype_plexus_plexus_cipher_1_4.xml create mode 100644 .idea/libraries/Maven__org_sonatype_plexus_plexus_sec_dispatcher_1_3.xml create mode 100644 .idea/libraries/Maven__org_sonatype_sisu_sisu_guava_0_9_9.xml create mode 100644 .idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_1_0.xml create mode 100644 .idea/libraries/Maven__org_sonatype_sisu_sisu_inject_bean_2_3_0.xml create mode 100644 .idea/libraries/Maven__org_sonatype_sisu_sisu_inject_plexus_2_3_0.xml create mode 100644 maven-plugin/maven-plugin.iml create mode 100644 maven-plugin/pom.xml create mode 100644 maven-plugin/src/main/kotlin/DokkaMojo.kt create mode 100644 maven-plugin/src/main/kotlin/MavenDokkaLogger.kt diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 217af471..1f71f978 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -17,7 +17,16 @@ + + + + + + + + + + - - + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_0_5.xml new file mode 100644 index 00000000..8045561c --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_aether_provider_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_artifact_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_artifact_3_0_5.xml new file mode 100644 index 00000000..0267be02 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_artifact_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_core_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_core_3_0_5.xml new file mode 100644 index 00000000..2fdaa3be --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_core_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_model_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_model_3_0_5.xml new file mode 100644 index 00000000..f22a2907 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_model_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_model_builder_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_model_builder_3_0_5.xml new file mode 100644 index 00000000..fffe6fc5 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_model_builder_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_plugin_api_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_plugin_api_3_0_5.xml new file mode 100644 index 00000000..a3f5de62 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_plugin_api_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_0_5.xml new file mode 100644 index 00000000..e43a45cc --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_repository_metadata_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_settings_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_settings_3_0_5.xml new file mode 100644 index 00000000..bf513116 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_settings_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_maven_settings_builder_3_0_5.xml b/.idea/libraries/Maven__org_apache_maven_maven_settings_builder_3_0_5.xml new file mode 100644 index 00000000..70e3a6dc --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_maven_settings_builder_3_0_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_maven_plugin_tools_maven_plugin_annotations_3_4.xml b/.idea/libraries/Maven__org_apache_maven_plugin_tools_maven_plugin_annotations_3_4.xml new file mode 100644 index 00000000..a4eaef16 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_maven_plugin_tools_maven_plugin_annotations_3_4.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_plexus_plexus_classworlds_2_4.xml b/.idea/libraries/Maven__org_codehaus_plexus_plexus_classworlds_2_4.xml new file mode 100644 index 00000000..d7fbbc35 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_plexus_plexus_classworlds_2_4.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_plexus_plexus_component_annotations_1_5_5.xml b/.idea/libraries/Maven__org_codehaus_plexus_plexus_component_annotations_1_5_5.xml new file mode 100644 index 00000000..f479523d --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_plexus_plexus_component_annotations_1_5_5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_14.xml b/.idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_14.xml new file mode 100644 index 00000000..c3fa79e6 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_plexus_plexus_interpolation_1_14.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_22.xml b/.idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_22.xml new file mode 100644 index 00000000..40dd204d --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_plexus_plexus_utils_3_0_22.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_dokka_dokka_fatjar_1_0.xml b/.idea/libraries/Maven__org_jetbrains_dokka_dokka_fatjar_1_0.xml new file mode 100644 index 00000000..edbc7fea --- /dev/null +++ b/.idea/libraries/Maven__org_jetbrains_dokka_dokka_fatjar_1_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_aether_aether_api_1_13_1.xml b/.idea/libraries/Maven__org_sonatype_aether_aether_api_1_13_1.xml new file mode 100644 index 00000000..6920f594 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_aether_aether_api_1_13_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_aether_aether_impl_1_13_1.xml b/.idea/libraries/Maven__org_sonatype_aether_aether_impl_1_13_1.xml new file mode 100644 index 00000000..b73975ee --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_aether_aether_impl_1_13_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_aether_aether_spi_1_13_1.xml b/.idea/libraries/Maven__org_sonatype_aether_aether_spi_1_13_1.xml new file mode 100644 index 00000000..0e335343 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_aether_aether_spi_1_13_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_aether_aether_util_1_13_1.xml b/.idea/libraries/Maven__org_sonatype_aether_aether_util_1_13_1.xml new file mode 100644 index 00000000..b30cc9ed --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_aether_aether_util_1_13_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_plexus_plexus_cipher_1_4.xml b/.idea/libraries/Maven__org_sonatype_plexus_plexus_cipher_1_4.xml new file mode 100644 index 00000000..720a6556 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_plexus_plexus_cipher_1_4.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_plexus_plexus_sec_dispatcher_1_3.xml b/.idea/libraries/Maven__org_sonatype_plexus_plexus_sec_dispatcher_1_3.xml new file mode 100644 index 00000000..b192388d --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_plexus_plexus_sec_dispatcher_1_3.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_sisu_sisu_guava_0_9_9.xml b/.idea/libraries/Maven__org_sonatype_sisu_sisu_guava_0_9_9.xml new file mode 100644 index 00000000..0223ffa6 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_sisu_sisu_guava_0_9_9.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_1_0.xml b/.idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_1_0.xml new file mode 100644 index 00000000..6f390b97 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_sisu_sisu_guice_no_aop_3_1_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_bean_2_3_0.xml b/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_bean_2_3_0.xml new file mode 100644 index 00000000..1bd7c6d0 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_bean_2_3_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_plexus_2_3_0.xml b/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_plexus_2_3_0.xml new file mode 100644 index 00000000..e9688bc0 --- /dev/null +++ b/.idea/libraries/Maven__org_sonatype_sisu_sisu_inject_plexus_2_3_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 97320410..6208e987 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,8 +3,14 @@ + + + - - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index bfcf8757..3cc41820 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -4,6 +4,7 @@ + \ No newline at end of file diff --git a/.idea/runConfigurations/Dokka.xml b/.idea/runConfigurations/Dokka.xml index bca49a60..b752422e 100644 --- a/.idea/runConfigurations/Dokka.xml +++ b/.idea/runConfigurations/Dokka.xml @@ -1,3 +1,4 @@ + diff --git a/.idea/runConfigurations/Stdlib.xml b/.idea/runConfigurations/Stdlib.xml index 616414a8..7750c5df 100644 --- a/.idea/runConfigurations/Stdlib.xml +++ b/.idea/runConfigurations/Stdlib.xml @@ -1,3 +1,4 @@ + diff --git a/maven-plugin/maven-plugin.iml b/maven-plugin/maven-plugin.iml new file mode 100644 index 00000000..b965c125 --- /dev/null +++ b/maven-plugin/maven-plugin.iml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml new file mode 100644 index 00000000..de7a5595 --- /dev/null +++ b/maven-plugin/pom.xml @@ -0,0 +1,149 @@ + + + 4.0.0 + + org.jetbrains.dokka + dokka-maven-plugin + 0.0.1-SNAPSHOT + maven-plugin + + + 1.4.1 + 3.0.5 + 3.0.22 + 0.1-SNAPSHOT + + + + + org.apache.maven + maven-core + ${maven.version} + + + org.apache.maven + maven-model + ${maven.version} + + + org.apache.maven + maven-plugin-api + ${maven.version} + + + org.codehaus.plexus + plexus-utils + ${plexus.version} + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.4 + + + + org.jetbrains.dokka + dokka-fatjar + 1.0 + jar + compile + + + + + + my-local-repo + file://${basedir}/../out/repo + + + + + src/main/kotlin + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + org.apache.maven.plugins + maven-plugin-plugin + 3.4 + + + + default-descriptor + + descriptor + + process-classes + + + help-descriptor + + helpmojo + + process-classes + + + + + dokka + + + + + + maven-jar-plugin + 2.6 + + + default-jar + none + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.5.5 + + + jar-with-dependencies + + false + + + + make-assembly + package + + single + + + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/main/kotlin/DokkaMojo.kt b/maven-plugin/src/main/kotlin/DokkaMojo.kt new file mode 100644 index 00000000..80f00c42 --- /dev/null +++ b/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -0,0 +1,71 @@ +package org.jetbrains.dokka.maven + +import org.apache.maven.plugin.AbstractMojo +import org.apache.maven.plugins.annotations.LifecyclePhase +import org.apache.maven.plugins.annotations.Mojo +import org.apache.maven.plugins.annotations.Parameter +import org.apache.maven.plugins.annotations.ResolutionScope +import org.jetbrains.dokka.DokkaGenerator +import org.jetbrains.dokka.SourceLinkDefinition + +public class SourceLinkMapItem { + Parameter(name = "dir", required = true) + var dir: String = "" + + Parameter(name = "url", required = true) + var url: String = "" + + Parameter(name = "urlSuffix") + var urlSuffix: String? = null +} + +Mojo(name = "dokka", defaultPhase = LifecyclePhase.PRE_SITE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE, requiresProject = true) +public class DokkaMojo : AbstractMojo() { + Parameter(required = true, defaultValue = "\${project.compileSourceRoots}") + var sourceDirectories: List = emptyList() + + Parameter + var samplesDirs: List = emptyList() + + Parameter + var includeDirs: List = emptyList() + + Parameter(required = true, defaultValue = "\${project.compileClasspathElements}") + var classpath: List = emptyList() + + Parameter(required = true, defaultValue = "\${project.basedir}/target/dokka") + var outputDir: String = "" + + Parameter(required = true, defaultValue = "html") + var outputFormat: String = "html" + + Parameter + var sourceLinks: Array = emptyArray() + + Parameter(required = true, defaultValue = "\${project.artifactId}") + var moduleName: String = "" + + Parameter(required = false, defaultValue = "false") + var skip: Boolean = false + + override fun execute() { + if (skip) { + getLog().info("Dokka skip parameter is true so no dokka output will be produced") + return + } + + val gen = DokkaGenerator( + MavenDokkaLogger(getLog()), + classpath, + sourceDirectories, + samplesDirs, + includeDirs, + moduleName, + outputDir, + outputFormat, + sourceLinks.map { SourceLinkDefinition(it.dir, it.url, it.urlSuffix) } + ) + + gen.generate() + } +} diff --git a/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt b/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt new file mode 100644 index 00000000..ebae823b --- /dev/null +++ b/maven-plugin/src/main/kotlin/MavenDokkaLogger.kt @@ -0,0 +1,18 @@ +package org.jetbrains.dokka.maven + +import org.apache.maven.plugin.logging.Log +import org.jetbrains.dokka.DokkaLogger + +public class MavenDokkaLogger(val log: Log) : DokkaLogger { + override fun error(message: String) { + log.error(message) + } + + override fun info(message: String) { + log.info(message) + } + + override fun warn(message: String) { + log.warn(message) + } +} \ No newline at end of file -- cgit From 31bbbcca92a328a1142552dd305ac29c2df2a1fe Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 10 Jul 2015 15:20:11 +0300 Subject: Building all by ant + doc --- README.md | 21 +++++++++++++++++++++ build.xml | 11 +++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index 950f6493..7722b8ca 100644 --- a/README.md +++ b/README.md @@ -85,3 +85,24 @@ KDoc is a flavour of markdown with symbol processing extensions. * $name - link to `name` (Kotlin string interpolation style), or ${java.lang.String} for longer references * $name: - named section, optionally bound to symbol `name`, e.g. param doc * ${code reference} -- include content of a symbol denoted by reference, e.g. code example + +### Building + +Build only dokka + +```bash +ant fatjar +``` + +Build dokka and maven plugin + +```bash +ant install-fj +cd maven-plugin +mvn install +``` + +Build dokka and install maven plugin (do not require maven installed) +```bash +ant build-and-install +``` diff --git a/build.xml b/build.xml index f8d81fc9..4174195e 100644 --- a/build.xml +++ b/build.xml @@ -4,6 +4,11 @@ + + + + + @@ -46,4 +51,10 @@ + + + + + + -- cgit From 3d25df6c3c68b43431abbed326b17c50717a18f7 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 10 Jul 2015 15:47:32 +0300 Subject: Add JANSI library as it is required sometimes --- .idea/libraries/Maven__org_fusesource_jansi_jansi_1_11.xml | 14 ++++++++++++++ maven-plugin/maven-plugin.iml | 2 ++ maven-plugin/pom.xml | 6 ++++++ 3 files changed, 22 insertions(+) create mode 100644 .idea/libraries/Maven__org_fusesource_jansi_jansi_1_11.xml diff --git a/.idea/libraries/Maven__org_fusesource_jansi_jansi_1_11.xml b/.idea/libraries/Maven__org_fusesource_jansi_jansi_1_11.xml new file mode 100644 index 00000000..5f1c2b5d --- /dev/null +++ b/.idea/libraries/Maven__org_fusesource_jansi_jansi_1_11.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/maven-plugin/maven-plugin.iml b/maven-plugin/maven-plugin.iml index b965c125..52e48c92 100644 --- a/maven-plugin/maven-plugin.iml +++ b/maven-plugin/maven-plugin.iml @@ -14,6 +14,7 @@ + @@ -41,6 +42,7 @@ + \ No newline at end of file diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index de7a5595..96b33e1b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -43,6 +43,12 @@ 3.4 + + org.fusesource.jansi + jansi + 1.11 + + org.jetbrains.dokka dokka-fatjar -- cgit From b3c4292f209511e79c84dd76d42355baa04e16ba Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 10 Jul 2015 15:51:59 +0300 Subject: Maven plugin getting started --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/README.md b/README.md index 7722b8ca..68d82aab 100644 --- a/README.md +++ b/README.md @@ -106,3 +106,51 @@ Build dokka and install maven plugin (do not require maven installed) ```bash ant build-and-install ``` + +### Using Maven plugin + +Minimal maven configuration is + +```xml + + org.jetbrains.dokka + dokka-maven-plugin + ${dokka.version} + + + pre-site + + dokka + + + + +``` + +by default files will be generated in `target/dokka` + +Configuring source links mapping + +```xml + + org.jetbrains.dokka + dokka-maven-plugin + ${dokka.version} + + + pre-site + + dokka + + + + + + + ${project.basedir}/src/main/kotlin + http://github.com/me/myrepo + + + + +``` \ No newline at end of file -- cgit From 513af27ac95939e659d337b02d94b096bad7d970 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Mon, 13 Jul 2015 17:49:57 +0300 Subject: Add sonatype repo --- maven-plugin/pom.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 96b33e1b..ad2117a8 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -149,7 +149,20 @@ - + + + + sonatype.oss.snapshots + Sonatype OSS Snapshot Repository + http://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + \ No newline at end of file -- cgit