Closed terencenmnpan closed 1 year ago
thanks @terencenmnpan , good point. I think you're right but I'm not 100% sure. Can you pls point to some documentation that clarifies that? I found this but I was unable to find something on the inclusion of plugins on the pom.xml file in that docs.. maybe I missed it.
some other refs:
maven dependency is used when we want to be able to call the library in our code through the classpath. In your case, the xray maven plugin is generally not used to be called in code, but rather used in the build lifecycle with maven to perform a task. We are using your plugin to do the task: send the cucumber report to jira.
In the first stackoverflow article you linked: "But the difference between them is, most of the work in maven is done using plugins; whereas dependency is just a Jar file which will be added to the classpath while executing the tasks."
If you put your plugin in the dependency, nothing will be done in the maven lifecycle. Now if we put your plugin as a plugin, then we can call the goal that will perform our task: mvn xray:import-results
Actually the examples you have are working like this one, the readme file just differs for some reason from the examples: https://github.com/Xray-App/xray-maven-plugin/blob/main/examples/cloud/pom.xml.sample
Thanks @terencenmnpan , will fix that
fixed
snippet from readme:
I think it should be like: