File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
sbt-codeartifact/src/main/scala/codeartifact Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ trait CodeArtifactKeys {
2020
2121 val codeArtifactResolvers : SettingKey [List [String ]] =
2222 settingKey[List [String ]](" Additional CodeArtifact repos from which to consume packages." )
23+
24+ val codeArtifactGetTokenInstructions =
25+ settingKey[Option [String ]](" Instructions on how to get a token for CodeArtifact" )
2326}
2427
2528trait InternalCodeArtifactKeys {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ object CodeArtifactPlugin extends AutoPlugin {
1818
1919 def buildPublishSettings : Seq [Setting [_]] = Seq (
2020 ThisBuild / codeArtifactUrl := " " ,
21+ ThisBuild / codeArtifactGetTokenInstructions := None ,
2122 ThisBuild / codeArtifactResolvers := Nil
2223 )
2324
@@ -43,7 +44,20 @@ object CodeArtifactPlugin extends AutoPlugin {
4344 ),
4445 credentials ++= {
4546 val token = codeArtifactToken.value.getOrElse {
46- streams.value.log.warn(" Unable to get AWS CodeArtifact auth token." )
47+ streams.value.log.warn(
48+ """
49+ | ___ ______ ____ _ _ _ _ __ _
50+ | / \ \ / / ___| / ___|___ __| | ___ / \ _ __| |_(_)/ _| __ _ ___| |_
51+ | / _ \ \ /\ / /\___ \ | | / _ \ / _` |/ _ \ / _ \ | '__| __| | |_ / _` |/ __| __|
52+ | / ___ \ V V / ___) | | |__| (_) | (_| | __// ___ \| | | |_| | _| (_| | (__| |_
53+ |/_/ \_\_/\_/ |____/ \____\___/ \__,_|\___/_/ \_\_| \__|_|_| \__,_|\___|\__|
54+ |
55+ |
56+ |The AWS CodeArtifact sbt plugin was not able to get a valid auth token. If you recieve and error due to
57+ |the a dependency not being found then it could be caused by this.""" .stripMargin
58+ )
59+ val instructions = codeArtifactGetTokenInstructions.value.map(" \n " + _ + " \n " ).getOrElse(" " )
60+ streams.value.log.warn(instructions)
4761 " "
4862 }
4963 val repos = codeArtifactRepo.value +: codeArtifactResolvers.value
You can’t perform that action at this time.
0 commit comments