File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,26 @@ lazy val defaults = Seq(
74
74
if (version.value endsWith " -SNAPSHOT" ) Some (" snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" )
75
75
else Some (" releases" at " https://oss.sonatype.org/service/local/staging/deploy/maven2" )
76
76
},
77
+ // This should no longer be necessary once we update to sbt-ci-release
78
+ // https://github.com/lightbend/genjavadoc/issues/203
79
+ credentials ++= {
80
+ val alreadyContainsSonatypeCredentials = credentials.value.collect {
81
+ case d : DirectCredentials => d.host == " oss.sonatype.org"
82
+ }.nonEmpty
83
+ if (! alreadyContainsSonatypeCredentials) {
84
+ val env = sys.env.get(_)
85
+ (for {
86
+ username <- env(" SONATYPE_USERNAME" )
87
+ password <- env(" SONATYPE_PASSWORD" )
88
+ } yield
89
+ Credentials (
90
+ " Sonatype Nexus Repository Manager" ,
91
+ " oss.sonatype.org" ,
92
+ username,
93
+ password
94
+ )).toSeq
95
+ } else Seq .empty
96
+ },
77
97
startYear := Some (2012 ),
78
98
homepage := Some (url(" https://github.com/lightbend/genjavadoc" )),
79
99
licenses := Seq (" Apache-2.0" -> url(" http://opensource.org/licenses/Apache-2.0" )),
You can’t perform that action at this time.
0 commit comments