Maven Snapshot

Outline

Large-scale application software is generally comprised of multiple modules, generally it is multiple teams to develop the same application of different modules, which is more common scenario. For example, a team working on the application of the application user interface items ( app-ui.jar:1.0front-end) were developed, they are using data services engineering ( data-service.jar:1.0).

Now, it may be that happens, work quickly develop bug fixes or enhanced features in Data Services team developers, they almost day for the release of every library to the remote repository.

Now, if the data service teams to upload the new version, there will be the following questions:

  • Data Services team should release each time to tell the application when updating UI team, they have released updated code.
  • UI team needs to constantly update their pom.xml to obtain an updated version of the application.

To handle such cases, introduce the concept of a snapshot, and play a role.

What is a snapshot?

Snapshot (SNAPSHOT) is a special edition, pointed out that the current development copy. Unlike conventional version, Maven remote repository each generate a new snapshot version checks.

Now, data services team will be updated after each release code snapshot repository is: data-service:1.0-SNAPSHOTreplace the old SNAPSHOT jar.

Snapshot version

When using the version, if Maven download version is mentioned data-service:1.0, then it will never try to download version 1.0 has been updated in the library. To download the updated code, data-service must upgrade to version 1.1.

When using snapshot (SNAPSHOT), Maven will automatically get the latest snapshot every time the application UI team to build their own projects ( data-service:1.0-SNAPSHOT).

Guess you like

Origin www.cnblogs.com/bjio/p/11681947.html