Skip to content
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

[1.3.x] support UNC path #338

Merged
merged 2 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ before_install:
- source "$HOME/.sdkman/bin/sdkman-init.sh"

install:
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1)
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1) || true
- bin/fixpreloaded.sh
- unset JAVA_HOME
- java -Xmx32m -version
# detect sbt version from project/build.properties
- export TRAVIS_SBT=$(grep sbt.version= project/build.properties | sed -e 's/sbt.version=//g' ) && echo "sbt $TRAVIS_SBT"
# - export TRAVIS_SBT=1.3.3
- sdk install sbt $TRAVIS_SBT
- sdk install sbt $TRAVIS_SBT || true
# override Travis CI's SBT_OPTS
- unset SBT_OPTS
- export JAVA_OPTS="-Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M"
Expand Down
8 changes: 6 additions & 2 deletions core/src/main/scala/sbt/librarymanagement/ResolverExtra.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package sbt.librarymanagement

import java.io.{ IOException, File }
import java.net.URL
import java.net.{ URI, URL }
import scala.xml.XML
import org.xml.sax.SAXParseException
import sbt.util.Logger
Expand Down Expand Up @@ -304,9 +304,13 @@ private[librarymanagement] abstract class ResolverFunctions {

/** Constructs a file resolver with the given name and base directory. */
def apply(name: String, baseDirectory: File)(implicit basePatterns: Patterns): FileRepository =
baseRepository(new File(baseDirectory.toURI.normalize).getAbsolutePath)(
baseRepository(
new File(toUri(baseDirectory).normalize.getSchemeSpecificPart).getAbsolutePath
)(
FileRepository(name, defaultFileConfiguration, _)
)

private def toUri(dir: File): URI = dir.toPath.toUri
}
object url {

Expand Down