Maven: compiling and testing on different source levels

后端 未结 1 1596
我在风中等你
我在风中等你 2021-02-04 09:20

I am currently working on a project which will run on an embedded device. The device runs a Java ME JRE (comparable to Java 1.4).

Because of this maven is configured to

1条回答
  •  醉酒成梦
    2021-02-04 09:31

    The source and target versions can be set separately for the compile and testCompile goals of the maven compiler plugin. You can change the settings either by defining properties in your pom:

    
        1.4
        1.4
        1.5
        1.5
    
    

    Or by explicit configuration of the compiler plugin:

    
        org.apache.maven.plugins
        maven-compiler-plugin
        2.4
        
            1.4
            1.4
            1.5
            1.5
        
    
    

    0 讨论(0)
提交回复
热议问题