incremental compile targeting java 1.6 byte code from 1.7 jvm process

54 views
Skip to first unread message

Glen Marchesani

unread,
Aug 1, 2013, 7:45:32 AM8/1/13
to maven-a...@googlegroups.com

I had typed out a question but then I found my answer (amazing what you can find when you dig hard enough).  I figured I would post the question and solution here since someone may run up against it as well.

We are using zinc and incremental compiling and just switched our build machines to be java 1.7.  We still wanted/needed to target 1.6.  We had to add the following javacArgs to our scala-maven-plugin.  Which resolved our issue (which was any code that went through zinc was built for 1.7).


<configuration>
    <recompileMode>incremental</recompileMode>
    <useZincServer>true</useZincServer>
    <args>
      <arg>-feature</arg>
    </args>
    <javacArgs>
        <javacArg>-source</javacArg>
        <javacArg>1.6</javacArg>
        <javacArg>-target</javacArg>
        <javacArg>1.6</javacArg>
    </javacArgs>
</configuration>

cheers,
Glen



Reply all
Reply to author
Forward
0 new messages