Re: M2: Need help with central repositories, and mirrors
Hi, see comment inline John Quinn schrieb: I'd like to piggy back on this thread, since my question is just drilling down further. So, if I say have the following profile in my mvn home settings.xml: myRepository 1.4 myRepository Repository for myRepository builds http://www.myhost.com/maven/myRepository default always And then I put in the apache html directory my entire directory structure and files currently under my local repository under the apache html directory like so: /var/www/html/maven/myRepository Then I now will be getting everything from that repository instead of my local repository, true? In theory yes. In practice it's not that simple. Even if they look similar a local and remote repository are different things. A remote repository has additional metadata that is missing in a local repository. See here [1] for example. To get a valid remote repository you have to deploy your artifacts to it (see below for instruction). Coincidently someone posted just today in this thread [6] a link to a shell script that converts a local to a remote repository. You may want to have a look at it. And how would I install new jars in the repository as they are needed, by a simple copy, or could I then use the install command to get it to the remote repository? As you use the install (for existing projects) or install-file (for 3rd-party jars) mojos to install artifacts to a local repository you use the deploy respectivly deploy-file mojos for remote repositories. See [2], [3] and [4], [5] for instructions. Thanks, John -Tim [1] http://repo1.maven.org/maven2/org/hibernate/hibernate/maven-metadata.xml [2] http://maven.apache.org/plugins/maven-install-plugin/ [3] http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html [4] http://maven.apache.org/plugins/maven-deploy-plugin/ [5] http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html [6] http://www.nabble.com/M2-How-to-populate-internal-repository--tf4318392s177.html#a12296445 [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2: Need help with central repositories, and mirrors
I'd like to piggy back on this thread, since my question is just drilling down further. So, if I say have the following profile in my mvn home settings.xml: myRepository 1.4 myRepository Repository for myRepository builds http://www.myhost.com/maven/myRepository default always And then I put in the apache html directory my entire directory structure and files currently under my local repository under the apache html directory like so: /var/www/html/maven/myRepository Then I now will be getting everything from that repository instead of my local repository, true? And how would I install new jars in the repository as they are needed, by a simple copy, or could I then use the install command to get it to the remote repository? Thanks, John On 8/23/07, Tim Kettler <[EMAIL PROTECTED]> wrote: > > Additionally you need to keep in mind to use different local > repositories as well when using the different profiles on the same > machine. Else the artifacts from the different repositories will be mixed. > > -Tim > > Tim Kettler schrieb: > > Hi, > > > > setting the mirror to an invalid url would certainly work but I imagine > > you would get tons of warnings about failed repository accesses since > > maven would still try download from the mirror. > > > > What I would do instead is to just overwrite the definition of central > > in the qa and cert profiles like this: > > > > > > > > central > > Internal replacement for the central repository > > http://bla.com/repository > > > > true > > > > > > false > > > > > > > > > > > > > > central > > Internal replacement for the central repository > > http://bla.com/repository > > > > true > > > > > > false > > > > > > > > > > -Tim > > > > Chris Helck schrieb: > >> Hi, > >> > >> How can I redefine the central repository for specific profiles? I have > >> three profiles defined in my settings.xml: dev, qa, and cert. I want > the > >> "dev" profile to use the default central repository, but I want the > "qa" > >> and "cert" profiles to use specific (but different) in-house URLs. From > >> what I've read the preferred way of overriding the central repository > is > >> to redirect it via the tag in settings.xml. But I can't use > >> at the level, it only goes under , so > >> the mirror ends up being a global redirect instead of a profile > specific > >> redirect. > >> > >> Should I disable central completely: > >> > >> Null Central > >> Null > >> > >> central > >> > >> > >> And add http://repo1.maven.org/maven under a different repo id? The in > >> each I could define something lilke: > >> > >> my-central > >> ... > >> > >> > >> BTW: I'm using maven 2.0.4 on Ubuntu. > >> > >> Thanks, > >> Christopher Helck > >> > >> > >> > >> ** > >> This communication and all information (including, but not limited to, > >> market prices/levels and data) contained therein (the "Information") > is > >> for informational purposes only, is confidential, may be legally > >> privileged and is the intellectual property of ICAP plc and its > >> affiliates > >> ("ICAP") or third parties. No confidentiality or privilege is waived > or > >> lost by any mistransmission. The Information is not, and should not > >> be construed as, an offer, bid or solicitation in relation to any > >> financial instrument or as an official confirmation of any > transaction. > >> The Information is not warranted, including, but not limited, as to > >> completeness, timeliness or accuracy and is subject to change > >> without notice. ICAP assumes no liability for use or misuse of the > >> Information. All representations and warranties are expressly > >> disclaimed. The Information does not necessarily reflect the views of > >> ICAP. Access to the Information by anyone else other than the > >> recipient is unauthorized and any disclosure, copying, distribution or > >> any action taken or omitted to be taken in reliance on it is > >> prohibited. If > >> you receive this message in error, please immediately delete it and > all > >> copies of it from your system, destroy any hard copies of it and > >> notify the sender. > >> ** > >> > >> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: M2: Need help with central repositories, and mirrors
Additionally you need to keep in mind to use different local repositories as well when using the different profiles on the same machine. Else the artifacts from the different repositories will be mixed. -Tim Tim Kettler schrieb: Hi, setting the mirror to an invalid url would certainly work but I imagine you would get tons of warnings about failed repository accesses since maven would still try download from the mirror. What I would do instead is to just overwrite the definition of central in the qa and cert profiles like this: central Internal replacement for the central repository http://bla.com/repository true false central Internal replacement for the central repository http://bla.com/repository true false -Tim Chris Helck schrieb: Hi, How can I redefine the central repository for specific profiles? I have three profiles defined in my settings.xml: dev, qa, and cert. I want the "dev" profile to use the default central repository, but I want the "qa" and "cert" profiles to use specific (but different) in-house URLs. From what I've read the preferred way of overriding the central repository is to redirect it via the tag in settings.xml. But I can't use at the level, it only goes under , so the mirror ends up being a global redirect instead of a profile specific redirect. Should I disable central completely: Null Central Null central And add http://repo1.maven.org/maven under a different repo id? The in each I could define something lilke: my-central ... BTW: I'm using maven 2.0.4 on Ubuntu. Thanks, Christopher Helck ** This communication and all information (including, but not limited to, market prices/levels and data) contained therein (the "Information") is for informational purposes only, is confidential, may be legally privileged and is the intellectual property of ICAP plc and its affiliates ("ICAP") or third parties. No confidentiality or privilege is waived or lost by any mistransmission. The Information is not, and should not be construed as, an offer, bid or solicitation in relation to any financial instrument or as an official confirmation of any transaction. The Information is not warranted, including, but not limited, as to completeness, timeliness or accuracy and is subject to change without notice. ICAP assumes no liability for use or misuse of the Information. All representations and warranties are expressly disclaimed. The Information does not necessarily reflect the views of ICAP. Access to the Information by anyone else other than the recipient is unauthorized and any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2: Need help with central repositories, and mirrors
Hi, setting the mirror to an invalid url would certainly work but I imagine you would get tons of warnings about failed repository accesses since maven would still try download from the mirror. What I would do instead is to just overwrite the definition of central in the qa and cert profiles like this: central Internal replacement for the central repository http://bla.com/repository true false central Internal replacement for the central repository http://bla.com/repository true false -Tim Chris Helck schrieb: Hi, How can I redefine the central repository for specific profiles? I have three profiles defined in my settings.xml: dev, qa, and cert. I want the "dev" profile to use the default central repository, but I want the "qa" and "cert" profiles to use specific (but different) in-house URLs. From what I've read the preferred way of overriding the central repository is to redirect it via the tag in settings.xml. But I can't use at the level, it only goes under , so the mirror ends up being a global redirect instead of a profile specific redirect. Should I disable central completely: Null Central Null central And add http://repo1.maven.org/maven under a different repo id? The in each I could define something lilke: my-central ... BTW: I'm using maven 2.0.4 on Ubuntu. Thanks, Christopher Helck ** This communication and all information (including, but not limited to, market prices/levels and data) contained therein (the "Information") is for informational purposes only, is confidential, may be legally privileged and is the intellectual property of ICAP plc and its affiliates ("ICAP") or third parties. No confidentiality or privilege is waived or lost by any mistransmission. The Information is not, and should not be construed as, an offer, bid or solicitation in relation to any financial instrument or as an official confirmation of any transaction. The Information is not warranted, including, but not limited, as to completeness, timeliness or accuracy and is subject to change without notice. ICAP assumes no liability for use or misuse of the Information. All representations and warranties are expressly disclaimed. The Information does not necessarily reflect the views of ICAP. Access to the Information by anyone else other than the recipient is unauthorized and any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
M2: Need help with central repositories, and mirrors
Hi, How can I redefine the central repository for specific profiles? I have three profiles defined in my settings.xml: dev, qa, and cert. I want the "dev" profile to use the default central repository, but I want the "qa" and "cert" profiles to use specific (but different) in-house URLs. From what I've read the preferred way of overriding the central repository is to redirect it via the tag in settings.xml. But I can't use at the level, it only goes under , so the mirror ends up being a global redirect instead of a profile specific redirect. Should I disable central completely: Null Central Null central And add http://repo1.maven.org/maven under a different repo id? The in each I could define something lilke: my-central ... BTW: I'm using maven 2.0.4 on Ubuntu. Thanks, Christopher Helck ** This communication and all information (including, but not limited to, market prices/levels and data) contained therein (the "Information") is for informational purposes only, is confidential, may be legally privileged and is the intellectual property of ICAP plc and its affiliates ("ICAP") or third parties. No confidentiality or privilege is waived or lost by any mistransmission. The Information is not, and should not be construed as, an offer, bid or solicitation in relation to any financial instrument or as an official confirmation of any transaction. The Information is not warranted, including, but not limited, as to completeness, timeliness or accuracy and is subject to change without notice. ICAP assumes no liability for use or misuse of the Information. All representations and warranties are expressly disclaimed. The Information does not necessarily reflect the views of ICAP. Access to the Information by anyone else other than the recipient is unauthorized and any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. **