What is your target JVM?

If it's the one on your developer's platform, take a look at profiles (see free M2 book) and make a profile with <build> sourcefolders excludes if the profile is JVM 1.2.

If you really want 2 different jars (to distribute), you need 2 different pom.xml's (=> different groupId:artifactId) so you can push them both to the repository. But instead of doing it the good way (different source folders and A depends on B), you could hack it and make A and B use the same source folder and have no dependencies on each other.

Shahid Faiz wrote:
Hi All,

I am new to maven. After studying some material on it, my understanding is every POM file should correspond to one JAR/WAR/EAR.

I have a scenario, my project contains some file which are only packaged if the target JVM version is 1.5 and some of them are included if target JVM version is 1.2. If i create one module for common files and two for different versions of JVM, but at the end I want one JAR file for 1.2/1.3 and one for 1.5.

I don't want to have one JAR file for common classes and separate file JVM specific files.

Kindly tell me how can i do this, or refer me some material on this.


Regards
Shahid

--
With kind regards,
Geoffrey De Smet


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to