thanks for the comment stephen: I agree, it does seem like a bootstrap or adhoc way of passing which JDK we need to compile with:
How ever, i made profiles. So you think making profiles is a good way or not. i made two profiles and gave the compiler plugin settings differently. So when i call with -PDEVJDK5 it compiles with jdk 5 or else -PDEVJDK6 in which case it compiles using the jdk 5 (I had hardcoded the jdk directory path like this ) / <profile> <id>SITJDK5</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.5</source> <target>1.5</target> <verbose>true</verbose> <fork>true</fork> <executable>D:/IBM/SDP70/jdk/bin/javac</executable> </configuration> </plugin> </plugins> </build> </profile>/ This seemed like a decent way to me. What do you guys think, can we choose JDK like that and run it like this : /mvn.bat --also-make --projects com.riyadbank:eCorp-ear clean -PSITJDK5 install/ I just started reading on toolchains so dont know how it will help me. Thanks Syed... -- View this message in context: http://maven.40175.n5.nabble.com/what-does-define-do-in-maven-tp5485392p5495040.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org