Is it possible to rename a maven jar-with-dependencies?

后端 未结 6 668
一整个雨季
一整个雨季 2021-01-29 19:47

I\'m currently using the jar-with-dependencies assembly to create such a jar. However, the name of my jar is a bit long.

Since this jar is being used by RPG programs

6条回答
  •  日久生厌
    2021-01-29 20:33

    I think I've found a way to configure this directly in the pom without needing a separate jar-assembly.xml.

    It's basically the same as Rich's answer, except the finalName is specified with the artifactId and version.

    
        maven-assembly-plugin
        
            
                jar-with-dependencies
            
            ${project.artifactId}-${project.version}-full
            false
            
                
                    com.mycompany.MyMainClass
                
            
        
        
            
                make-my-jar-with-dependenciess
                package
                
                    single
                
            
        
    
    

提交回复
热议问题