Not automated but the simplest way would be to define a profile for OSX. Then in the standard definition set the compiler plugin to exclude[1] the classes. Then in the OSX profile override the compiler plugin to remove the exclude.
Then you would just need to either do mvn compile or mvn -Posx compile. Not sure of how to automate to profile selection though. [1]http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#excludes ----- Original message ----- From: "Timo Wolf" <[EMAIL PROTECTED]> To: "Maven Users List" <[email protected]> Date: Tue, 16 Jan 2007 09:06:41 +0100 Subject: Platform depending compilation Hi All, I have a java swing application that I build with maven. I include some Mac OS X java libraries to integrate the app into OS X. I get errors when compiling on Windows, as the os x libraries are not available. Is it possible to detect the current OS and exclude some java classes from compiling when not working on OS X? I am looking to configure the compile like: <if> <equals arg1="${isMacOsX}" arg2="false" /> <then> <exclude>myClassesToExclude</exclude> </then> </if> thanks a lot Timo --------------------------------------------------------------------- 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]
