More README.
This commit is contained in:
parent
15d5301f07
commit
d231a4d006
1 changed files with 61 additions and 1 deletions
62
README.md
62
README.md
|
@ -2,4 +2,64 @@
|
||||||
|
|
||||||
[](http://opensource.org/licenses/BSD-3-Clause) [](https://travis-ci.org/ethauvin/kobalt-maven-local)
|
[](http://opensource.org/licenses/BSD-3-Clause) [](https://travis-ci.org/ethauvin/kobalt-maven-local)
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
To use the plug-in include the following in your `Build.kt` file:
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
import net.thauvin.erik.kobalt.plugin.maven.local.*
|
||||||
|
|
||||||
|
val repos = repos(localMaven())
|
||||||
|
|
||||||
|
val pl = plugins("net.thauvin.erik:kobalt-maven-local:")
|
||||||
|
|
||||||
|
val p = project {
|
||||||
|
name = "example"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
[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.
|
||||||
|
|
||||||
|
To publish to the Maven Local Repository use the `publishToMavenLocal` task:
|
||||||
|
|
||||||
|
```
|
||||||
|
./kobaltw publishToMavenLocal
|
||||||
|
```
|
||||||
|
|
||||||
|
### Locations
|
||||||
|
|
||||||
|
The plug-in looks for the Maven Local Repository in the following locations:
|
||||||
|
|
||||||
|
## `maven.repo.local`
|
||||||
|
|
||||||
|
Either as a system property or in the project's `local.properties` file.
|
||||||
|
|
||||||
|
To set the system property use:
|
||||||
|
|
||||||
|
```
|
||||||
|
./kobaltw -Dmaven.repo.local=~/foo/repository ...
|
||||||
|
```
|
||||||
|
|
||||||
|
or in `local.properties` add:
|
||||||
|
|
||||||
|
```
|
||||||
|
maven.repo.local=~/foo/repository
|
||||||
|
```
|
||||||
|
|
||||||
|
## `~/.m2/settings.xml`
|
||||||
|
|
||||||
|
If `<localRepository>` is set:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<localRepository>~/foo/repository</localRepository>
|
||||||
|
```
|
||||||
|
|
||||||
|
## `$M2_HOME/conf/settings.xml`
|
||||||
|
|
||||||
|
If the `$M2_HOME` environment variable and `<localRepository>` are set.
|
||||||
|
|
||||||
|
## `~/.m2/repository`
|
||||||
|
|
||||||
|
If the directory exists.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue