From b7ba8d98d5eec7a98c73d177cd44a2a9d9048d9d Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Tue, 10 May 2016 14:07:38 +0200 Subject: [PATCH] Don't restrict Maven property name characters too much Fixes https://github.com/alexarchambault/coursier/issues/246 --- core/shared/src/main/scala/coursier/core/Resolution.scala | 2 +- .../src/test/scala/coursier/test/ResolutionTests.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/shared/src/main/scala/coursier/core/Resolution.scala b/core/shared/src/main/scala/coursier/core/Resolution.scala index 1762db013f..a8a031d50d 100644 --- a/core/shared/src/main/scala/coursier/core/Resolution.scala +++ b/core/shared/src/main/scala/coursier/core/Resolution.scala @@ -71,7 +71,7 @@ object Resolution { } val propRegex = ( - quote("${") + "([a-zA-Z0-9-.]*)" + quote("}") + quote("${") + "([^" + quote("{}") + "]*)" + quote("}") ).r def substituteProps(s: String, properties: Map[String, String]) = { diff --git a/tests/shared/src/test/scala/coursier/test/ResolutionTests.scala b/tests/shared/src/test/scala/coursier/test/ResolutionTests.scala index a47c54967e..87a2dc1e02 100644 --- a/tests/shared/src/test/scala/coursier/test/ResolutionTests.scala +++ b/tests/shared/src/test/scala/coursier/test/ResolutionTests.scala @@ -34,11 +34,11 @@ object ResolutionTests extends TestSuite { Project(Module("acme", "play"), "2.4.1", dependencies = Seq( - "" -> Dependency(Module("acme", "play-json"), "${playJsonVersion}"), - "" -> Dependency(Module("${project.groupId}", "${configName}"), "1.3.0")), + "" -> Dependency(Module("acme", "play-json"), "${play_json_version}"), + "" -> Dependency(Module("${project.groupId}", "${WithSpecialChar©}"), "1.3.0")), properties = Seq( - "playJsonVersion" -> "2.4.0", - "configName" -> "config")), + "play_json_version" -> "2.4.0", + "WithSpecialChar©" -> "config")), Project(Module("acme", "play-extra-no-config"), "2.4.1", Seq(