ahh!!! yes you are right stephen,cos POMs can be committed with the code and toolchains.xml and settings.xml are machine specific or more accurately, local maven installation specific so the POM are still portable. Hmm i guess have to go that way ..
I will build profiles that use their own tool chain: <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> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-toolchains-plugin</artifactId> <version>1.0</version> <executions> <execution> <phase>validate</phase> <goals> <goal>toolchain</goal> </goals> </execution> </executions> <configuration> <toolchains> <jdk> <version>1.5</version> // will use D:/IBM/SDP70/jdk/bin for jdk5.0 <vendor>sun</vendor> </jdk> </toolchains> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>SITJDK6</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-toolchains-plugin</artifactId> <version>1.0</version> <executions> <execution> <phase>validate</phase> <goals> <goal>toolchain</goal> </goals> </execution> </executions> <configuration> <toolchains> <jdk> <version>1.6</version> //Will use C:/glassfish3withjdk/jdk/bin for jdk 6.0 <vendor>sun</vendor> </jdk> </toolchains> </configuration> </plugin> </plugins> </build> </profile> and then in my toolchains.xml <?xml version="1.0" encoding="UTF8"?> <toolchains> <toolchain> <type>jdk</type> <provides> <version>1.5</version> <vendor>sun</vendor> <id>default</id> </provides> <configuration> <jdkHome>D:/IBM/SDP70/jdk</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> <version>1.6</version> <vendor>sun</vendor> <id>ide</id> </provides> <configuration> <jdkHome>C:/glassfish3withjdk/jdk</jdkHome> </configuration> </toolchain> </toolchains> Lets see if im able to accomplish it as easily as it seems . Thanks for the tips Stephen. Syed... -- View this message in context: http://maven.40175.n5.nabble.com/what-does-define-do-in-maven-tp5485392p5495256.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