SAP-archive / cloud-s4-sdk-pipeline-lib

The SAP Cloud SDK pipeline library defines essential functions for building cloud extension applications. The SAP Cloud SDK pipeline uses this library.
Apache License 2.0
27 stars 22 forks source link

"classifier" not considered for Nexus artifact upload #11

Closed ionescuv closed 6 years ago

ionescuv commented 6 years ago

When uploading artifacts to nexus only groupID, artifactID and version are considered. As a result, if I try to create 2 .jars (having different classifiers, but same groupID, artifactID, version), they appear to be duplicates since the classifier is not considered.

Best regards Victor

daniel-kurzynski commented 6 years ago

Thanks for the input. Do you want to deploy both jars or just one of them. E.g., if there is a standard one without classifier, only this one?

ionescuv commented 6 years ago

I would like to deploy both. I am trying to integrate Spring-Cloud-Contract, which generates an additional .jar containing wiremock stubs for all services.

daniel-kurzynski commented 6 years ago

Implemented in https://github.com/SAP/cloud-s4-sdk-pipeline-lib/commit/74417eedb7e558aeb4a4f00aa0e4fc885710f47d

You have to adapt the pipeline_config.yml in the following way:

Example

artifactDeployment:
  nexus:
    version: nexus2
    url: nexus.mycorp:8080/nexus
    repository: snapshots
    additionalClassifiers:
      - type: jar
        classifier: classes

The field additionalClassifiers is a list. Each item is an artifact with a classifier which should be deployed. Type is the packaging type. We expect the artifact to be named as artifactId-classifier.type

Hope that help. Best regards,

Daniel

ionescuv commented 6 years ago

Just what we needed, thanks! Victor