Fix CI build to publish pom file

Add a conditional configuration of artifactoryPublish to pick up the publication
configured by maven-publish task.