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

By default, let Maven download Allure Command Line (fixes #141) #142

Merged
merged 1 commit into from
May 10, 2021
Merged

By default, let Maven download Allure Command Line (fixes #141) #142

merged 1 commit into from
May 10, 2021

Conversation

TobiX
Copy link
Contributor

@TobiX TobiX commented Nov 30, 2020

Since this is a Maven plugin, we can reasonably expect that the user
already has configured maven correctly to reach Maven Central (or other
repositories) in some way. Therefore, instead of trying to deduce a way
to download our commandline tools from Maven settings, just ask Maven
kindly to do the download for us.

Context

Since Allure has been available from Maven Central for quite a while, it should be less of a hassle for most users to just let Maven deal with the downloading of the command line artifact. The old code is still left as-is, but only gets used if the allureDownloadUrl is specified at all.

Additionally, this drops the embedded copy of allure-commandline, which makes this plugin quite a bit lighter.

WARNING: This breaks compatibility with Allure < 2.8.0 when not specifying <allureDownloadUrl>https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/%s/allure-%s.zip</allureDownloadUrl> in the plugin configuration, but I consider this a minor problem, since that version is quite old nowadays.

Checklist

  • Sign Allure CLA
  • Provide unit tests (existing ITs adapted to the new feature)

@baev
Copy link
Member

baev commented Dec 1, 2020

So far looks good for me 👍

WARNING: This breaks compatibility with Allure < 2.8.0 when not specifying <allureDownloadUrl>https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/%s/allure-%s.zip</allureDownloadUrl> in the plugin configuration, but I consider this a minor problem, since that version is quite old nowadays.

We can fix that with additional if condition, isn't?

@TobiX
Copy link
Contributor Author

TobiX commented Dec 1, 2020

@baev Yeah. This was just the basic "works-for-me" implementation. I'm just not sure if supporting the use case "I updated the maven plugin and not the allure CLI" is really worth keeping all this backwards-compatibility code in for 😉 So I just ripped it out while developing this. But I can put it back in, no problem.

@baev
Copy link
Member

baev commented Dec 1, 2020

that would be nice. From my radar 2.7.0 is widely used these days (120k+ reports generated this week)

@TobiX
Copy link
Contributor Author

TobiX commented Dec 4, 2020

Updated to fall back to the old URL for old versions and use Maven directly for new versions.

Future enhancement idea: The groupId and artifactId of allure-cli are currently hardcoded, people might want to override that...

Since this is a Maven plugin, we can reasonably expect that the user
already has configured maven correctly to reach Maven Central (or other
repositories) in some way. Therefore, instead of trying to deduce a way
to download our commandline tools from Maven settings, just ask Maven
kindly to do the download for us.
@TobiX
Copy link
Contributor Author

TobiX commented Apr 20, 2021

@baev Ping? While rebasing this, I noticed that old release are downloaded from bintray, which will be shut down in the near future (https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). Maybe it would be a good idea to push the old releases to Central and update this downloader to always fetch from there?

@baev baev added the type:improvement Change that improves some user experience but can't be considered as a new feature label Apr 20, 2021
@baev
Copy link
Member

baev commented Apr 20, 2021

@TobiX we are migrating from bintray this week, but I'm not sure yet how we are going to deal with old releases

@baev baev merged commit deb87ce into allure-framework:master May 10, 2021
@TobiX TobiX deleted the let-maven-download branch May 10, 2021 15:26
@TobiX TobiX mentioned this pull request May 10, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement Change that improves some user experience but can't be considered as a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants