public class MavenArtifactRevisionResolver extends Object implements RevisionResolver
| Constructor and Description |
|---|
MavenArtifactRevisionResolver(String groupId,
String artifactId)
Initialize the RevisionResolver to look for the version in the Meta Data of the artifact with given
groupId and artifactId. |
MavenArtifactRevisionResolver(String groupId,
String artifactId,
ClassLoader classLoader)
Initialize the RevisionResolver to look for the version in the Meta Data of the artifact with given
groupId and artifactId. |
| Modifier and Type | Method and Description |
|---|---|
String |
revisionOf(Class<?> payloadType)
Returns the revision for the given
payloadType. |
public MavenArtifactRevisionResolver(String groupId, String artifactId) throws IOException
groupId and artifactId.
The class loader that loaded the MavenArtifactRevisionResolver class is used to load the artifact configuration.groupId - The groupId as defined in the pom.xml file of the moduleartifactId - The artifactId as defined in the pom.xml file of the moduleIOException - When an exception occurs reading from the maven configuration filepublic MavenArtifactRevisionResolver(String groupId, String artifactId, ClassLoader classLoader) throws IOException
groupId and artifactId.groupId - The groupId as defined in the pom.xml file of the moduleartifactId - The artifactId as defined in the pom.xml file of the moduleclassLoader - The class loader to load the artifact configuration withIOException - When an exception occurs reading from the maven configuration filepublic String revisionOf(Class<?> payloadType)
RevisionResolverpayloadType.
The revision is used by upcasters to decide whether they need to process a certain serialized event.
Generally, the revision needs to be modified each time the structure of an event has been changed in an
incompatible manner.revisionOf in interface RevisionResolverpayloadType - The type for which to return the revisionpayloadTypeCopyright © 2010–2023. All rights reserved.