Compiling Java 7 code via Maven

前端 未结 18 1502
夕颜
夕颜 2020-12-04 07:10

My pom file lists


  
    
        
            
                

        
18条回答
  •  无人及你
    2020-12-04 08:00

    For a specific compilation that requires a (non-default /etc/alternatives/java) JVM, consider prefixing the mvn command with JAVA_HOME like this,

    JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/ mvn package
    

    Here we assume the default is Java 8, whereas for the specific project at hand we require Java 7.

提交回复
热议问题