From 631f40575cdbbb3497116299903acd2d128a564d Mon Sep 17 00:00:00 2001 From: etorreborre Date: Mon, 30 Aug 2021 16:16:21 +0200 Subject: [PATCH] project: upgrade the xml dependency to 2.0.1 --- .gitignore | 2 ++ build.sbt | 15 ++++++++------- .../scala/org/specs2/guide/Installation.scala | 1 + project/depends.scala | 2 +- .../scala/org/specs2/matcher/XmlMatchers.scala | 0 .../org/specs2/matcher}/NodeFunctionsSpec.scala | 0 .../org/specs2/matcher/XmlMatchersSpec.scala | 0 7 files changed, 12 insertions(+), 8 deletions(-) rename {matcher-extra => xml}/shared/src/main/scala/org/specs2/matcher/XmlMatchers.scala (100%) rename {matcher-extra/jvm/src/test/scala/org/specs2/xml => xml/shared/src/test/scala/org/specs2/matcher}/NodeFunctionsSpec.scala (100%) rename {tests => xml/shared}/src/test/scala/org/specs2/matcher/XmlMatchersSpec.scala (100%) diff --git a/.gitignore b/.gitignore index 020c094c8f..c458e47fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .DS_Store +.project +.settings .bsp .idea **/target diff --git a/build.sbt b/build.sbt index c3fa0d6859..43293a8a26 100644 --- a/build.sbt +++ b/build.sbt @@ -171,9 +171,9 @@ lazy val examples = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(fil jsSettings(depends.jsTest, commonJsSettings). jvmSettings(depends.jvmTest, commonJvmSettings). nativeSettings(commonNativeSettings). - dependsOn(common, matcher, core, matcherExtra, junit, scalacheck, mock) + dependsOn(common, matcher, core, junit, scalacheck, mock) -lazy val examplesJVM = examples.jvm.dependsOn(analysisJVM, formJVM, gwtJVM, html, markdownJVM) +lazy val examplesJVM = examples.jvm.dependsOn(formJVM, gwtJVM, html, markdownJVM) lazy val examplesJS = examples.js lazy val examplesNative = examples.native @@ -197,7 +197,7 @@ lazy val form = crossProject(JSPlatform, JVMPlatform, NativePlatform). jvmSettings(depends.jvmTest, commonJvmSettings). jsSettings(depends.jsTest, commonJsSettings). nativeSettings(depends.nativeTest, commonNativeSettings). - dependsOn(core, markdown, matcherExtra, scalacheck % "test->test", xml) + dependsOn(core, markdown, scalacheck % "test->test", xml) lazy val formJVM = form.jvm lazy val formJS = form.js @@ -221,7 +221,7 @@ lazy val gwt = crossProject(JSPlatform, JVMPlatform, NativePlatform). jvmSettings(depends.jvmTest, commonJvmSettings). jsSettings(depends.jsTest, commonJsSettings). nativeSettings(depends.nativeTest, commonNativeSettings). - dependsOn(core, matcherExtra, scalacheck) + dependsOn(core, scalacheck) lazy val gwtJVM = gwt.jvm lazy val gwtJS = gwt.js @@ -233,7 +233,7 @@ lazy val html = project.in(file("html")). commonSettings, name := "specs2-html"). settings(depends.jvmTest, commonJvmSettings). - dependsOn(formJVM, mockJVM % Test, matcherExtraJVM % Test, scalacheckJVM % Test, xmlJVM) + dependsOn(formJVM, mockJVM % Test, scalacheckJVM % Test, xmlJVM) lazy val junit = crossProject(JSPlatform, JVMPlatform, NativePlatform).in(file("junit")). settings( @@ -291,7 +291,7 @@ lazy val matcherExtra = crossProject(JSPlatform, JVMPlatform, NativePlatform).in jsSettings(depends.jsTest, commonJsSettings). jvmSettings(depends.jvmTest, commonJvmSettings). nativeSettings(depends.nativeTest, commonNativeSettings). - dependsOn(analysis, matcher, xml, core % "test->test") + dependsOn(analysis, matcher, core % "test->test") lazy val matcherExtraJS = matcherExtra.js lazy val matcherExtraJVM = matcherExtra.jvm @@ -376,7 +376,8 @@ lazy val tests = Project(id = "tests", base = file("tests")). commonSettings, name := "specs2-tests", depends.jvmTest, - commonJvmSettings + commonJvmSettings, + publishArtifact := false, ).dependsOn( coreJVM % "compile->compile;test->test", shapelessJVM % "compile->compile;test->test", diff --git a/guide/src/test/scala/org/specs2/guide/Installation.scala b/guide/src/test/scala/org/specs2/guide/Installation.scala index 96144801cb..53a3b17083 100644 --- a/guide/src/test/scala/org/specs2/guide/Installation.scala +++ b/guide/src/test/scala/org/specs2/guide/Installation.scala @@ -69,6 +69,7 @@ Depending on the $specs2 features you want to use you will need to add more depe `specs2-html` | to export specifications as html `specs2-form` | to create html form-like specifications `specs2-junit` | to run specifications as JUnit tests + `specs2-xml` | to use xml matchers Note: the `specs2-core` jar depends on 2 other $specs2 jars: diff --git a/project/depends.scala b/project/depends.scala index 61fd9892ce..c9c34d85e7 100644 --- a/project/depends.scala +++ b/project/depends.scala @@ -44,7 +44,7 @@ object depends { scalaParser.value } - def scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.3.0" + def scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.0.1" lazy val mockito = "org.mockito" % "mockito-core" % "3.11.2" lazy val junit = "junit" % "junit" % "4.13.2" diff --git a/matcher-extra/shared/src/main/scala/org/specs2/matcher/XmlMatchers.scala b/xml/shared/src/main/scala/org/specs2/matcher/XmlMatchers.scala similarity index 100% rename from matcher-extra/shared/src/main/scala/org/specs2/matcher/XmlMatchers.scala rename to xml/shared/src/main/scala/org/specs2/matcher/XmlMatchers.scala diff --git a/matcher-extra/jvm/src/test/scala/org/specs2/xml/NodeFunctionsSpec.scala b/xml/shared/src/test/scala/org/specs2/matcher/NodeFunctionsSpec.scala similarity index 100% rename from matcher-extra/jvm/src/test/scala/org/specs2/xml/NodeFunctionsSpec.scala rename to xml/shared/src/test/scala/org/specs2/matcher/NodeFunctionsSpec.scala diff --git a/tests/src/test/scala/org/specs2/matcher/XmlMatchersSpec.scala b/xml/shared/src/test/scala/org/specs2/matcher/XmlMatchersSpec.scala similarity index 100% rename from tests/src/test/scala/org/specs2/matcher/XmlMatchersSpec.scala rename to xml/shared/src/test/scala/org/specs2/matcher/XmlMatchersSpec.scala