Re: Adding maven-compiler-plugin to super POM
Hi guys, thanks for the replies. I read up on parent/child POMs and now understand what I was doing (or wasn't in this case). So maybe I'll modify my intitial question, is there anyway to configure my environment (Mac OS X) to tell Maven I always want JDK 1.5? It'd be nice if it inferred this from my JAVA_HOME setting. Or is it just an accepted practice that every Maven project must be explicitly set to JDK 1.5 via the maven-compiler-plugin? Thanks again. mikeottinger wrote: Hello, I'm trying to come up with a way such that new maven projects I create are ready to use JDK 1.5 by inheritance from a super POM. I'm having no luck, hence this post. I'm new to maven (thanks to this forum for telling me maven defaults to jdk 1.3) so super POMs are a little unfamiliar to me, from searching this forum I'm told that creating a pom.xml in the parent directory of my project somehow does the trick. I created one, added the plugin for maven-compiler-plugin, ran mvn install, but I still get jdk compiling errors. Does anyone have any suggestions in setting a jdk level globally for my environment? Are super POMs even the way to go? I tend to create a lot of little projects for prototyping and having to tell Maven I want jdk 1.5 for each of them is annoying. Thanks in advance! -- View this message in context: http://www.nabble.com/Adding-maven-compiler-plugin-to-super-POM-tp16851994s177p16897186.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding maven-compiler-plugin to super POM
Hello, I'm trying to come up with a way such that new maven projects I create are ready to use JDK 1.5 by inheritance from a super POM. I'm having no luck, hence this post. I'm new to maven (thanks to this forum for telling me maven defaults to jdk 1.3) so super POMs are a little unfamiliar to me, from searching this forum I'm told that creating a pom.xml in the parent directory of my project somehow does the trick. I created one, added the plugin for maven-compiler-plugin, ran mvn install, but I still get jdk compiling errors. Does anyone have any suggestions in setting a jdk level globally for my environment? Are super POMs even the way to go? I tend to create a lot of little projects for prototyping and having to tell Maven I want jdk 1.5 for each of them is annoying. Thanks in advance! -- View this message in context: http://www.nabble.com/Adding-maven-compiler-plugin-to-super-POM-tp16851994s177p16851994.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adding maven-compiler-plugin to super POM
In your pom.xml file add the following: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build Thanks, Daniel King Vurv The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to the message and deleting it from your computer. Thank you. -Original Message- From: mikeottinger [mailto:[EMAIL PROTECTED] Sent: Thursday, April 24, 2008 4:06 PM To: users@maven.apache.org Subject: Adding maven-compiler-plugin to super POM Hello, I'm trying to come up with a way such that new maven projects I create are ready to use JDK 1.5 by inheritance from a super POM. I'm having no luck, hence this post. I'm new to maven (thanks to this forum for telling me maven defaults to jdk 1.3) so super POMs are a little unfamiliar to me, from searching this forum I'm told that creating a pom.xml in the parent directory of my project somehow does the trick. I created one, added the plugin for maven-compiler-plugin, ran mvn install, but I still get jdk compiling errors. Does anyone have any suggestions in setting a jdk level globally for my environment? Are super POMs even the way to go? I tend to create a lot of little projects for prototyping and having to tell Maven I want jdk 1.5 for each of them is annoying. Thanks in advance! -- View this message in context: http://www.nabble.com/Adding-maven-compiler-plugin-to-super-POM-tp168519 94s177p16851994.html Sent from the Maven - Users mailing list archive at Nabble.com. - 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: Adding maven-compiler-plugin to super POM
You need to specify this pom as a parent element in your child pom...simply adding it in the parent directory doesn't magically do it for you ;-) Also, super-pom is normally reserved to mean the pom included in the maven core...the true super pom. A more appropriate term is a corporate pom for a corp wide setup, or just a parent pom. -Original Message- From: mikeottinger [mailto:[EMAIL PROTECTED] Sent: Thursday, April 24, 2008 4:06 PM To: users@maven.apache.org Subject: Adding maven-compiler-plugin to super POM Hello, I'm trying to come up with a way such that new maven projects I create are ready to use JDK 1.5 by inheritance from a super POM. I'm having no luck, hence this post. I'm new to maven (thanks to this forum for telling me maven defaults to jdk 1.3) so super POMs are a little unfamiliar to me, from searching this forum I'm told that creating a pom.xml in the parent directory of my project somehow does the trick. I created one, added the plugin for maven-compiler-plugin, ran mvn install, but I still get jdk compiling errors. Does anyone have any suggestions in setting a jdk level globally for my environment? Are super POMs even the way to go? I tend to create a lot of little projects for prototyping and having to tell Maven I want jdk 1.5 for each of them is annoying. Thanks in advance! -- View this message in context: http://www.nabble.com/Adding-maven-compiler-plugin-to-super-POM-tp168519 94s177p16851994.html Sent from the Maven - Users mailing list archive at Nabble.com. - 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]