-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add support for looking up optional pegdown dependency #11 #12
base: master
Are you sure you want to change the base?
Conversation
When using a recent version of scalatest the pegdown dependency is required for htmlreports. To use htmlreports add the pegdown dependency to the plugin definition in your project. <plugin> <groupId>org.scalatest</groupId> <artifactId>scalatest-maven-plugin</artifactId> <dependencies> <dependency> <groupId>org.pegdown</groupId> <artifactId>pegdown</artifactId> <version>1.4.2</version> </dependency> </dependencies> </plugin>
|
||
private List<String> getPegdownDependencies() { | ||
List<String> dependencies = new ArrayList<String>(); | ||
Artifact pegdown = pluginArtifactMap.get("org.pegdown:pegdown"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original problem is only about pegdown dependency for reporting. I think it would be better to have this solution more generic - to work with any dependencies set on the plugin level.
Please merge these changes, really need it. |
Anyone still maintaining this plugin? This is pretty useful patch for anyone who can't have direct pegdown dependency in pom. +1 for merging even though it's not "generic enought" |
Hi Tomas, Yes, we're still here. We've just been overwhelmed trying to get the 3.0 release out the door, which primarily was adding Scala.js support to ScalaTest. Issues and PRs have gotten starved for attention all last year because of that. We are getting close to a 3.0 release, but still not there quite there. Need to figure out how to do timeouts in async styles, including time limited tests, and a bit more documentation. But squeaky wheels get grease. I'll assign someone this week to have a look at the Maven plugin issues and PRs. Bill |
Can you elaborate on what the problem is that this PR addresses? We didn't put a required dependency in ScalaTest on pegdown so that it wasn't needed if people didn't use HTML reports. If they want to use HTML reports, then we expected they will just add the pegdown dependency. Please first explain the pain point that you experience that the bit of code above is intended to address. Is it the pain of adding a dependency to the project instead of having it resolved automatically by the plugin? |
The problem with pegdown is that it brings multiple dependencies which are conflicting with our versions even if we specify it as test-only dependency and enforcer complains unless we add bunch of exclusions. Our projects don't really need pegdown for anything than reporting so we shouldn't be forced to add this dependency at project level. This pull request allows us to add pegdown as plugin dependency where it logically belongs |
Thanks for clarifying the issue. I am thinking perhaps the best way to deal with the problem is to "shade" pegdown during our build. In other words, when we do a deploy, we grab the pegdown version we are depending on, change its package names to something under org.scalatest, and redeploy that as a separate jar that ScalaTest depends on. It is an extra jar for your build, but since it is just in test scope it shouldn't really matter. But you tell me. That way we could make it a required dependency, so it is easy for folks, or just leave it optional. In either case you shouldn't have any more troubles with version mismatch. Does that sound like it would address the pain point you have? Thanks. Bill (By the way, pegdown is released under the same Apache 2.0 license that ScalaTest is released under, which would allow this kind of "copying".) |
It's been sometime, so just wanted to see if it is still relevant. If it is, please resolve conflicts and tag me on the comment. Thank you. |
@cla-bot[bot] check |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Bernard Leach.
|
The cla-bot has been summoned, and re-checked this pull request! |
Just fyi, I have submitted a PR to use commonmark which has 0 dependency: Hopefully it will be alternative solution for this. |
When using a recent version of scalatest the pegdown dependency
org.scalatest scalatest-maven-plugin org.pegdown pegdown 1.4.2is required for htmlreports. To use htmlreports add the pegdown
dependency to the plugin definition in your project.