Finalized README

This commit is contained in:
Erik C. Thauvin 2016-07-21 22:48:10 -07:00
parent 066eead111
commit a4b333e854
4 changed files with 15 additions and 10 deletions

View file

@ -1,6 +1,6 @@
# Maven Local Repository plug-in for [Kobalt](http://beust.com/kobalt/home/index.html) # Maven Local Repository plug-in for [Kobalt](http://beust.com/kobalt/home/index.html)
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Build Status](https://travis-ci.org/ethauvin/kobalt-maven-local.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-maven-local) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](http://opensource.org/licenses/BSD-3-Clause) [![Build Status](https://travis-ci.org/ethauvin/kobalt-maven-local.svg?branch=master)](https://travis-ci.org/ethauvin/kobalt-maven-local) [![Download](https://api.bintray.com/packages/ethauvin/maven/kobalt-maven-local/images/download.svg) ](https://bintray.com/ethauvin/maven/kobalt-maven-local/_latestVersion)
The plug-in will detect the Maven Local Repository location, similarly to Gradle's [mavenLocal()](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.dsl.RepositoryHandler.html#org.gradle.api.artifacts.dsl.RepositoryHandler:mavenLocal()) repository handler. The plug-in will detect the Maven Local Repository location, similarly to Gradle's [mavenLocal()](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.dsl.RepositoryHandler.html#org.gradle.api.artifacts.dsl.RepositoryHandler:mavenLocal()) repository handler.
@ -9,17 +9,18 @@ To use the plug-in include the following in your `Build.kt` file:
```kotlin ```kotlin
import net.thauvin.erik.kobalt.plugin.maven.local.* import net.thauvin.erik.kobalt.plugin.maven.local.*
val repos = repos(localMaven())
val pl = plugins("net.thauvin.erik:kobalt-maven-local:") val pl = plugins("net.thauvin.erik:kobalt-maven-local:")
val p = project { val p = project {
name = "example" name = "example"
} }
``` ```
[View Example](https://github.com/ethauvin/kobalt-maven-local/blob/master/example/kobalt/src/Build.kt)
The `localMaven()` directive will add the location of the Maven Local Repository to Kobalt's repositories list. Use the `lovalMaven()` directive to tell Kobalt to look for artifacts in the Maven Local Repository:
```kotlin
val repos = repos(localMaven())
```
To publish to the Maven Local Repository use the `publishToMavenLocal` task: To publish to the Maven Local Repository use the `publishToMavenLocal` task:
@ -27,6 +28,8 @@ To publish to the Maven Local Repository use the `publishToMavenLocal` task:
./kobaltw publishToMavenLocal ./kobaltw publishToMavenLocal
``` ```
[View Example](https://github.com/ethauvin/kobalt-maven-local/blob/master/example/kobalt/src/Build.kt)
## Locations ## Locations
The plug-in looks for the Maven Local Repository in the following locations: The plug-in looks for the Maven Local Repository in the following locations:

View file

@ -6,8 +6,8 @@ import net.thauvin.erik.kobalt.plugin.maven.local.*
val repos = repos(localMaven()) val repos = repos(localMaven())
val pl = plugins(file("../kobaltBuild/libs/kobalt-maven-local-0.4.0-beta.jar")) //val pl = plugins(file("../kobaltBuild/libs/kobalt-maven-local-0.5.0.jar"))
//val pl = plugins("net.thauvin.erik:kobalt-maven-local:0.4.0-beta") val pl = plugins("net.thauvin.erik:kobalt-maven-local:0.5.0")
val example = project { val example = project {

View file

@ -128,7 +128,7 @@
<KobaltProjectSettings> <KobaltProjectSettings>
<option name="autoDownloadKobalt" value="true" /> <option name="autoDownloadKobalt" value="true" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.862" /> <option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.867" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
@ -407,7 +407,7 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="kobalt.jar"> <library name="kobalt.jar">
<CLASSES> <CLASSES>
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.862/kobalt/wrapper/kobalt-0.862.jar!/" /> <root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.867/kobalt/wrapper/kobalt-0.867.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
@ -415,6 +415,8 @@
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.861/kobalt/wrapper/kobalt-0.861.jar!/" /> <root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.861/kobalt/wrapper/kobalt-0.861.jar!/" />
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.861/kobalt/wrapper/kobalt-0.861.jar!/" /> <root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.861/kobalt/wrapper/kobalt-0.861.jar!/" />
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.862/kobalt/wrapper/kobalt-0.862.jar!/" /> <root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.862/kobalt/wrapper/kobalt-0.862.jar!/" />
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.867/kobalt/wrapper/kobalt-0.867.jar!/" />
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.867/kobalt/wrapper/kobalt-0.867.jar!/" />
</SOURCES> </SOURCES>
</library> </library>
</component> </component>

View file

@ -17,7 +17,7 @@ val p = project {
name = "kobalt-maven-local" name = "kobalt-maven-local"
group = "net.thauvin.erik" group = "net.thauvin.erik"
artifactId = name artifactId = name
version = "0.4.0-beta" version = "0.5.0"
pom = Model().apply { pom = Model().apply {
description = "Maven Local Repository plug-in for the Kobalt build system." description = "Maven Local Repository plug-in for the Kobalt build system."