private final MapSerializer<String, String> attributesSerializer = new MapSerializer<String, String>(STRING_SERIALIZER, STRING_SERIALIZER);
public void write(Encoder encoder, ModuleComponentArtifactIdentifier value) throws Exception {
DefaultModuleComponentArtifactIdentifier artifact = (DefaultModuleComponentArtifactIdentifier) value;
componentIdentifierSerializer.write(encoder, artifact.getComponentIdentifier());
IvyArtifactName ivyArtifactName = artifact.getName();
encoder.writeString(ivyArtifactName.getName());
encoder.writeString(ivyArtifactName.getType());
encoder.writeNullableString(ivyArtifactName.getExtension());
attributesSerializer.write(encoder, ivyArtifactName.getAttributes());
}