Skip to content

Commit

Permalink
move files to renamed directory
Browse files Browse the repository at this point in the history
  • Loading branch information
abelhegedus committed Nov 25, 2019
1 parent c99c37b commit 300bff1
Show file tree
Hide file tree
Showing 9 changed files with 741 additions and 534 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Run the crawler

1. Download `vhci.modelaccess.twc.rest-<version>-all.jar` from [GitHub releases](https://github.com/IncQueryLabs/repo-crawler/releases)
1. `java -jar vhci.modelaccess.twc.rest-<version>-all.jar <args>` with arguments (see below)
1. Download `twc.repo-crawler-<version>-all.jar` from [GitHub releases](https://github.com/IncQueryLabs/repo-crawler/releases)
1. `java -jar twc.repo-crawler-<version>-all.jar <args>` with arguments (see below)

## Example arguments

Expand All @@ -26,7 +26,7 @@ Running the jar without arguments prints out the usage instructions.
1. Install `IntelliJ IDEA` with kotlin plugin.
1. Open IntelliJ IDEA and open project. `File -> Open.. -> <project_path>` (Select `Gradle` if needed.)
1. `Build -> Build Project`
1. `Run -> Run... -> com.incquerylabs.vhci.modelaccess.twc.rest.Crawler.kt` (set arguments in Configuration)
1. `Run -> Run... -> com.incquerylabs.twc.repo.crawler.Crawler.kt` (set arguments in Configuration)

### Gradle

Expand All @@ -35,4 +35,4 @@ Running the jar without arguments prints out the usage instructions.
### Shadow Jar

1. `./gradlew shadowJar`
1. `java -jar build/libs/vhci.modelaccess.twc.rest-<version>-all.jar <args>` with arguments (see above)
1. `java -jar build/libs/twc.repo-crawler-<version>-all.jar <args>` with arguments (see above)
4 changes: 2 additions & 2 deletions com.incquerylabs.vhci.modelaccess.twc.rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ compileTestKotlin {
}

application {
mainClassName = 'com.incquerylabs.vhci.modelaccess.twc.rest.CrawlerKt'
mainClassName = 'com.incquerylabs.twc.repo.crawler.CrawlerKt'
}

vertx {
launcher = 'com.incquerylabs.vhci.modelaccess.twc.rest.CrawlerKt'
launcher = 'com.incquerylabs.twc.repo.crawler.CrawlerKt'
}

wrapper {
Expand Down
2 changes: 1 addition & 1 deletion com.incquerylabs.vhci.modelaccess.twc.rest/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'vhci.modelaccess.twc.rest'
rootProject.name = 'twc.repo-crawler'

Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.incquerylabs.vhci.modelaccess.twc.rest
package com.incquerylabs.twc.repo.crawler

import com.incquerylabs.vhci.modelaccess.twc.rest.data.*
import io.vertx.core.Vertx
import io.vertx.core.json.Json
import io.vertx.core.json.JsonObject
import com.incquerylabs.vhci.modelaccess.twc.rest.verticles.MainVerticle
import com.incquerylabs.vhci.modelaccess.twc.rest.verticles.RESTVerticle
import com.incquerylabs.twc.repo.crawler.data.*
import com.incquerylabs.twc.repo.crawler.verticles.MainVerticle
import com.incquerylabs.twc.repo.crawler.verticles.RESTVerticle
import io.vertx.core.DeploymentOptions
import io.vertx.core.cli.Argument
import io.vertx.core.Vertx
import io.vertx.core.cli.CLI
import io.vertx.core.cli.Option
import io.vertx.core.json.Json
import io.vertx.core.json.JsonObject
import java.io.File


Expand Down Expand Up @@ -137,19 +136,19 @@ fun main(args: Array<String>) {
}
if (workspaceId != null) {
println("Workspace ID set to $workspaceId")
twcMap[DataConstants.WORKSPACE_ID] = workspaceId
twcMap[WORKSPACE_ID] = workspaceId
}
if (resourceId != null) {
println("Resource ID set to $resourceId")
twcMap[DataConstants.RESOURCE_ID] = resourceId
twcMap[RESOURCE_ID] = resourceId
}
if (branchId != null) {
println("Branch ID set to $branchId")
twcMap[DataConstants.BRANCH_ID] = branchId
twcMap[BRANCH_ID] = branchId
}
if (revision != null) {
println("Revision set to $revision")
twcMap[DataConstants.REVISION] = revision.toInt()
twcMap[REVISION] = revision.toInt()
}


Expand All @@ -158,7 +157,13 @@ fun main(args: Array<String>) {
File("server.config").createNewFile()
}

File("server.config").writeText(Json.encode(Server(serverOpt, portOpt.toInt(), isSslEnabled)))
File("server.config").writeText(Json.encode(
Server(
serverOpt,
portOpt.toInt(),
isSslEnabled
)
))
twcMap["server_path"] = serverOpt
twcMap["server_port"] = portOpt.toInt()
twcMap["server_ssl"] = isSslEnabled
Expand Down Expand Up @@ -207,7 +212,12 @@ fun main(args: Array<String>) {
"Basic ${java.util.Base64.getEncoder().encodeToString("${usr}:${pswd}".toByteArray())}"
twcMap["username"] = usr

vertx.deployVerticle(MainVerticle(usr, pswd)) { deploy ->
vertx.deployVerticle(
MainVerticle(
usr,
pswd
)
) { deploy ->
if (deploy.failed()) {
error("Deploy failed: ${deploy.cause().message}\n${deploy.cause().printStackTrace()}")
}
Expand Down

This file was deleted.

Loading

0 comments on commit 300bff1

Please sign in to comment.