bbstilson / sbt-codeartifact

An sbt plugin for publishing packages to AWS CodeArtifact.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid name for a Snapshot build asset

plmuninn opened this issue · comments

Hi,

I'm trying to use this plugin for publishing package and everything works good beside of publishing SNAPHSOT versions. DO anyone had issue like this? Or could help me with it?

Would you mind sharing your build file? I would be happy to take a look and try to reproduce the problem.

I will add it shortly today

Hi,
I was also recently trying to publish some SNAPSHOT version of Maven package to CodeArtifact using sbt-codeartifact. I came across the same issue. I did some debugging and here's what I found. As far as I understand this plugin doesn't support publishing SNAPSHOT versions.

  • First of all the names of published assets are wrong in case of snapshots. They should be published in the following format: <package_name>-<version_without_snapshot>-<timestamp(yyyyMMdd.HHmmss)>-<buildNumber>-<optional_classifier>.<extension (pom/jar)>.

  • Secondly the format of maven-metadata.xml is completely wrong for SNAPSHOT versions. The second example of maven-metadata.xml file under this link: example of maven-metadata.xml shows a correct form of this file for SNAPSHOT version.

Here's a screenshot from my debugging session showing that CodeArtifact returned 400 because of wrong asset name for SNAPSHOT version of a package.
sbt-codeartifact-400

Is there a chance of adding this case to the plugin?

Thanks for the details. I'll take a look at this tonight after work.

Quick update: I haven't solved this yet. I've made some progress, but work/life has been busy. I'll keep at it as time allows.

Is there any update on this issue? It is really an important feature.

I'm sorry, my new job has kept me very busy, and I don't foresee having time to address this. Please feel free to submit a PR. I will be happy to review it.

when publishing, i am getting my Scala version appended to the package name example: myRepository:myPackageName_myScalaVersion how to remove the _myScalaVersion