Reputation: 30
Using following command(curl component API) to upload a pom file to Nexus 3 server.
curl -v -u account:password -X POST 'http://local_repo_address/service/rest/v1/components?repository='$repo -F maven2.groupId=$groupId -F maven2.artifactId=$artifactId -F maven2.version=$version -F maven2.asset1=@$=file_path -F maven2.asset1.extension=$file_type
Got 400 and following error.
[{"id":"*","message":"The provided POM file is invalid. Could not retrieve valid G:A:V parameters (com.xxx.xxx:xxx-xxx:${sdk.starter.version})"}]
Seem there is a placeholder in pom file and it's not valid for Nexus 3 component API. I tried using maven deploy instead of API and it worked.
But is there any way that i could just upload it with API calling and bypass the validation?
Upvotes: 0
Views: 1474
Reputation: 35843
If there is a property like ${sdk.starter.version}
in the version tag, it does not make sense to upload the pom file (as it is) to Nexus. You will not be able to use or reference it from anywhere if it does not have a valid version number.
Upvotes: 1