How can I add an additional user to publish snaphots to sonatype? - snapshot

I have an account at sonatype.org where I can publish snapshots of our Maven project. What I would like to do is to give another sonatype user write access as well, so that he can publish the snapshots also. I have searched the sonatype manuals but found nothing about this.
Thanks and regards
Hans

File a request at https:/issues.sonatype.org in the "community support - open source hosting project".

Related

Azure Artifacts - Downloading Maven package content throws azure UnhandledPromiserejectionWarning

One of our development teams have recently migrated their Maven project files from another version control system to Azure DevOps. However, a major caveat is that these Maven projects were created with no POM files (I have no idea why).
The project team have in any case managed to move all of their Maven packages into Azure Artifacts. When a release pipeline job is then run, it is then expected to retrieve the desired artifacts (*.war files) from Azure Artifacts, download to the agent's artifacts directory and subsequently deploy to the target server. The pipeline itself is completed successfully (all tasks set to green status), however when we review the output log, we discover that the artifacts were never downloaded and instead, the download task returns an "UnhandledPromiserejectionWarning". Any idea why this is happening?
So far, we've tried using CURL as an alternative to download the artifacts, but all has been in vain. Naturally, we've also tried and failed with the Azure Artifacts' dedicated "Download Package" pipeline task, but are willing to try an alternative solution, if anyone has some kind suggestions. Been wondering something like Powershell (or other script) can for instance be used to download the desired package files.
I must also mention that the CURL option only appears to fail over a failed OAuth authentication. Any advice on that front will also be helpful, as it is probably our quickest route to a workaround.
I had a similar issue, it turns out the problem was just the capital case.
The DownloadPackage task was trying to download 0.0.30-SNAPSHOT, but instead you can only download the package as 0.0.30-snapshot, as it states on the microsoft official docs.
In order to fix it, I had to install an external plugin, then add an additional task before download, that task was converting the name to lower case.
I was using the classical release pipeline, btw.

TFS 2015 Publishing build artifacts using file share option failed

