Re: [DISCUSS] Project local setting.xml
Paul Gier wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. While the patch [2] does not do that per say, you can accomplish it by putting the maven home in the project's SCM, and then make the repo relative to either the pom or maven home. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. I think this is addressed by putting the maven home in the SCM. It is a relatively small overhead for the benefit. [1] http://jira.codehaus.org/browse/MNG-4686 [2] http://jira.codehaus.org/browse/MNG-5167 -- View this message in context: http://maven.40175.n5.nabble.com/DISCUSS-Project-local-setting-xml-tp4656128p4739684.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
Am 01.08.2011 22:09, schrieb Benson Margulies: I have several alternative design ideas. 0) If you religiously use a repository manager and mirrorOf *, you can prevent this rogues from bothering you. Hi, we do this and still have the need to use a settings.xml, for two reasons: - at work, different teams use different repository managers as mirror. On our CI server, we thus need to use our own settings.xml. - at home, I have a project which I want to build using both a local/private CI server and a public one, but they all use different repo managers as mirror *Nevertheless* I already do use project-specific settings.xml from SCM, in exactly this context. It's as easy as: - check in your settings.xml - run mvn -s settings.xml goals in checkout directory You could even split the settings.xml files into a different SCM repository and create one branch each for different environments, referring to the mirrors which should be active in this environment. Our CI server software can check out multiple SCM roots per build configuration, so we could checkout settings.xml (internal) + main code base on the internal CI server, plus settings.xml (public) + main code base on the public CI server. I don't strictly see the need to add auto-search functionality of settings.xml to Maven for this to work, the existing -s switch suffices at least for my use case. I can't see why this should not suffice for the use case of the OP. Best regards Ansgar - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
[DISCUSS] Project local setting.xml
I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleint mkle...@gmail.com À : Maven Developers List dev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
Using a project local settings allows you to use the repo during build, but still have a clean pom in the repo when you release. We've experienced a lot of problems related to repos in the poms. On 08/01/2011 02:16 PM, Julien HENRY wrote: What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleint mkle...@gmail.com À : Maven Developers List dev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
I guess one really nice effect of this would allow you to define a certain internal-only environment for project developers to use, that won't pollute the POM once it's in the remote repository... But what about people checking out your project and trying to build it if they don't have access to the things in your project-local settings.xml though? This is a problem inherent with system-scoped dependencies, and part of why they're such a mess to deal with. Maybe it's worth giving people enough rope to hang themselves, and trusting them to be responsible. I suppose profiles.xml was a way to do exactly this too...what was the original reasoning behind removing support for it, does anyone remember? -john On 8/1/11 3:16 PM, Julien HENRY wrote: What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleintmkle...@gmail.com À : Maven Developers Listdev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gierpg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org -- John Casey Developer, PMC Chair - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
I have several alternative design ideas. 0) If you religiously use a repository manager and mirrorOf *, you can prevent this rogues from bothering you. 1) How about if the release / deploy process had an option to remove repositories from the POM? 2) Let's design and implement basic repository redirection in maven itself, so that people don't have to set up an entire repo-man to compensate for stupid repository elements in poms. 3) Let's fix the ?bug? in which a repository in a POM is used to look up artifacts other than the dependences of that very pom. 4) Let's fix the ?bug? in which a pluginRepository in a dependency effects lookups of plugins. pluginRepository elements should only have impact the starting POM or its parents. (I'm not 100% sure that this problem exists). All in all there's a tension. Repos move around and are managed, so putting them in POMs causes problems. Not putting them in POMs causes other problems. So I'm in favor of viewing repository elements in dependencies as hints rather than directions to add them unconditionally to the front of the search list. On Mon, Aug 1, 2011 at 3:58 PM, Paul Gier pg...@redhat.com wrote: Using a project local settings allows you to use the repo during build, but still have a clean pom in the repo when you release. We've experienced a lot of problems related to repos in the poms. On 08/01/2011 02:16 PM, Julien HENRY wrote: What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleint mkle...@gmail.com À : Maven Developers List dev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: [DISCUSS] Project local setting.xml
On 08/01/2011 03:09 PM, Benson Margulies wrote: I have several alternative design ideas. 0) If you religiously use a repository manager and mirrorOf *, you can prevent this rogues from bothering you. This only works when all the projects you work on use the same mirror settings. For me, this doesn't work, and I would like to have different mirror settings for different projects. 1) How about if the release / deploy process had an option to remove repositories from the POM? Yes, this would work well for me, but from what I understand, there are a lot of problems with modifying the POM right before deployment. It breaks gpg signing for example. 2) Let's design and implement basic repository redirection in maven itself, so that people don't have to set up an entire repo-man to compensate for stupid repository elements in poms. 3) Let's fix the ?bug? in which a repository in a POM is used to look up artifacts other than the dependences of that very pom. 4) Let's fix the ?bug? in which a pluginRepository in a dependency effects lookups of plugins. pluginRepository elements should only have impact the starting POM or its parents. (I'm not 100% sure that this problem exists). All in all there's a tension. Repos move around and are managed, so putting them in POMs causes problems. Not putting them in POMs causes other problems. So I'm in favor of viewing repository elements in dependencies as hints rather than directions to add them unconditionally to the front of the search list. I basically agree with you. IMO repositories in dependency POMs should just be ignored by default. This definitely seems like a bug to me, and I've heard a lot of complaints from others when their build starts downloading stuff from some seemingly random location on the internet. http://jira.codehaus.org/browse/MNG-3056 On Mon, Aug 1, 2011 at 3:58 PM, Paul Gier pg...@redhat.com wrote: Using a project local settings allows you to use the repo during build, but still have a clean pom in the repo when you release. We've experienced a lot of problems related to repos in the poms. On 08/01/2011 02:16 PM, Julien HENRY wrote: What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleint mkle...@gmail.com À : Maven Developers List dev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
RE: [DISCUSS] Project local setting.xml
The issue to remove profiles.xml was MNG-4060[1] but it doesn't tell the reason.One of the comments contains a link to a thread I started when I discovered this removal.(man, that's already more than two years ago...)It should give some more background. -Robert http://jira.codehaus.org/browse/MNG-4060 Date: Mon, 1 Aug 2011 15:27:34 -0500 From: pg...@redhat.com To: dev@maven.apache.org Subject: Re: [DISCUSS] Project local setting.xml On 08/01/2011 03:09 PM, Benson Margulies wrote: I have several alternative design ideas. 0) If you religiously use a repository manager and mirrorOf *, you can prevent this rogues from bothering you. This only works when all the projects you work on use the same mirror settings. For me, this doesn't work, and I would like to have different mirror settings for different projects. 1) How about if the release / deploy process had an option to remove repositories from the POM? Yes, this would work well for me, but from what I understand, there are a lot of problems with modifying the POM right before deployment. It breaks gpg signing for example. 2) Let's design and implement basic repository redirection in maven itself, so that people don't have to set up an entire repo-man to compensate for stupid repository elements in poms. 3) Let's fix the ?bug? in which a repository in a POM is used to look up artifacts other than the dependences of that very pom. 4) Let's fix the ?bug? in which a pluginRepository in a dependency effects lookups of plugins. pluginRepository elements should only have impact the starting POM or its parents. (I'm not 100% sure that this problem exists). All in all there's a tension. Repos move around and are managed, so putting them in POMs causes problems. Not putting them in POMs causes other problems. So I'm in favor of viewing repository elements in dependencies as hints rather than directions to add them unconditionally to the front of the search list. I basically agree with you. IMO repositories in dependency POMs should just be ignored by default. This definitely seems like a bug to me, and I've heard a lot of complaints from others when their build starts downloading stuff from some seemingly random location on the internet. http://jira.codehaus.org/browse/MNG-3056 On Mon, Aug 1, 2011 at 3:58 PM, Paul Gier pg...@redhat.com wrote: Using a project local settings allows you to use the repo during build, but still have a clean pom in the repo when you release. We've experienced a lot of problems related to repos in the poms. On 08/01/2011 02:16 PM, Julien HENRY wrote: What is the point of putting a settings.xml in your SCM next to your pom.xml? In this case just add the repos in the root pom. ++ Julien - Mail original - De : Milos Kleint mkle...@gmail.com À : Maven Developers List dev@maven.apache.org Cc : Envoyé le : Lundi 1 Août 2011 21h02 Objet : Re: [DISCUSS] Project local setting.xml hasn't that been the purpose of profiles.xml files back in 2.x before it was removed for 3.x? Milos On Mon, Aug 1, 2011 at 9:00 PM, Paul Gier pg...@redhat.com wrote: I'd like to discuss the possibility of Maven automatically looking for a project specific settings.xml file [1]. The main use case for this is to eliminate, or at least reduce, the need to add repositories to the poms. A setting.xml file could simply be added into scm into the root directory of the project. Then it would be checked out when the project is checked out. With multi-module projects, Maven would need to search up the directory tree to find the settings.xml file, but this could be made relatively simple by checking the parent dirs until Maven finds: (1) a settings.xml, (2) a directory with no pom.xml, or (3) the root directory The only problem I can think of in this case would be when small related projects can be checked out separately (similar to Maven plugins, or codehaus mojo). The project might not be able to find the settings.xml if it is not checked out with the project. Although I think this is a relatively minor issue. [1]http://jira.codehaus.org/browse/MNG-4686 - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr