How to print the actual MAVEN_OPTIONS that are being used?

后端 未结 5 1198
一个人的身影
一个人的身影 2021-02-20 03:35

Is there a way to get maven to output the value of environment and maven variables during a build? This would be very useful for debugging things when they\'re going wrong.

5条回答
  •  野的像风
    2021-02-20 04:13

    Add this plugin under plugins section in pom.xml and use mvn validate :

    
      org.apache.maven.plugins
      maven-antrun-plugin
      1.1
      
        
          validate
          
            run
          
          
            
              Displaying value of system variables
               ${env.YOUR_ENVIRONMENT_VARIABLE_NAME}
            
          
        
      
    
    

    This will print your env variable value.

提交回复
热议问题