Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Launch server with coursier
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Mar 3, 2017
1 parent 432ccfe commit 45df8ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ out/
.ensime_cache
*.vsix
*.log
scala/server/ensimeServer-assembly*
scala/server/ensimeServer-assembly*
coursier
2 changes: 1 addition & 1 deletion scala/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"vscode:prepublish": "curl -L -o coursier https://github.com/alexarchambault/coursier/raw/991b60ddbcb7d781c17a463f7af980f2dd888d4b/coursier && tsc -p ./",
"compile": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
Expand Down
7 changes: 4 additions & 3 deletions scala/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ export function activate(context: ExtensionContext) {
console.info("Adding to classpath " + toolsJar);

// The server is implemented in Scala
let assemblyPath = path.join(context.extensionPath, "./server/ensimeServer-assembly-0.1.0.jar")
console.info("Using " + assemblyPath);
let coursierPath = path.join(context.extensionPath, "./coursier")
console.info("Using coursier " + coursierPath);

console.log("Workspace location is: " + workspace.rootPath)

let javaArgs = ["-Dvscode.workspace=" + workspace.rootPath, "-cp", toolsJar + path.delimiter + assemblyPath, "org.github.dragos.vscode.Main"];
let coursierArgs = ["launch", "-r", "https://dl.bintray.com/dhpcs/maven", "-r", "sonatype:snapshots", "-J", toolsJar, "com.github.dragos:ensime-lsp_2.11:0.1.1-SNAPSHOT", "-M", "org.github.dragos.vscode.Main"];
let javaArgs = ["-Dvscode.workspace=" + workspace.rootPath, "-jar", coursierPath].concat(coursierArgs);
// The debug options for the server
let debugOptions = ["-Xdebug", "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000,quiet=y"];

Expand Down

0 comments on commit 45df8ec

Please sign in to comment.