janhoy commented on a change in pull request #359:
URL: https://github.com/apache/lucene/pull/359#discussion_r723921857



##########
File path: gradle/publishing/defaults-maven.gradle
##########
@@ -80,6 +81,20 @@ configure(subprojects.findAll { it.path in 
rootProject.published }) { prj ->
           }
         }
       }
+
+      maven {
+        name = "ApacheReleases"
+        url = apacheNexusReleases
+
+        credentials {
+          def nexusUserName = 
rootProject.propertyOrDefault('asfNexusUsername', null)

Review comment:
       How will we pass username to the build? `gradlew 
-PasfNexusUsername=janhoy -PasfNexusPassword=foo`? I suppose it is the RM's ASF 
credentials that will be used?

##########
File path: gradle/publishing/defaults-maven.gradle
##########
@@ -58,6 +58,7 @@ configure(rootProject) {
     ]
 
     apacheNexusSnapshots = 
"https://repository.apache.org/content/repositories/snapshots";
+    apacheNexusReleases = 
"https://repository.apache.org/service/local/staging/deploy/maven2";

Review comment:
       This was parameterized in the ant build with `-Dm2.maven.repository.url` 
or something along those lines, but that was probably a requirement of that 
plugin. I think it is better to have that URL here in gradle config than in 
releaseWizard.

##########
File path: lucene/packaging/build.gradle
##########
@@ -204,13 +220,15 @@ task assembleSourceDist() {
                     "archive",

Review comment:
       There are more options to `archive` to e.g. exclude certain files etc. 
Should we consider excluding `.github` and perhaps some other files that are 
not related to the source or build?

##########
File path: gradle/publishing/defaults-maven.gradle
##########
@@ -80,6 +81,20 @@ configure(subprojects.findAll { it.path in 
rootProject.published }) { prj ->
           }
         }
       }
+
+      maven {
+        name = "ApacheReleases"
+        url = apacheNexusReleases
+
+        credentials {
+          def nexusUserName = 
rootProject.propertyOrDefault('asfNexusUsername', null)

Review comment:
       I just tried and was able to login to https://repository.apache.org/ 
using my normal ASF credentials. I did not try the publish task, but I guess it 
should be the same? I don't remember from being RM if you get prompted for your 
ASF username and password when running the ant task for publishing maven 
artifacts.

##########
File path: lucene/packaging/build.gradle
##########
@@ -204,13 +220,15 @@ task assembleSourceDist() {
                     "archive",

Review comment:
       Fair enough. Who even use the source download anyway - they use git :) 

##########
File path: gradle/publishing/defaults-maven.gradle
##########
@@ -80,6 +81,20 @@ configure(subprojects.findAll { it.path in 
rootProject.published }) { prj ->
           }
         }
       }
+
+      maven {
+        name = "ApacheReleases"
+        url = apacheNexusReleases
+
+        credentials {
+          def nexusUserName = 
rootProject.propertyOrDefault('asfNexusUsername', null)

Review comment:
       Ant build is calling a perl script 
(https://github.com/apache/lucene-solr/blob/branch_8_10/lucene/common-build.xml#L1900:L1909)
 to generate some new ant config, and that includes some `<input>` tags 
prompting for username and password. The releaseWizard says `commands_text: In 
the source checkout do the following (note that this step will prompt you for 
your Apache LDAP credentials)` so these should be the normal creds.
   
   Are you perhaps getting the repository id wrong? 
`-Dm2.repository.id=apache.releases.https`?
   PS: I don't have the chance to test this today I'm afraid.

##########
File path: gradle/publishing/defaults-maven.gradle
##########
@@ -80,6 +81,20 @@ configure(subprojects.findAll { it.path in 
rootProject.published }) { prj ->
           }
         }
       }
+
+      maven {
+        name = "ApacheReleases"
+        url = apacheNexusReleases
+
+        credentials {
+          def nexusUserName = 
rootProject.propertyOrDefault('asfNexusUsername', null)

Review comment:
       > Is this a special kind of permission? I tried the above and it seems I 
should be able to do a release (as a project/ pmc member) yet I get HTTP 400. 
Can you try with your credentials and see what happens?
   
   Are you getting a 400 or a 401? 400 means bad request...




-- 
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: issues-unsubscr...@lucene.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to