Skip to content

Commit

Permalink
add credentials only if they exist, prevents warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lrytz committed May 28, 2015
1 parent 894fc14 commit 1115c3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/ScalaModulePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ object ScalaModulePlugin extends Plugin {
if (version.value.trim.endsWith("SNAPSHOT")) Resolver.sonatypeRepo("snapshots")
else Opts.resolver.sonatypeStaging
),
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
credentials ++= {
val file = Path.userHome / ".ivy2" / ".credentials"
if (file.exists) List(file) else Nil
},

publishMavenStyle := true,
scmInfo := Some(ScmInfo(url(s"https://github.com/scala/${repoName.value}"),s"scm:git:git://github.com/scala/${repoName.value}.git")),
Expand Down

0 comments on commit 1115c3d

Please sign in to comment.