Maven: how to copy artifact to specific directory?

前端 未结 4 865
北海茫月
北海茫月 2021-01-01 11:33

The \"install\" goal copies the artifact to the target directory and to the local repository.

How can I tell Maven to copy it also to a given directory

4条回答
  •  被撕碎了的回忆
    2021-01-01 12:01

    According to http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html you can copy the just built artifact to a specific directory:

    
        [...]
        
          
            
              org.apache.maven.plugins
              maven-dependency-plugin
              2.8
              
                
                  copy-installed
                  install
                  
                    copy
                  
                  
                    
                      
                        ${project.groupId}
                        ${project.artifactId}
                        ${project.version}
                        ${project.packaging}
                      
                    
                    some-other-place
                  
                
              
            
          
        
        [...]
      
    

提交回复
热议问题