On Wednesday, 23 May 2012, hujirong wrote: > Hi > > After working with Maven for a month, I am still not quite understand how > Maven works. Maybe just like Microsoft technologies, encapsulate too much. > One key issue is to understand the plugin. > > For example, the following example, how can I see this thing allows JDK 5.0 > source. There is nowhere it says "allow". How do I know if it's not asking > the compiler to use JDK 5.0?!
It is saying that the source code obeys 5.0 syntax and to generate byte code using 5.0 format. You can use any JDK >= 5.0 to build... But if using a JDK > 5.0 you will likely want to use animal sniffer to enforce the use of only JRE 5.0 methods if you must be runtime compatible with 5.0 (which is EOL btw) Not really a Maven thing, more of a java thing > > So what shall I do to make me clearly understand how plugin in Maven work? > > Thanks > Jirong > > http://maven.apache.org/guides/getting-started/index.html > > For this example, we will configure the Java compiler to allow JDK 5.0 > sources. This is as simple as adding this to your POM: > > ... > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.0.2</version> > <configuration> > <source>1.5</source> > <target>1.5</target> > </configuration> > </plugin> > </plugins> > </build> > ... > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Feel-Maven-is-not-intuitive-tp5709506.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] <javascript:;> > For additional commands, e-mail: [email protected]<javascript:;> > >
