Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
<metadata>
  <groupId>org.codehaus.mojo</groupId>
  <plugins>
    <plugin>
      <prefix>myPlugin</prefix>
      <artifactId>myPlugin-maven-plugin</artifactId>
    </plugin>
  </plugins>
</metadata>

Local metadata storage

As changes made locally may need to be merged with the remote version, they will be stored in maven-metadata-local.xml alongside the other file which is downloaded from the remote repository (when newer).

maven-metadata-local.xml will be merged with maven-metadata.xml with the local changes being considered newer regardless of time. If this later becomes an issue we can timestamp each entry.

This means that multiple local changes can be made, but when it comes to deploy one, all that is needed is:

  • check maven-metadata.xml is up to date
  • update maven-metadata.xml
  • deploy maven-metadata.xml
  • remove entry from maven-metadata-local.xml

For removals, they should be removed from maven-metadata.xml directly in the local repository. This will not be overwritten until the remote file changes so is persistent long enough and avoids having to have "deleted" semantics in maven-metadata-local.xml.