What exactly is a Maven Snapshot and why do we need it?

前端 未结 13 2481
名媛妹妹
名媛妹妹 2020-11-22 07:07

I am a bit confused about the meaning of a Maven Snapshot and why we build one?

13条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 07:25

    A Maven SNAPSHOT is an artifact created by a Maven build and pretends to help developers in the software development cycle. A SNAPSHOT is an artifact (or project build result ) that is not pretended to be used anywhere, it's only a temporarily .jar, ear, ... created to test the build process or to test new requirements that are not yet ready to go to a production environment. After you are happy with the SNAPSHOT artifact quality, you can create a RELEASE artifact that can be used by other projects or can be deployed itself.

    In your project, you can define a SNAPSHOT using the version element in the pom.xml file of Maven:

    example.project.maven
    MavenEclipseExample
    0.0.1-SNAPSHOT
    jar
    Maven pom example
    

    If you want to understand better Maven you can look into these articles too:

    https://connected2know.com/programming/menu-maven-articles/

提交回复
热议问题