I manage my allure dependencies in a stand alone reporting library to better manage allure versions across multiple test projects. I've found that when I generate a report using allure-maven-plugin (mvn allure:report) that the report isn't generated as expected
What I mean by dependency inheritance is this..
pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
With allure-testng-adapter defined through an indirect dependency, I get the following output when generating the report,. Notice that the version is reported as RELEASE.
[INFO] --- allure-maven-plugin:2.5:report (default-cli) @ example-test-pom ---
[INFO] Generate Allure report (report) with version RELEASE
[INFO] Generate Allure report to S:\git\example\site\allure-maven-plugin
[INFO] Found results directory S:\git\example\target\allure-results
If I place a direct dependency on allure-testng-adapter...
pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
└ allure-testng-adapter-1.4.23
and I run the same report command, I get the output I expect. Notice the version is now properly set as my dependency version 1.4.23.
[INFO] --- allure-maven-plugin:2.5:report (default-cli) @ honeypot-test-pom ---
[INFO] Generate Allure report (report) with version 1.4.23
[INFO] Generate Allure report to S:\git\example\site\allure-maven-plugin
[INFO] Found results directory S:\git\example\target\allure-results
To be honest, I'm not sure if this issue is due to a Maven quirk, allure-maven-plugin, or allure-testng-adapter. I have found that if I define the version in a parent pom the report is created as expected (the version is noted properly, instead of RELEASE).
parent-pom
└ allure-testng-adapter-1.4.23
└ pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
This makes sense as effective POM contains all the defined dependencies. However, this still forces me to manage the version in two different projects; where I'd prefer to manage the allure version in a single project.
Should the report be properly generated if the allure jars are inherited indirectly, or is this behavior expected?