Repository: scala-steward-org/scala-steward (scala)

Issue:
Incorrect pr sent in for an artifact found in test code
I have a small Maven project that as part of the tests checks to see what jars exist in a module. Steward today sent in a PR to update one of those jar versions even though it's not defined anywhere that I'm using this. Plus this is just code inside of one of my Scala files that I don't believe Steward should be touching unless it was somehow linked to my build definition. You can see the example of the pull request here in [scalacenter/bloop-maven-plugin](https://github.com/scalacenter/bloop-maven-plugin/pull/33).

- For context the job that created the pr can be found [here](https://github.com/scalacenter/steward/actions/runs/3681007721/jobs/6227224990). 
- Steward version - `v0.16.1`

Pull request description:
Fixes #2819

Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/MavenAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/MavenAlg.scala
index e54ec8946d..499a96c856 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/MavenAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/MavenAlg.scala
@@ -42,7 +42,7 @@ final class MavenAlg[F[_]](config: Config)(implicit
     for {
       buildRootDir <- workspaceAlg.buildRootDir(buildRoot)
       dependenciesRaw <- exec(
-        mvnCmd(command.listDependencies),
+        mvnCmd(command.listDependencies, args.excludeTransitive),
         buildRootDir
       )
       repositoriesRaw <- exec(
diff --git a/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/command.scala b/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/command.scala
index 1784c463fa..c0b84de400 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/command.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/buildtool/maven/command.scala
@@ -20,3 +20,7 @@ object command {
   val listDependencies = "dependency:list"
   val listRepositories = "dependency:list-repositories"
 }
+
+object args {
+  val excludeTransitive = "-DexcludeTransitive=true"
+}


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/buildtool/maven/MavenAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/buildtool/maven/MavenAlgTest.scala
index bffafe7662..e0a3c3ece8 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/buildtool/maven/MavenAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/buildtool/maven/MavenAlgTest.scala
@@ -25,7 +25,8 @@ class MavenAlgTest extends FunSuite {
           "--env=VAR2=val2",
           "mvn",
           "--batch-mode",
-          command.listDependencies
+          command.listDependencies,
+          args.excludeTransitive
         ),
         Cmd(
           repoDir.toString,