open-component-model / ocm

Open Component Model (Software Bill of Delivery Toolset)
https://ocm.software
Apache License 2.0
29 stars 18 forks source link

fix maven issues #790

Closed fabianburth closed 1 month ago

fabianburth commented 1 month ago

Description

This PR fixes upload issues and introduces the option to upload blob during composition. So, you can now do the following: ocm add cv --file /tmp/ctf components.yaml --uploader ocm/mavenArtifact=file://localhost/mavenrepo with the components.yaml looking something like this:

components:
- name: ocm.software/demo/test
  version: 1.0.0
  provider:
    name: ocm.software
  resources:
    - name: mavenartifact
      type: mavenArtifact
      input:
        type: maven
        path: /maven/testdata/.m2/repository
        groupId: "com.sap.cloud.sdk"
        artifactId: "sdk-modules-bom"
        version: "5.7.0"

For the uploader to trigger here (and therefore, for the uploader option to be effective with this command), it is crucial that you try to add a local blob (and thus, have an input: instead of an access: in your constructor file).