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") }