Afraid I'd already tried that but it doesn't work: org.apache.maven.reactor.MavenExecutionException: Failed to activate local (project-level) build profiles: Cannot parse profiles.xml resource from dir C:\Dev\Foo ... Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'build' (position: START_TAG seen ...</properties>
This would seem to be consistent with the documentation at http://maven.apache.org/guides/introduction/introduction-to-profiles.htm l under the "Which areas of a POM can be customized by each type of profile? Why?" section, which says you can only customise the plugin config in the actual pom.xml, not the settings.xml or profile.xml I'm using 2.0.4 - are you using a newer build that now supports this? thanks James -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey De Smet Sent: Wednesday, October 11, 2006 2:17 PM To: [email protected] Subject: Re: Machine specific settings Add in ~/.m2/settings.xml a <profiles><profile> that defaults activates and has a <build><plugins><plugin>... idea with <configuration><jdkName>1.4</jdkName> Or create a profiles.xml file in your project dir, which does the same thing. See the free m2 book. Shute, James wrote, On 2006-10-11 11:25 AM: > I'm having a go at moving from Maven 1.x up to 2.0 and can't quite > work out the correct way to model local machine specific settings. > I've looked through the docs and mailing lists so have found various > details about profiles but I can't quite see how to use them to cater > for certain setup issues. > > Take, for example, the jdkName property for the idea plugin. Under > 1.x I just added this to my build.properties: > > maven.idea.jdk=1.4 > > and all is well - that's the name I've given to it in my local Idea > setup so it works nicely. > > Now switching over to M2 I could just put this in the pom.xml: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-idea-plugin</artifactId> > <configuration> > <jdkName>1.4</jdkName> > </configuration> > </plugin> > > Now this forces every developer to have a JDK set up in Idea called > 1.4, which they may not want - perhaps they prefer to name them fully (e.g. > 1.4.2_05). > I did look to just put an override for this setting in a settings.xml > or profiles.xml file, but changing plugin settings seems to be > disallowed in these files. > > Another example would be specifying a specific compiler executable. > This can be set in the pom > > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <executable>C:/Program > Files/Java/jdk1.4.2_05/bin/javac</executable> > > but that relies on everybody installing Java to the same location, > which never happens, so doesn't work. > > Can somebody enlighten me? Given the amount of thought that's clearly > gone into M2 I'm sure this sort of thing must be catered for and it's > just me not seeing how > > thanks > > James > > > ---------------------------------------------------------------------- > -------- This message is intended only for the personal and > confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. -- With kind regards, Geoffrey De Smet --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
