My main project is using java 1.6 and I need to provide an client jar to an system that can only run on java 1.5. The client jar is an separate module so I am able to specify the java version in the maven-compiler-plugin. However, the client jar is dependent on an core jar, which is on 1.6. One way to
I have used “test-jar” goal in maven-jar-plugin to generate an test jar for other module to use. I am hoping to do something similar and use it in my client module with the following dependency:
<dependency>
<groupId>org.mygroup</groupId>
<artifactId>module-core</artifactId>
<classifier>java1_5</classifier>
</dependency>
Why do your client projects depends on core?
If it uses the code from the core, you apparently need to compile core JAR for 1.5 as well. You have several options here:
If client code actually does not use core (for example, it uses only WSDLs from the core or some other non-Java stuff), you can remove this dependency by moving stuff to separate “shared” module.