You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2023/01/26 11:26:56 UTC

[GitHub] [incubator-pekko] mdedetrich opened a new pull request, #129: Properly set sonatype repo settings for publishTo

mdedetrich opened a new pull request, #129:
URL: https://github.com/apache/incubator-pekko/pull/129

   So I figured out the what was causing the publishing issues, it turns out that since sbt-ci-release was added into pekko, it overrode the settings defined in https://github.com/apache/incubator-pekko/blob/main/project/Publish.scala#L25-L56.
   
   This is because sbt-ci-release depends on sbt-sonatype, which by default points to the OS sonatype public repo. This PR tries to set various sbt-sonatype settings so that sbt-ci-release ends up publishing to Apache's Nexus repo instead of sonatype, since they both use nexus it should theoretically work however if it doens't we may end up having to remove sbt-ci-release (because its hardcoded to use sbt-sonatype).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich merged pull request #129: Properly set sonatype repo settings for publishTo

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich merged PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on a diff in pull request #129: Properly set sonatype repo settings for publishTo

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129#discussion_r1087724082


##########
project/Publish.scala:
##########
@@ -16,18 +16,21 @@ package org.apache.pekko
 import sbt._
 import sbt.Keys._
 import com.lightbend.sbt.publishrsync.PublishRsyncPlugin.autoImport.publishRsyncHost
-import xerial.sbt.Sonatype.autoImport.sonatypeProfileName
+import xerial.sbt.Sonatype.autoImport._
 
 object Publish extends AutoPlugin {
 
   override def trigger = allRequirements
 
+  private val apacheBaseRepo = "repository.apache.org"
+  private val apacheRepo = s"https://$apacheBaseRepo/content/repositories"
+
   override lazy val projectSettings = Seq(
-    publishTo := Some(pekkoPublishTo.value),
     publishRsyncHost := "akkarepo@gustav.akka.io",
     credentials ++= apacheNexusCredentials,
     organizationName := "Apache Software Foundation",
     organizationHomepage := Some(url("https://www.apache.org")),
+    sonatypeCredentialHost := apacheBaseRepo,

Review Comment:
   This is the base repository which by default is `oss.sonatype.org` (and hence the reason why it was publishing to the wrong location before, the sbt-sonatype plugin sets `publishTo` to indirectly use `sonatypeCredentialHost` and other related sbt-sonatype settings).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] pjfanning commented on pull request #129: Properly set sonatype repo settings for publishTo

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129#issuecomment-1404943788

   In order to get timely CI results - would it be a good idea to change the Github workflows setup in this PR to enable the nexus publish on every commit to main branch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on a diff in pull request #129: Properly set sonatype repo settings for publishTo

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129#discussion_r1087724082


##########
project/Publish.scala:
##########
@@ -16,18 +16,21 @@ package org.apache.pekko
 import sbt._
 import sbt.Keys._
 import com.lightbend.sbt.publishrsync.PublishRsyncPlugin.autoImport.publishRsyncHost
-import xerial.sbt.Sonatype.autoImport.sonatypeProfileName
+import xerial.sbt.Sonatype.autoImport._
 
 object Publish extends AutoPlugin {
 
   override def trigger = allRequirements
 
+  private val apacheBaseRepo = "repository.apache.org"
+  private val apacheRepo = s"https://$apacheBaseRepo/content/repositories"
+
   override lazy val projectSettings = Seq(
-    publishTo := Some(pekkoPublishTo.value),
     publishRsyncHost := "akkarepo@gustav.akka.io",
     credentials ++= apacheNexusCredentials,
     organizationName := "Apache Software Foundation",
     organizationHomepage := Some(url("https://www.apache.org")),
+    sonatypeCredentialHost := apacheBaseRepo,

Review Comment:
   This is the base repository which by default is `oss.sonatype.org` (and hence the reason why it was publishing to the wrong location before, the sbt-sonatype plugin sets `publishTo` to indirectly use `sonatypeCredentialHost` and other related sonatype settings).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on pull request #129: Properly set sonatype repo settings for publishTo

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129#issuecomment-1404947350

   > In order to get timely CI results - would it be a good idea to change the Github workflows setup in this PR to enable the nexus publish on every commit to main branch?
   
   You can actually manually force a github action to run outside of a cron job, which is what I am doing to test my PR's. However in general I think there is broad agreement to publish snapshots after a commit to main, will be done in a future PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


[GitHub] [incubator-pekko] mdedetrich commented on a diff in pull request #129: Properly set sonatype repo settings for publishTo

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #129:
URL: https://github.com/apache/incubator-pekko/pull/129#discussion_r1087725028


##########
project/Publish.scala:
##########
@@ -39,13 +42,6 @@ object Publish extends AutoPlugin {
     publishMavenStyle := true,
     pomIncludeRepository := (_ => false))
 
-  private def pekkoPublishTo = Def.setting {

Review Comment:
   This is not needed anymore because sbt-sonatype handles this automatically behind the scenes. Hopefully Apache's Nexus behaves in the exact same way as OS sonatype with only a different host, in which case we can use sbt-ci-release.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org