Maven Local Repository Plug-in for Kobalt

<1 min read

I've released another plug-in for Cédric's Kobalt build system based on Kotlin.

The plug-in will detect the Maven Local Repository location, similarly to Gradle's mavenLocal() repository handler.

To use the plug-in include the following in your Build.kt file:

import net.thauvin.erik.kobalt.plugin.maven.local.*

val pl = plugins("net.thauvin.erik:kobalt-maven-local:")

val p = project {
    name = "example"
}

Use the localMaven() directive to tell Kobalt to look for artifacts in the Maven Local Repository:

val repos = repos(localMaven())

To publish to the Maven Local Repository use the publishToMavenLocal task:

./kobaltw publishToMavenLocal

The plug-in will look for a local repository in these standard Maven locations:

  1. maven.repo.local
  2. ~/.m2/settings.xml
  3. $M2_HOME/conf/settings.xml
  4. ~/.m2/repository

Documentation and source are on GitHub.