Class MavenArtifactVersionResolver

java.lang.Object
org.axonframework.common.util.MavenArtifactVersionResolver

public class MavenArtifactVersionResolver extends Object
Artifact version resolver that uses Maven metadata to retrieve the jar version.

By default, Maven stores the meta-data in a file called 'pom.properties' in the JAR files under 'META-INF/maven/<groupId>/<artifactId>/'.

Since:
4.2.1
Author:
Sara Pellegrini
  • Constructor Details

    • MavenArtifactVersionResolver

      public MavenArtifactVersionResolver(String groupId, String artifactId, ClassLoader classLoader)
      Creates an instance to look for the version in the metadata of the artifact with given groupId and artifactId.
      Parameters:
      groupId - The groupId as defined in the pom.xml file of the module
      artifactId - The artifactId as defined in the pom.xml file of the module
      classLoader - The class loader to load the artifact configuration with
  • Method Details

    • get

      public String get() throws IOException
      Returns the specified jar version.
      Returns:
      the version in the metadata of the artifact
      Throws:
      IOException - When an exception occurs reading from the maven configuration file