We have are getting started using Nexus OSS. Our organization is really small - one developer behind our firewall and one that works mostly remote. The first item we need to do is host our snapshot and release artifacts. We have the basic setup working but have decided, at least for now, we really don't need or want to cache public repositories. With two developers the bandwidth and caching issues are just not important to us (yet). And we don't really want to complicate our developer ~/.m2/settings.xml files any more than necessary. I've gotten snapshot and release deploy working fine. But not it looks like our requests for artifacts from Central and other public repositories are proxying through our release repository.
-- Richard Mixon Custom Computer Creations, L.L.C. mobile: (480) 577-6834 office: (480) 614-3442 email: [hidden email] <mailto:[hidden email]> Microsoft Partner ID: 1263725 The messages and documents transmitted with this notice contain confidential information belonging to the sender. If you are not the intended recipient of this information, you are hereby notified that any disclosure, copying, distribution or use of the information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately. |
Hi Richard, Because in my experience there are only upsides. You never have to change your settings.xml, you get faster builds, and if you find you need to get dependencies from another repository than central you can add it in seamlessly. See here for our recommended setup: If you're really determined to do this you'll need to have multiple repositories in your settings.xml. See these resources for details on how to set this up: Basically, you either have no mirrorOf section, or you have one that mirrors to nexus for everything but central. But I think you'll find that Maven is not as efficient at dealing with multiple repositories as Nexus is. And I'm sure you'll find the multiple repository setup much harder to maintain in Maven than it is in Nexus. Regards, Rich On Jan 9, 2014, at 3:42 PM, Richard Mixon <[hidden email]> wrote:
|
Rich, My take was exactly as yours - what could the downside be. The rub came down to two reasons:
Six months from now, our answer may be different, but for now we want to keep it a bit simpler (hopefully). I took a quick look at the references you mentioned. I can see how using the advanced mirror configuration you end up with two logical repositories one for "com.acme" and the other for everything else. Looking at the Maven settings I don't see a way to say that everything that is not group id "com.acmeinc" does not go to a particular location. Or am I just not seeing it? Thanks - Richard On Thu, Jan 9, 2014 at 3:27 PM, Richard Seddon <[hidden email]> wrote:
-- Richard Mixon Custom Computer Creations, L.L.C. mobile: (480) 577-6834 office: (480) 614-3442 email: [hidden email] <mailto:[hidden email]> Microsoft Partner ID: 1263725 The messages and documents transmitted with this notice contain confidential information belonging to the sender. If you are not the intended recipient of this information, you are hereby notified that any disclosure, copying, distribution or use of the information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately. |
Well, we'll have to disagree about point #2, I think it's so easy to get a Nexus instance up that off site developers should go ahead and do it, and create a proxy repo to your Nexus instance. :-) Anyhow, as for point #1, sure, if he needs a repository before you can get it into your nexus instance then changing the settings.xml provides a workaround. So you can do this: <mirror> <id>nexus</id> <mirrorOf>external:*,!foo</mirrorOf> </mirror> And then in the repositories section have: <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <repository> <id>foo</id> <url>http://some.new.repository</url> <releases> <enabled>true</enabled> </releases> </repository> This will provide a temporary workaround for the situation you've described. If snapshots are needed from it you'll need to enable those in the new repository definition. Rich On Jan 9, 2014, at 4:52 PM, Richard Mixon <[hidden email]> wrote:
|
Richard, Thank's great - I see how that can work. The changes to the settings.xml don't look that hard.Still, after thinking a bit I wonder if something like this might be simpler in our situation, in that it requires a bit less settings.xml configuration: 3. Add the following "<activeProfiles>" at the bottom of the settings.xml: <activeProfiles> <!-- Update the activeProfile tag to be either: behindFirewallWithNexus outsideFirewallWithNexus defaultMavenSettings --> <activeProfile>behindFirewallWithNexus</activeProfile> 5. In a short-term emergency where you need to access a new external repository, you just change the "<activeProfile>" tag to point to the default settings which know nothing about the Nexus server. It will prevent you from getting updated internal release or snapshot artifacts for the time being, but I'm thinking that will not be much of an issue.</activeProfiles> 4. Under "normal circumstances, depending on if you are in the office or out of the office you update a single "<activeProfile>" tag in settings.xml to choose the appropriate *FirewallWithNexus profile. On Thu, Jan 9, 2014 at 4:06 PM, Richard Seddon <[hidden email]> wrote:
-- Richard Mixon Custom Computer Creations, L.L.C. mobile: (480) 577-6834 office: (480) 614-3442 email: [hidden email] <mailto:[hidden email]> Microsoft Partner ID: 1263725 The messages and documents transmitted with this notice contain confidential information belonging to the sender. If you are not the intended recipient of this information, you are hereby notified that any disclosure, copying, distribution or use of the information is strictly prohibited. If you have received this transmission in error, please notify the sender immediately. |
Free forum by Nabble | Edit this page |