LPS-46537: Fix Build. Only copy the sonatype properties and the ivy properties if these properties are defined.