I wanted to created a demo app that does automatic deployment. In other words once I check-in my code changes, the changes can be seen on the published website. I did the following steps:
I created an .NET project on Visual Studio 2017, published the project with IIS instructions from here and here. I published my project to a local file on my machine;
The I did Continuous Delivery and Release Management using TFS 2015 and created a build and release definitions from here;
The final step was to use the Copy File to and Publish Artifacts tasks, using file share option to drop the contents to the publish folder I've created. So when I check-in my changes using TFS, the changes will be seen online.
Here is the configuration for the build definition:
The folder in the file share path is shared to everyone, and the path is correct (when I type it in the browser, I can see the folder's contents).
The error I keep getting is the following:
Publishing build artifacts failed with an error: Unable to create
directory '{p}'. Unable to verify the directory exists: '{testDir}'.
If directory is a file share, please verify the share name is correct,
the share is online, and the current process has permission to access
the share. \localhost\builddrop\drop \localhost\builddrop\drop
I've been trying to solve this for 2 days with no luck, but I could not find similar issues... I would like to know what is causing this error, or if you have any hints or tips that will get me closer to the solution.
Thanks to #Maxsur answer I realized that I did not install a build agent, which is needed for in case you want to publish your code into a file share.
I did that by going to the team foundation server web portal clicked on the gear sign, and chose Agent Queues and followed the steps. Additionally you will also need to acquire a token by clicking on your profile icon then choosing security and add new token.
Reference: https://learn.microsoft.com/en-us/vsts/pipelines/agents/v2-windows?view=vsts
Try to check (and change) an account for your build agent service.
It can be found at Windows Services -> VSTS Agent on build machine (or TFS server if it used as build machine).
This service can run under "local service" account, which cannot access network shares (even on local machine!).
Try to change this account to Administrator (for example) or setup one by guidelines of MSDN
In your Publish Artifacts Task, you've specified //localhost/builddrop/ in File share path, which is not correct. You need to specify the File share path as below:
\\servername\builddrop

Does Artifactory offer similar feature that the procurement suite in Sonatype Nexus Pro does?

I am researching the pros/cons of Artifactory and Nexus.
There is a feature in Nexus that I like very much -- the procurement suite. It provides GUI to define the procurement rule. After the procured repository is populated with all the artifacts needed for the build, the admin can choose to stop the procurement and the procured repository is reverted back to be a local repository. As I understand, Artifactory provides includes/excludes pattern definition in the remote repository to achieve similar control, but it is far more rudimentary than what Nexus offers. I am not an expert on Artifactory. Does Artifactory offers something more advanced to tight control the artifacts used in the build, like the procurement suite does?
BTW, I like Artifactory's Watch feature, sending email when a add/delete/update happens in a watched repository. Nexus does not offer email notification, though it provides RSS feed. Artifactory does not support RSS feed now, but it says this feature is in development. Sometimes I just wish there is one product that can offer all these features combined. :-)
Ok. The JFrog folks gave me the official answer and would like to share with everyone. Theincludes/excludes pattern I mentioned in my original question is the main mechanism Artifactory uses to control the access the artifacts in the build. Besides that, Artifactory also offers something called License Control Addon in their Pro version. It basically allows you to manage and get alerted for unauthorized licenses of 3rd party libraries and dependencies when they are getting deployed from your CI server. It does not directly apply to my use case, but it is good to know. Also they pointed out that as a user, I can use their User plugin API to do whatever I want. That's also good to know, but at least for now, I am not interested in developing a plugin for Artifactory myself.
It's been a while since I used artifactory, but I think when you configure a repo, you have the option on applying a regex to the artifacts that it will pull. That might do what you need/want.

How to configure nexus maintenance tasks?

This SO answer has some nice tips about maintaining an internal maven repository, but it's rather vague on the details.
In particular, the answer says
Configure Nexus to do the following for internal repos
Delete old Snapshots on regular intervals
Delete Snapshots on release
But I haven't figured out how to do that. Where in nexus configuration can I make these changes?
That's described in the Nexus book, "Managing Scheduled Tasks".
Unfortunately it seems I cannot link directly to the description of the snapshot removal task. The section is called "Remove Snapshots from Repository".

Good Reference for Hudson/Maven/Mercurial Integration

Can anyone provide a good reference (web, book etc.) that explains how to set up Hudson to do builds/releases using Maven/Nexus and Mercurial? I would like to set up our system to do Maven builds in Hudson based on updates to our Mercurial SCM projects which are automatically deployed to our local Nexus server. Some of the project are dependent on others. I can find quite a few references that refer to one part of the equation, but haven't found anything that details all the pieces together.
TIA!!
EDIT
I think what I am looking for initially is more of a general overview of how to use these tools in an integrated manner. And then I can delve into the details. What I'm looking for is how to use Hudson to do/verify builds and based on the results, push the artifacts to the appropriate Maven/Nexus repository (snapshot or not) and also possibly deploy applications from Hudson as well to our pre-prod systems. The fact that I'm using Mercurial is incidental.
Hopefully that clarified and didn't muddy my question...
I don't know about the books, I did our integration by using Hudson help.
I think, though, that one area is totally not clear out of the box: providing your own version of settings.xml ( that's where you may set custom repository, profiles, etc )
Here are the steps:
Go to Hudson->Manage Hudson->Maven 3 Configuration
Under 'Documents' tab click 'Add'
Change 'Type' drop-down to 'SETTINGS'
Give it a meningful name ( e.g. my-custom-settings )
Cut and paste the WHOLE xml that you would usually put into $HOME/.m2/settings.xml
Hit 'Save' button at the bottom of the screen.
Now you are ready to setup Maven project
Create new job and tie it to your source control
Add 'Invoke Maven 3' build step
Click 'Advanced' button
In expanded list find 'Settings' drop down
Choose 'my-custom-settings'.
With custom settings you can provide deploy credentials, custom profiles, etc.
I really wish Hudson team would have provided similar instructions in their help for Maven build step, instead of links to 'Settings Reference' at maven.apache.org website.
As for mercurial integration, quick search returned this article -> http://www.ashlux.com/wordpress/2010/06/16/triggering-hudson-builds-with-mercurial-hooks/
I am not mercurial expert, but the article is consistent with the setup we used for our SCM integration.
I wrote a blog which talks about setting up project using Jenkins and maven, If i am right Jenkins is a spin off from Hudson. Try it out it might help
http://prasannatalakanti.blogspot.com/2011/08/continuous-integration-using-open.html

Resources