From ceceac34d78fc836b6f2bbe837c2052361c3347f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 21 Jul 2016 20:12:13 -0700 Subject: [PATCH] Added example local repository. --- example/m2/repository/.gitignore | 4 ++++ .../erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 example/m2/repository/.gitignore diff --git a/example/m2/repository/.gitignore b/example/m2/repository/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/example/m2/repository/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt index d765d2e..3e84b9b 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/maven/local/MavenLocalPlugin.kt @@ -76,7 +76,7 @@ public class MavenLocalPlugin : BasePlugin(), ILocalMavenRepoPathInterceptor { settings.userSettingsFile = File(userHome, ".m2/settings.xml") val m2Home = System.getenv("M2_HOME") - if (m2Home != null) { + if (!m2Home.isNullOrBlank()) { settings.globalSettingsFile = File(m2Home, "conf/settings.xml") }