Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNAPSHOT artifacts are missing alpha in the name. #275

Closed
breedx-splk opened this issue Mar 12, 2024 · 4 comments
Closed

SNAPSHOT artifacts are missing alpha in the name. #275

breedx-splk opened this issue Mar 12, 2024 · 4 comments
Labels

Comments

@breedx-splk
Copy link
Contributor

Maybe we don't care too much since you already have to jump through hoops to use the SNAPSHOT builds, but there is definitely an inconsistency. I think we should include alpha in the SNAPSHOT filenames as well.

Here's an example:
https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/android/agent/maven-metadata.xml

<metadata>
  <groupId>io.opentelemetry.android</groupId>
  <artifactId>agent</artifactId>
  <versioning>
    <latest>0.5.0-SNAPSHOT</latest>
    <versions>
      <version>0.5.0-SNAPSHOT</version>
    </versions>
    <lastUpdated>20240312081534</lastUpdated>
  </versioning>
</metadata>
@breedx-splk
Copy link
Contributor Author

Hmmm, maybe this isn't still an issue, just an artifact of the multi-step project reorg?
https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/android/android-agent/

@marandaneto
Copy link
Member

marandaneto commented Mar 13, 2024

sonatype should not have SNAPSHOT artifacts, they have a different repository for that.
edit: nvm, your link points to the snapshots repo already
https://central.sonatype.org/publish/publish-guide/#accessing-repositories

what I usually do/did is that I don't publish snapshots in the snapshot repository but I publish semver builds in the stable repository with suffixes (alpha, beta, RC, stable).
Also, check this recommendation for the suffixes https://publicobject.com/2019/12/18/naming-versions/ otherwise you might get the wrong version as the latest stable version (sorting issue).

@LikeTheSalad
Copy link
Contributor

LikeTheSalad commented Mar 14, 2024

I think this happens to all the modules except the android-agent one, because the logic to append "-alpha" is added only there:

version = project.version.toString().replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")

So I think it should be a matter of moving that logic to the convention scripts to cover all other modules as well.

@breedx-splk
Copy link
Contributor Author

Fixed in #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants