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

后端 未结 6 677
一整个雨季
一整个雨季 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:45

    I'm going to give Rich the credit for pointing me in the right direction, but wanted to post the solution that worked for me as Rich's was slightly off:

    My jar-assembly.xml looked like this which allowed the assembly id to change for the region which was stored as an property in my profile:

    
      ${env}-full
        
          jar
        
        false
        
          
            true
            runtime
          
        
        
          
            ${project.build.outputDirectory}
          
        
    
    

    I did not use the finalName parameter in the maven-assembly-plugin settings as this built my project with my project-name-version-env-full.jar name where env-full was the classifier.

    Imagine my surprise when I learned the assembly xml could be parameterized by items in the build. This was exactly what I was looking for.

提交回复
热议问题