File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,33 @@ function downloadServerImpl() {
144144
145145function buildServerImpl ( ) {
146146 fs . rmSync ( './server' , { recursive : true , force : true } ) ;
147- cp . execSync ( mvnw ( ) + ' clean package -DskipTests=true' , {
148- cwd : BAZEL_ECLIPSE_DIR ,
149- stdio : [ 0 , 1 , 2 ] ,
150- } ) ;
147+ const jdtlsJar = fs
148+ . readdirSync (
149+ BAZEL_ECLIPSE_DIR + '/releng/p2repository/target/repository/plugins/'
150+ )
151+ . find (
152+ ( file ) =>
153+ file . startsWith ( 'com.salesforce.bazel.eclipse.jdtls' ) &&
154+ file . endsWith ( '.jar' )
155+ ) ;
156+
157+ if ( jdtlsJar ) {
158+ console . log (
159+ 'NOTE: skipping build and re-using existing "' +
160+ jdtlsJar +
161+ '" from ../bazel-eclipse/releng/p2repository/target/repository/plugins'
162+ ) ;
163+ } else {
164+ cp . execSync ( mvnw ( ) + ' clean package -DskipTests=true' , {
165+ cwd : BAZEL_ECLIPSE_DIR ,
166+ stdio : [ 0 , 1 , 2 ] ,
167+ } ) ;
168+ }
151169 gulp
152170 . src (
153- BAZEL_ECLIPSE_DIR + '/releng/p2repository/target/repository/plugins/*.jar'
171+ BAZEL_ECLIPSE_DIR +
172+ '/releng/p2repository/target/repository/plugins/*.jar' ,
173+ { encoding : false } // prevent gulp from reading the content as it's not needed
154174 )
155175 . pipe ( DROP_JAR_VERSION )
156176 . pipe ( jarIsIncludedInPackageJson )
You can’t perform that action at this time.
0 commit comments