You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Da...@tdameritrade.com on 2006/05/24 14:57:28 UTC

Compiling sub-modules/artifacts in different jdks...

Is anyone aware of a way to compile artifacts or even sub-modules under
different JDKs?  I have an EJB that I compile under 1.5 but I want to
generate the ejb-client compiled under 1.4 (there's nothing in the
interfaces or DTOs that are 1.4-incompatible) so that 1.4-based clients
can call it.  Any thoughts?


Thanks,
Daryl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Compiling sub-modules/artifacts in different jdks...

Posted by Tim Kettler <ti...@udo.edu>.
You can always use something like:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <configuration>
     <source>1.4</source>
     <target>1.4</target>
   </configuration>
</plugin>

to compile code for a specific jvm version. But this will use the jdk maven was started 
with to compile the code. Don't know if this is good enough for you.

-Tim



Daryl.Dwyer@tdameritrade.com schrieb:
> Is anyone aware of a way to compile artifacts or even sub-modules under
> different JDKs?  I have an EJB that I compile under 1.5 but I want to
> generate the ejb-client compiled under 1.4 (there's nothing in the
> interfaces or DTOs that are 1.4-incompatible) so that 1.4-based clients
> can call it.  Any thoughts?
> 
> 
> Thanks,
> Daryl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Compiling sub-modules/artifacts in different jdks...

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/24/06, Daryl.Dwyer@tdameritrade.com <Da...@tdameritrade.com> wrote:

> Is anyone aware of a way to compile artifacts or even sub-modules under
> different JDKs?  I have an EJB that I compile under 1.5 but I want to
> generate the ejb-client compiled under 1.4 (there's nothing in the
> interfaces or DTOs that are 1.4-incompatible) so that 1.4-based clients
> can call it.  Any thoughts?

I assume you've configured the compiler plugin to target 1.5 at the
top level of your project [1], so (as Tim mentioned) you can override
the configuration to target 1.4 in the sub-module.

Something that Jakarta Commons does (with Maven 1) is add
"X-Compile-Target: 1.4" to the manifest, to reassure people since it
will otherwise just say "Build-Jdk: 1.5.0_06".  I haven't figured out
how to do this with m2 yet.

[1] http://maven.apache.org/plugins/maven-compiler-plugin/howto.html

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org