From f15062100869ebc37d8ce092b106e348762c98a5 Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Mon, 15 Nov 2021 17:52:36 +0800 Subject: [PATCH] fix: fix bugs in build.gradle fix task errors in build.gradle --- build.gradle | 11 +++++------ .../bdserver/testLucene/WordSegmentationTest.java | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 1cb6a60..b66058d 100644 --- a/build.gradle +++ b/build.gradle @@ -79,7 +79,7 @@ task copyLibs(type: Copy, dependsOn: ["copyScript", 'copySsl']) { // commandLine "cp", "./build/libs/$project.name-$version" + ".jar", "./build/output/bdcluster.jar" //} -task copyJar(type: Copy, dependsOn: [":front-cluster:jar", ":front-cluster:copyLibs"]) { +task copyJar(type: Copy, dependsOn: ["jar", "copyLibs"]) { from "./build/libs/$project.name-${project.version}.jar" into "./build/output" rename { String fileName -> "bdcluster.jar" } @@ -99,15 +99,14 @@ task copyWebContent(type: Copy) { into "./build/output/WebContent" } -task buildBDServerClusterZip(type: Zip, dependsOn: [":front-cluster:copyWebContent", ":front-cluster:copyScript", - ":front-cluster:copyJar"]) { +task buildBDServerClusterZip(type: Zip, dependsOn: ["copyWebContent", "copyScript", "copyJar"]) { from './build/output/' duplicatesStrategy = DuplicatesStrategy.INCLUDE archiveFileName = 'bdserver-cluster.zip' destinationDirectory = file('build/') } -task buildBDClusterZip(type: Zip, dependsOn: [":front-cluster:buildBDServerClusterZip"]) { +task buildBDClusterZip(type: Zip, dependsOn: ["buildBDServerClusterZip"]) { from('./build/output/') { include("libs/*") include("bdcluster.jar") @@ -117,14 +116,14 @@ task buildBDClusterZip(type: Zip, dependsOn: [":front-cluster:buildBDServerClust destinationDirectory = file('build/') } -task buildWebContentZip(type: Zip, dependsOn: [":front-cluster:copyWebContent"]) { +task buildWebContentZip(type: Zip, dependsOn: ["copyWebContent"]) { from "./build/output/WebContent" duplicatesStrategy = DuplicatesStrategy.INCLUDE archiveFileName = 'ClusterWebContent.zip' destinationDirectory = file('build/') } -task buildBundle(dependsOn: [":front-cluster:buildBDClusterZip", ":front-cluster:buildWebContentZip"]) { +task buildBundle(dependsOn: ["buildBDClusterZip", "buildWebContentZip"]) { doLast { println "buildBundle in ./build/output/ successfully" } diff --git a/src/test/java/org/bdware/bdserver/testLucene/WordSegmentationTest.java b/src/test/java/org/bdware/bdserver/testLucene/WordSegmentationTest.java index 5bd2485..5c7bc6a 100644 --- a/src/test/java/org/bdware/bdserver/testLucene/WordSegmentationTest.java +++ b/src/test/java/org/bdware/bdserver/testLucene/WordSegmentationTest.java @@ -3,10 +3,12 @@ package org.bdware.bdserver.testLucene; import org.bdware.server.nodecenter.MetaIndexAction; import org.junit.Test; +import java.io.IOException; + public class WordSegmentationTest { @Test - public void go(){ + public void go() throws IOException { MetaIndexAction i = new MetaIndexAction(); - i.segmentWord(null,null); + i.segmentWord(null, null); } }