Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.0-ALPHA
-
None
-
New
Description
Once upon a time, snapshots of the lucene trunk went into the snapshot repo at repositories.apache.org. No longer. Instead, they just sit at:
https://builds.apache.org//job/Lucene-Solr-Maven-trunk/lastSuccessfulBuild/artifact/maven_artifacts/
Unfortunately, Jenkins makes a rather mediocre maven repo. the maven-wagon-plugin can't copy it and Nexus can't proxy it.
Attachments
Attachments
- LUCENE-3825-add-scm-to-poms-trunk.patch
- 36 kB
- Steven Rowe
Activity
On that issue, you said you would research using Jenkins credentials to upload to the Nexus snapshot repo, but you never did.
Or rather, you never reported on that issue that you did.
FYI, on lucene.zones.apache.org, where all of the Lucene/Solr Jenkins jobs run, /home/hudson/.m2/settings.xml does not exist (Jenkins jobs run under the hudson user account), so we can't depend on pre-existing Jenkins credentials.
This time for sure. https://issues.apache.org/jira/browse/INFRA-4496.
This time for sure. https://issues.apache.org/jira/browse/INFRA-4496.
Righteous to the max.
See INFRA-4497 for request to enable Nexus access for Lucene and Solr.
According to http://www.apache.org/dev/publishing-maven-artifacts.html#prepare-poms item #3, all POMs should have SCM sections.
I had previously thought that a single SCM section in the lucene-solr-grandparent POM would do the trick, but upon inspection of the output from mvn help:effective-pom, I can see that the grandparent POM's section doesn't properly interpolate ${module-directory} (since the property isn't defined in that POM), and the values inherited in other POMs are all wrong, because path steps are added with artifact names instead of directory names, in addition to ${module-directory} interpolation...
Anyway, this patch fixes the SCM definition problem for trunk POMs. I'll do the same for branch_3x too.
I didn't include SCM sections in the few aggregation-only POMs, since these are never deployed/released.
Committing shortly.
According to http://www.apache.org/dev/publishing-maven-artifacts.html#prepare-poms item #3, all POMs should have SCM sections.
Committed to trunk and branch_3x.
Is the result of this blocked on the jail break?
I don't know what you mean by jail break?
I'm waiting for someone to enable Nexus access for Lucene: INFRA-4497 - I had planned to hassle them after a week had gone by with no action (it's only been a day or two so far).
I was referring to Uwe's email about stopping all builds due to 1.6 versus 1.6 issues in the jail.
Not that it's especially my business, but how did the snapshots get pushed historically to nexus if you didn't have access to nexus?
I don't know - I was not involved with Lucene's Maven stuff, or with Hudson, at that time. Maybe others know?
I deployed all of Lucene's trunk artifacts to the Apache snapshot repository using my personal account.
However, I can't do any further deploys, apparently because Nexus doesn't like me. Here's what I asked on #asfinfra 15 minutes ago:
Hi, I'm working on publishing Lucene's and Solr's Maven snapshots to the Apache Snapshot repo. Brian Demers enabled o.a.lucene and o.a.solr in the Nexus repo (https://issues.apache.org/jira/browse/INFRA-4497), and I successfully uploaded Lucene snapshot artifacts for 4.0.0-SNAPSHOT using Maven Ant Tasks. I attempted to use an encrypted password in ~/.m2/settings.xml, but that failed, apparently because Maven Ant Tasks doesn't (yet) grok encrypted passwords (http://jira.codehaus.org/browse/MANTTASKS-177). So I switched back to a plaintext password, but now I'm getting 401 errors from Nexus when I try to deploy Solr snapshots, or to re-deploy the Lucene snapshots. I suspect Nexus has locked my account out (sarowe), but I'm not sure - can anybody here help?
No response yet.
In order to enable deploying to the Apache snapshot repository from Jenkins, I had to modify the m2-deploy macros to (implicitly) pull authentication from <server> configuration in ~/.m2/settings.xml (alternatively, Maven Ant Tasks will look for ~/.ant/settings.xml) - note that this replaces the explicit username/password strategy committed under SOLR-2634:
Index: lucene/common-build.xml =================================================================== --- lucene/common-build.xml (revision 1296611) +++ lucene/common-build.xml (working copy) @@ -354,9 +354,7 @@ <artifact:pom id="maven.project" file="@{pom.xml}"/> <artifact:deploy file="@{jar.file}"> <artifact-attachments/> - <remoteRepository url="${m2.repository.url}"> - <authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/> - </remoteRepository> + <remoteRepository id="${m2.repository.id}" url="${m2.repository.url}"/> <pom refid="maven.project"/> </artifact:deploy> </sequential> @@ -374,9 +372,7 @@ <artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-7"/> <artifact:pom id="maven.project" file="${maven.build.dir}/pom.xml" /> <artifact:deploy file="@{jar.file}"> - <remoteRepository url="${m2.repository.url}"> - <authentication username="${m2.repository.username}" privateKey="${m2.repository.private.key}" password="${m2.repository.password}"/> - </remoteRepository> + <remoteRepository id="${m2.repository.id}" url="${m2.repository.url}"/> <pom refid="maven.project"/> </artifact:deploy> </sequential>
Committing shortly.
the nexus log says, 'unable to authenticate sarowe'.
Yeah, the same credentials worked earlier, and now don't work.
I can log into lucene.zones.apache.org using these same credentials, and I assume Nexus and FreeBSD are pulling from the Apache LDAP DB.
So as I wrote to #asfinfra (see above), I'm thinking I've been locked out.
Lucene.Zones login is local only (i added you to passwd file). You should better check people.ao or SVN for credentials.
Turns out my LDAP account was locked for "excessive pw fails" - Joe Schaefer unlocked my account for me, and I am now in the process of deploying Solr trunk snapshot artifacts.
I'll do the same for branch_3x Lucene&Solr.
I am now in the process of deploying Solr trunk snapshot artifacts.
I'll do the same for branch_3x Lucene&Solr.
These are done.
I'll work on switching the Jenkins jobs now.
Lucene.Zones login is local only (i added you to passwd file). You should better check people.ao or SVN for credentials.
Okay, that makes sense. I knew it was the Apache LDAP server, and not specifically Nexus, when SVN logins failed when I tried to commit the patch listed above.
The Jenkins Maven trunk and branch_3x builds are now configured to deploy snapshot artifacts to the Apache snapshot repository, and both have successfully done so.
Not that it's especially my business, but how did the snapshots get pushed historically to nexus if you didn't have access to nexus?
I found the following comment on SOLR-586 that described the process by which Maven snapshots made it into the Apache snapshot repository: https://issues.apache.org/jira/browse/SOLR-586?focusedCommentId=12623985&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12623985.
Perhaps the last step is to now modify README.maven to point to https://repository.apache.org/content/repositories/snapshots/ instead of Jenkins? I would imagine a proper repo manager is a more suitable official location than Jenkins.
As an aside, do you know why SSL is mandatory to access nexus? I've found https repos to be very problematic for maven when the client needs to use an HTTP proxy such as is common in corporate environments. I'm not saying its impossible, but just tricky and took trying different things. If you don't know the answer, who/how should I inquire further?
Perhaps the last step is to now modify README.maven to point to https://repository.apache.org/content/repositories/snapshots/ instead of Jenkins?
Done - see r1296722 and r1296723.
As an aside, do you know why SSL is mandatory to access nexus? [...] If you don't know the answer, who/how should I inquire further?
Sorry, I don't know the answer to either question. I would start asking either on #asfinfra or infrastructure@apache.org, and they should be able to point you to the right person.
Hi Benson,
This looks like a duplicate of
SOLR-2634.On that issue, you said you would research using Jenkins credentials to upload to the Nexus snapshot repo, but you never did.