Maven: specify the outputDirectory only for packaging a jar?

前端 未结 4 1848
不知归路
不知归路 2020-11-29 23:28

How can I specify the outputDirectory only for packaging a jar?

http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html this shows all parameters, but how can

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 00:10

    If you wish copy dependency jars as well to a target folder, use maven-dependency-plugin.

    
      ...
      ...
    
          
            
              
                maven-dependency-plugin
                
                  
                    install
                    
                      copy-dependencies
                    
                    
                      ${project.build.directory}/lib
                    
                  
                
              
            
          
    
    
    

提交回复
热议问题