Maven : How to avoid version appended to a war file in Maven?

前端 未结 4 1405
梦毁少年i
梦毁少年i 2020-12-31 12:52

I am using Maven as the build file , this is my below settings for the war file name to be generated

I am using Maven version 2.2.1

     

        
相关标签:
4条回答
  • 2020-12-31 13:26

    You can avoid the version appeneded to the war file name by doing a "clean compile package" instead of "clean install".

    0 讨论(0)
  • 2020-12-31 13:37

    Just add this to your pom.xml:

    <build>
        <finalName>TataWeb</finalName>
    </build>
    
    0 讨论(0)
  • 2020-12-31 13:40

    well, its not the Maven Way. Maven does have a version attribute.. use it.

    0 讨论(0)
  • 2020-12-31 13:47

    You should use your artifactid, rather than hard-coding the file name.

    <build>
      <finalName>${project.artifactId}</finalName>
    </build> 
    
    0 讨论(0)
提交回复
热议问题