How to develop Nexus 3 repository plugin? - nexus

In my team, we want to create our own Nexus plugin (for Nexus 3) to prevent or allow some packages to be downloaded based on our own custom rules.
I know about such a solution as Nexus Firewall, but we can not use it, since it is not free.
I have tried to find documentation or a guide on how to make your own plugin but was not able to find any decent resources.
Links I found:
Nexus development guide (To be honest not that good guide)
The same question to sonotype team (but about nexus2)
Snyk plugin - great example but no way a strict documentation
It would be really helpful if anyone can give any advice on where to start first or provide any helpful links to use.

Related

Does Nexus Repository Manager support "Used By" queries?

I need to search for all artifacts among my projects that require a particular dependency. Mvnrepository.com has such a feature, so I checked whether Nexus Repository Manager supported it as well.
I did not find any such feature, so I decided to come ask here, seeing as I usually don't do well with Nexus documentation or interface.
Does it support it?
I'll ask whether there are other tools that might do so in a separate question.

Configuration of Nexus private repository

I'm starting to work to a new project and I'm evaluating the use of Nexus to manage the artifacts. What I need is a private repository that allow me to store on a private server my artifacts and at the same time to store, let's say on the same server, the artifact that are dependencies for my project.
I saw that there are 3 different type of repository available in nexus, and two of them (Hoisted and Proxy) has properties that I need, as I can evaluate from this documentation.
Can someone give me more detailed informations about the correct configuration of my repository to achieve the goals I described before?
Thanks in advance
If you have home grown artifacts as well as pull open source dependancies from the internet, a common configuration suggested is a "hosted" repository for your own stuff, a "hosted" repository for 3rd party stuff (not written by you but not internet accessible) and at least one proxy repository to where you get your internet artifacts from, then put them all in a repository group for one URL to access all of them from.
This is shown for example here.
What Format type will depend on what your artifacts are. If Java then Maven, if nupkgs then NuGet etc. If you explore the Sonatype documentation more, you'll note that Nexus Repository 3 has support for types that Nexus Repository 2 doesn't. This is noteworthy because you just linked the Nexus Repository 2 docs, but it might not even be the right choice for you.
You can't mix and match groups with formats, so if you use (for example) both Maven and NuGet you'd need two groups.
Not all formats are supported by NXRM either, so if you have ones we don't support, you can look for a ticket suggesting implementation and watch and guide any acceptance in the Sonatype NEXUS project of JIRA (https://issues.sonatype.org/projects/NEXUS/).
The Sonatype user group or community website are likely better places for general questions of this nature and also good for specific questions about problems you are having before filing a bug ticket in the JIRA.
The configuration I used is those described in this link: it's similar to those described by joedragons in the answer above.
While I'm working in java, I used three pre-defined repository provided with the nexus installation: the one pointing to maven central and two others for my snapshots and releases. I grouped them under a group.
Quite simple, but I think it will be sufficient to cover my needs.

Nexus support for api.typings.org

I'm trying to set up a Jenkins CI environment which is behind a corporate firewall and is also using Nexus to proxy repositories. Changing the firewall settings is not an option, but Nexus is able to bypass the firewall so I need to set up Nexus to be able to pull in type definition files. Is that possible?
A Google search turns up very little, besides this support ticket which hasn't been answered.
Is it at all possible to add typings support to Nexus?
typings is not on our roadmap yet, but as you can see someone has expressed interest. Feel free to pop in to that ticket and let your voice be heard, we use those to get a bit of a gauge to how many of our users are looking for a specific format.

Which open source forges for bzr/bazaar?

I'm looking for an open source forge that we can host in our lab for some private projetcs. Our favorite DVCS is bzr so this forge must support bzr repositories.
While Launchpad is open source, this forge does not seem to be admin-friendly for hosting a private clone (no support, no migration script for database schema modifications, etc).
Are you aware of any good alternative ?
Thanks !
Edit:
We are now using git for our projects, and rhodecode to manage central repositories.
You can use Redmine or Trac (required trac-bzr plugin) installations to host your private projects.
Where I work they started to use Gforge AS a couple of years ago. Since I love Bazaar I made a bzr plugin for gforge. It was not 100% complete but was functional enough to use - it is still in use where I work.
On looking this up for you, I saw Fusion Forge which might be easier to get going, it is a fork of the free Gforge with built in support for bazaar.
There is a new one: sloecode. It is still a rather young project. Several plugins are still missing, like a bug tracker and a wiki, but those features are planned. It's worth looking at it for small private branches.
http://how-bazaar.blogspot.com/2011/03/announcing-sloecode.html
https://launchpad.net/sloecode
Savannah uses many VC systems, including Bazaar. I'm not sure what you mean by "admin-friendly" but it's been quite friendly to me. I also have a project on Launchpad.

