-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You should be able to specify a profile in a pom and NOT have to use <activeProfiles/> 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: | <profiles> | <profile> | <id>master_build</id> | <activation> | <activeByDefault>true</activeByDefault> (also tried just | <activeByDefault> ) | </activation> | <repositories> | <repository> | <id>local</id> | <name>Local repository</name> | <url>http://localhost:8080/maven2</url> | <layout>default</layout> | <snapshots> | <enabled>true</enabled> | </snapshots> | <releases> | <enabled>true</enabled> | </releases> | </repository> | <repository> | <id>central</id> | <name>Maven Repository Switchboard</name> | <url>http://repo1.maven.org/maven2</url> | <layout>default</layout> | <snapshots> | <enabled>false</enabled> | </snapshots> | <releases> | <enabled>false</enabled> | </releases> | </repository> | </repositories> | </profile> | </profiles> | | | --------------------------------------------------------------------- | 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]
