In Maven, how output the classpath being used?

后端 未结 7 1322
庸人自扰
庸人自扰 2020-12-12 23:31

For my current purposes I have a Maven project which creates a war file, and I want to see what actual classpath it is using when creating the war.

7条回答
  •  佛祖请我去吃肉
    2020-12-13 00:21

    To get the classpath all by itself in a file, you can:

    mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
    

    Or add this to the POM.XML:

    
      [...]
      
        
          
            org.apache.maven.plugins
            maven-dependency-plugin
            2.9
            
              
                build-classpath
                generate-sources
                
                  build-classpath
                
                
                  
                
              
            
          
        
      
      [...]
    
    

    From: http://maven.apache.org/plugins/maven-dependency-plugin/usage.html

提交回复
热议问题