What is a good method for sharing source code among 3-4 developers that does NOT require it to be Open Source?

I'm a newbie developers and building an application with 3 other remote developers. I've only worked alone until now, and now I need a way to share my source code with the other developers on the project. All of the project sites out there (SourceForge, Codeplex, Google, etc) seem to be aimed at Open Source development I'm not interested in making our code available to the world, I'm just looking for a method of sharing the code among the four of us. What is the best known method...or how is this usually accomplished?
Set up a Subversion repository (can be accessed across http).
There is an excellent online free book detailing pretty much everything you need to know about Version Control with Subversion
Yep, you need a version control repository which is remotely accessible. Subversion is excellent and very widely used; Git is another good option.
You could set up your own repository - you'll need a server which all devs can access via ssh, or via Apache/WebDAV - or use a hosted service, like Beanstalk, Project Locker, Unfuddle, SVNsite, etc.
http://beanstalkapp.com/
Set up a Subvserion repository (http://subversion.tigris.org/). You can control who may view your data through accounts, plus it gives you document versioning. When paired with a Http server, you can even view the source directly in a browser.
Subversion has all sorts of plugins for Eclipse and even Visual Studio, I believe. Tortise SVN is a stand-alone SVN client you may like, although I recommend an IDE-integrated plugin.
Subversion also goes well with a continuous integration server, such as Continuum.
Hosted: http://wush.net is another Subversion hosting platform.
Or, if you can host your own server, check out the VERY easy to use and VERY free VisualSVN Server: http://www.visualsvn.com/server/
You don't say what computing resources you have available, but the easy choice is to use a central server with say SVN to which you all have ssh access using a public key. You can probably rent such a service for around $10 per month.
If you don't like central servers, you can try Mercurial or git and ssh back and forth between your personal development machines.
If ssh is problematic, git actually enables you to send patches to each other by email (probably Mercurial does too). Ben Lynn's Git Magic tutorial explains.
You can use an online source control (like SVN or Git), and share it only with your team members. You should look into Unfuddle, it's a free source control/project hosting, complete with bug tracking system. I use it for my personal projects and it's awesome.
I think the best solution is Subversion. Subversion is a free source control system that is ideal for your requirement.
You can use many other support tools like Tortoise SVN to make the things more easier.
Here is one of the cheat sheets that describes commands of SVN.
Most of the Web hosting providers support easy one click installation of SVN on their servers. ex : Dreamhost So you can get a setup done very easily.
CVS is another Source control system that are used widely but I haven't seen any providers that support easy installation of CVS but there should be. You can have support tools for CVS such as Tortoise CVS as well.
I don't think you are interested in visual source safe (Microsoft Proprietary and not over Web) so I am not going to add information about it here. :)
You need to set up a source control repository. It's a pretty big topic, I'm really not sure where the best place to start reading about it would be. I'm sure the Wikipedia article on Revision Control will at least give you a bit of an overview.
This seems like a decent introductory series as well: Source Control HOWTO
Subversion works just fine over http/https. It is an open source project, but you can use it for whatever purposes you want.
http://subversion.tigris.org/
Most modern source control systems work well. Subversion is a common one. Which operating system will the developers be running?
If you just want to get up and running quickly with something, check out a hosted subversion system like www.beanstalk.com or www.unfuddle.com.
Subversion is open source, and I know you don't need it, but there are a lot of options here. If on Windows, check out Tortoise SVN. If on a Mac and you don't want a command line client, check out Versions.
You can actually setup google code to only allow viewing/editing by registered members. And I don't think they force any licenses either.
We currently use VSS but are in the process of migrating everything over to Source Gear Vault because VSS makes jumping out of our third story windows a common thought...
Here is a free solution with premium options available... https://freepository.com I have not tried this one.
Try github. It will cost you $12/month though.
Just use devunity.com. upload your code via zip or import it from svn and thats it. lets you collaborate around code instantly.

Resources