RE: Using repositories defined in a profile... question/problem [m2]
Anyone have an idea on this? I really do need this for a project I'm working on. MAR -Original Message- From: Russell, Mark [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 11:41 AM To: Maven Users List Subject: RE: Using repositories defined in a profile... question/problem [m2] Ok those help a little in the trouble shooting. Still no solution but here is what I'm seeing. Behavior when doing a "m2 projecthelp:effective-pom": - If the profile is in the parent and not the child, then the effective pom *does not* show any profiles. - If the profile is in the child then the effective pom *does* show the profile. - Aren't profiles suppose to be inherited? (I can work around this, just curious) Behavior when doing "m2 projecthelp:active-profiles": - If the profile is defined in the parent, then no active profiles will ever be displayed, regardless of what I do up to and including passing "-P profilename" to m2 - After changing "" to "true" in the profile in the child pom the profile will show up as active. However the repositories defined in the profile seem to be completely ignored. Note that I even tried commenting out the main (ie not in a profile) section, in both the parent & child poms, just to make sure that wasn't screwing with things, even so the repositories in the profile seem to be ignored. I did take a look through the open bugs and the only bug that looks somewhat related is http://jira.codehaus.org/browse/MNG-1169 though it looks more like this applies to the ant tasks rather than m2 itself. I'm pretty much stumped here so does anyone else have any further ideas? If anyone thought it worth it, I'd be willing to pull the beta-4 code down and try. MAR -Original Message- From: John Casey [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 10:59 AM To: Maven Users List Subject: Re: Using repositories defined in a profile... question/problem [m2] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You should be able to specify a profile in a pom and NOT have to use in the settings.xml - that section is only for profiles defined in the settings file. Since you have activeByDefault specified, you should be able to run the following: m2 projecthelp:active-profiles and see your profile listed. (If you didn't have activeByDefault, you might have to add a system property or some other trigger for the profile.) Another note about activeByDefault is that when any other profile is activated, this one will not be. It's meant to work more like a default choice rather than an activeAlways sort of semantic. If you want to see what the POM looks like when Maven is done mashing it together with parents, profiles, etc. you can use: m2 projecthelp:effective-pom or m2 projecthelp:effective-pom -Doutput=/path/to/file I know these aren't solutions, but maybe they will help give you a clearer view into the problem. Hope that helps, john Russell, Mark wrote: | I have a pom with a profile defined in that specifies a local | repository, and disables the central repo. How can I get m2 to honor | the profile? No matter what I try it seems to ignore the profile and | goes and uses the central repo and ignores the local repository. | | I have even tried passing "-P master_build" to m2 at the command line | and it still ignores it. | | Am I just doing something wrong here? | | Side note, not sure it matters... I'm making use of the multi-projects | support of m2. I have tried this profiles section in both the parent | and child pom's and it seems to make no difference what so ever. No | matter what I do the profile isn't used. | | | MAR | | | | The profiles section of my pom: | | | master_build | | true (also tried just | ) | | | | local | Local repository | http://localhost:8080/maven2 | default | | true | | | true | | | | central | Maven Repository Switchboard | http://repo1.maven.org/maven2 | default | | false | | | false | | | | | | | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFDTUDGK3h2CZwO/4URAswMAKCoqShaYZ2nOGXnBe0r8eb2zFUQ1ACfaxyv YuBGslYvPaS2kDEhuoPDIPs= =yhQf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
RE: Using repositories defined in a profile... question/problem [m2]
Ok those help a little in the trouble shooting. Still no solution but here is what I'm seeing. Behavior when doing a "m2 projecthelp:effective-pom": - If the profile is in the parent and not the child, then the effective pom *does not* show any profiles. - If the profile is in the child then the effective pom *does* show the profile. - Aren't profiles suppose to be inherited? (I can work around this, just curious) Behavior when doing "m2 projecthelp:active-profiles": - If the profile is defined in the parent, then no active profiles will ever be displayed, regardless of what I do up to and including passing "-P profilename" to m2 - After changing "" to "true" in the profile in the child pom the profile will show up as active. However the repositories defined in the profile seem to be completely ignored. Note that I even tried commenting out the main (ie not in a profile) section, in both the parent & child poms, just to make sure that wasn't screwing with things, even so the repositories in the profile seem to be ignored. I did take a look through the open bugs and the only bug that looks somewhat related is http://jira.codehaus.org/browse/MNG-1169 though it looks more like this applies to the ant tasks rather than m2 itself. I'm pretty much stumped here so does anyone else have any further ideas? If anyone thought it worth it, I'd be willing to pull the beta-4 code down and try. MAR -Original Message- From: John Casey [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 10:59 AM To: Maven Users List Subject: Re: Using repositories defined in a profile... question/problem [m2] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You should be able to specify a profile in a pom and NOT have to use in the settings.xml - that section is only for profiles defined in the settings file. Since you have activeByDefault specified, you should be able to run the following: m2 projecthelp:active-profiles and see your profile listed. (If you didn't have activeByDefault, you might have to add a system property or some other trigger for the profile.) Another note about activeByDefault is that when any other profile is activated, this one will not be. It's meant to work more like a default choice rather than an activeAlways sort of semantic. If you want to see what the POM looks like when Maven is done mashing it together with parents, profiles, etc. you can use: m2 projecthelp:effective-pom or m2 projecthelp:effective-pom -Doutput=/path/to/file I know these aren't solutions, but maybe they will help give you a clearer view into the problem. Hope that helps, john Russell, Mark wrote: | I have a pom with a profile defined in that specifies a local | repository, and disables the central repo. How can I get m2 to honor | the profile? No matter what I try it seems to ignore the profile and | goes and uses the central repo and ignores the local repository. | | I have even tried passing "-P master_build" to m2 at the command line | and it still ignores it. | | Am I just doing something wrong here? | | Side note, not sure it matters... I'm making use of the multi-projects | support of m2. I have tried this profiles section in both the parent | and child pom's and it seems to make no difference what so ever. No | matter what I do the profile isn't used. | | | MAR | | | | The profiles section of my pom: | | | master_build | | true (also tried just | ) | | | | local | Local repository | http://localhost:8080/maven2 | default | | true | | | true | | | | central | Maven Repository Switchboard | http://repo1.maven.org/maven2 | default | | false | | | false | | | | | | | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFDTUDGK3h2CZwO/4URAswMAKCoqShaYZ2nOGXnBe0r8eb2zFUQ1ACfaxyv YuBGslYvPaS2kDEhuoPDIPs= =yhQf -END PGP SIGNATURE- - 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: Using repositories defined in a profile... question/problem [m2]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You should be able to specify a profile in a pom and NOT have to use in the settings.xml - that section is only for profiles defined in the settings file. Since you have activeByDefault specified, you should be able to run the following: m2 projecthelp:active-profiles and see your profile listed. (If you didn't have activeByDefault, you might have to add a system property or some other trigger for the profile.) Another note about activeByDefault is that when any other profile is activated, this one will not be. It's meant to work more like a default choice rather than an activeAlways sort of semantic. If you want to see what the POM looks like when Maven is done mashing it together with parents, profiles, etc. you can use: m2 projecthelp:effective-pom or m2 projecthelp:effective-pom -Doutput=/path/to/file I know these aren't solutions, but maybe they will help give you a clearer view into the problem. Hope that helps, john Russell, Mark wrote: | I have a pom with a profile defined in that specifies a local | repository, and disables the central repo. How can I get m2 to honor | the profile? No matter what I try it seems to ignore the profile and | goes and uses the central repo and ignores the local repository. | | I have even tried passing "-P master_build" to m2 at the command line | and it still ignores it. | | Am I just doing something wrong here? | | Side note, not sure it matters... I'm making use of the multi-projects | support of m2. I have tried this profiles section in both the parent | and child pom's and it seems to make no difference what so ever. No | matter what I do the profile isn't used. | | | MAR | | | | The profiles section of my pom: | | | master_build | | true (also tried just | ) | | | | local | Local repository | http://localhost:8080/maven2 | default | | true | | | true | | | | central | Maven Repository Switchboard | http://repo1.maven.org/maven2 | default | | false | | | false | | | | | | | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFDTUDGK3h2CZwO/4URAswMAKCoqShaYZ2nOGXnBe0r8eb2zFUQ1ACfaxyv YuBGslYvPaS2kDEhuoPDIPs= =yhQf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using repositories defined in a profile... question/problem [m2]
Not sure about that. I'm only using m2 for this, not the ant tasks themselves. Additionally, I thought profiles were usable without putting them in the settings.xml (trying to avoid putting anything in it). Thus the doesn't help me as that is a settings.xml specific tag. So the question becomes, can profiles be used in the pom.xml without touching the settings.xml? If so how? Nothing I've tried so far will cause any profile to activate (haven't tried putting them in the settings.xml, but I'm specifically avoiding that for reasons best left unspecified) MAR -Original Message- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 7:24 AM To: Maven Users List Subject: Re: Using repositories defined in a profile... question/problem [m2] I think this is related only to the Ant tasks and a bug that Mark filed yesterday. - Brett On 10/12/05, Dave Brondsema <[EMAIL PROTECTED]> wrote: > I too am having this problem. Since I have a repo hosted in SVN in > Apache, I can easily check the log file to see when maven accesses it. > It doesn't at all. > > Here's my settings.xml: > > > > > default > > true > > > > > suppl-repo > Supplementary repo > > http://mysite.org/repos/java-maven-repository/ > default > > > > > > default > > > > > Brian E. Fox wrote: > > Mark, > > Try adding this: > > > > master_build > > > > > > -Original Message- > > From: Russell, Mark [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 11, 2005 6:28 PM > > To: Maven Users List > > Subject: Using repositories defined in a profile... question/problem > > [m2] > > > > I have a pom with a profile defined in that specifies a local > > repository, and disables the central repo. How can I get m2 to honor > > the profile? No matter what I try it seems to ignore the profile and > > goes and uses the central repo and ignores the local repository. > > > > I have even tried passing "-P master_build" to m2 at the command line > > and it still ignores it. > > > > Am I just doing something wrong here? > > > > Side note, not sure it matters... I'm making use of the multi-projects > > support of m2. I have tried this profiles section in both the parent > > and child pom's and it seems to make no difference what so ever. No > > matter what I do the profile isn't used. > > > > > > MAR > > > > > > > > The profiles section of my pom: > > > > > > master_build > > > > true (also tried just > > ) > > > > > > > > local > > Local repository > > http://localhost:8080/maven2 > > default > > > > true > > > > > > true > > > > > > > > central > > Maven Repository Switchboard > > http://repo1.maven.org/maven2 > > default > > > > false > > > > > > false > > > > > > > > > > > > > > > > - > > 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] > > > > > -- > Dave Brondsema > Software Developer > Cornerstone University > > > - 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: Using repositories defined in a profile... question/problem [m2]
I think this is related only to the Ant tasks and a bug that Mark filed yesterday. - Brett On 10/12/05, Dave Brondsema <[EMAIL PROTECTED]> wrote: > I too am having this problem. Since I have a repo hosted in SVN in > Apache, I can easily check the log file to see when maven accesses it. > It doesn't at all. > > Here's my settings.xml: > > > > > default > > true > > > > > suppl-repo > Supplementary repo > > http://mysite.org/repos/java-maven-repository/ > default > > > > > > default > > > > > Brian E. Fox wrote: > > Mark, > > Try adding this: > > > > master_build > > > > > > -Original Message- > > From: Russell, Mark [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 11, 2005 6:28 PM > > To: Maven Users List > > Subject: Using repositories defined in a profile... question/problem > > [m2] > > > > I have a pom with a profile defined in that specifies a local > > repository, and disables the central repo. How can I get m2 to honor > > the profile? No matter what I try it seems to ignore the profile and > > goes and uses the central repo and ignores the local repository. > > > > I have even tried passing "-P master_build" to m2 at the command line > > and it still ignores it. > > > > Am I just doing something wrong here? > > > > Side note, not sure it matters... I'm making use of the multi-projects > > support of m2. I have tried this profiles section in both the parent > > and child pom's and it seems to make no difference what so ever. No > > matter what I do the profile isn't used. > > > > > > MAR > > > > > > > > The profiles section of my pom: > > > > > > master_build > > > > true (also tried just > > ) > > > > > > > > local > > Local repository > > http://localhost:8080/maven2 > > default > > > > true > > > > > > true > > > > > > > > central > > Maven Repository Switchboard > > http://repo1.maven.org/maven2 > > default > > > > false > > > > > > false > > > > > > > > > > > > > > > > - > > 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] > > > > > -- > Dave Brondsema > Software Developer > Cornerstone University > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using repositories defined in a profile... question/problem [m2]
I too am having this problem. Since I have a repo hosted in SVN in Apache, I can easily check the log file to see when maven accesses it. It doesn't at all. Here's my settings.xml: default true suppl-repo Supplementary repo http://mysite.org/repos/java-maven-repository/ default default Brian E. Fox wrote: > Mark, > Try adding this: > > master_build > > > -Original Message- > From: Russell, Mark [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 11, 2005 6:28 PM > To: Maven Users List > Subject: Using repositories defined in a profile... question/problem > [m2] > > I have a pom with a profile defined in that specifies a local > repository, and disables the central repo. How can I get m2 to honor > the profile? No matter what I try it seems to ignore the profile and > goes and uses the central repo and ignores the local repository. > > I have even tried passing "-P master_build" to m2 at the command line > and it still ignores it. > > Am I just doing something wrong here? > > Side note, not sure it matters... I'm making use of the multi-projects > support of m2. I have tried this profiles section in both the parent > and child pom's and it seems to make no difference what so ever. No > matter what I do the profile isn't used. > > > MAR > > > > The profiles section of my pom: > > > master_build > > true (also tried just > ) > > > > local > Local repository > http://localhost:8080/maven2 > default > > true > > > true > > > > central > Maven Repository Switchboard > http://repo1.maven.org/maven2 > default > > false > > > false > > > > > > > > - > 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] > -- Dave Brondsema Software Developer Cornerstone University signature.asc Description: OpenPGP digital signature
RE: Using repositories defined in a profile... question/problem [m2]
Mark, Try adding this: master_build -Original Message- From: Russell, Mark [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 6:28 PM To: Maven Users List Subject: Using repositories defined in a profile... question/problem [m2] I have a pom with a profile defined in that specifies a local repository, and disables the central repo. How can I get m2 to honor the profile? No matter what I try it seems to ignore the profile and goes and uses the central repo and ignores the local repository. I have even tried passing "-P master_build" to m2 at the command line and it still ignores it. Am I just doing something wrong here? Side note, not sure it matters... I'm making use of the multi-projects support of m2. I have tried this profiles section in both the parent and child pom's and it seems to make no difference what so ever. No matter what I do the profile isn't used. MAR The profiles section of my pom: master_build true (also tried just ) local Local repository http://localhost:8080/maven2 default true true central Maven Repository Switchboard http://repo1.maven.org/maven2 default false false - 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]