From fe36cbe93bfe73c588e16d59825a3476fbd8b666 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 11 Jul 2016 23:00:45 -0800 Subject: [PATCH] Document the new pom implementation. --- plug-ins/index.html | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/plug-ins/index.html b/plug-ins/index.html index fc29f04..93c8040 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -530,6 +530,41 @@ $ ./kobaltw uploadBintray All artifacts successfully uploaded +

Configuring your POM file

+

+ When you upload your package to Bintray or JCenter in Maven form, Kobalt will create a default + POM file for you. You can configure it with the pom{} directive in your project. + Here is an example: +

+ +
+import org.apache.maven.model.*
+
+val myProject = project {
+    pom = Model().apply {
+        name = project.name
+        licenses = listOf(License().apply {
+            name = "Apache 2.0"
+            url = "http://www.apache .org/licenses/LICENSE-2.0"
+        })
+        scm = Scm().apply {
+            url = "http://github.com/cbeust/kobalt"
+            connection = "https://github.com/cbeust/kobalt.git"
+            developerConnection = "git@github.com:cbeust/kobalt.git"
+        }
+        developers = listOf(Developer().apply {
+            name = "Cedric Beust"
+            email = "cedric@beust.com"
+        })
+    }
+
+
+ +

+ Note that the classes used in this snippet (Model, License, etc...) are + the actual Apache Maven class, so you have access to the full POM model. +

+

Dokka