xref: /Lucene/lucene/distribution/src/binary-release/bin/luke.cmd (revision 72ba7ae2eed4e69ed5015b51ea9d69009bc82bd4)
1627ef4d4SDawid Weiss@rem Licensed to the Apache Software Foundation (ASF) under one or more
2627ef4d4SDawid Weiss@rem contributor license agreements.  See the NOTICE file distributed with
3627ef4d4SDawid Weiss@rem this work for additional information regarding copyright ownership.
4627ef4d4SDawid Weiss@rem The ASF licenses this file to You under the Apache License, Version 2.0
5627ef4d4SDawid Weiss@rem the "License"); you may not use this file except in compliance with
6627ef4d4SDawid Weiss@rem the License.  You may obtain a copy of the License at
7627ef4d4SDawid Weiss@rem
8627ef4d4SDawid Weiss@rem     http://www.apache.org/licenses/LICENSE-2.0
9627ef4d4SDawid Weiss@rem
10627ef4d4SDawid Weiss@rem Unless required by applicable law or agreed to in writing, software
11627ef4d4SDawid Weiss@rem distributed under the License is distributed on an "AS IS" BASIS,
12627ef4d4SDawid Weiss@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13627ef4d4SDawid Weiss@rem See the License for the specific language governing permissions and
14627ef4d4SDawid Weiss@rem limitations under the License.
15627ef4d4SDawid Weiss
16627ef4d4SDawid Weiss@echo off
17627ef4d4SDawid Weiss
18627ef4d4SDawid WeissSETLOCAL
19627ef4d4SDawid WeissSET MODULES=%~dp0..
20*72ba7ae2SDawid Weiss
21*72ba7ae2SDawid WeissREM For distribution testing we want plain 'java' command, otherwise we can't block
22*72ba7ae2SDawid WeissREM on luke invocation and can't intercept the return status.
23*72ba7ae2SDawid WeissSET LAUNCH_CMD=start javaw
24*72ba7ae2SDawid WeissIF NOT "%DISTRIBUTION_TESTING%"=="true" GOTO launch
25*72ba7ae2SDawid WeissSET LAUNCH_CMD=java
26*72ba7ae2SDawid Weiss
27*72ba7ae2SDawid Weiss:launch
28*72ba7ae2SDawid Weiss%LAUNCH_CMD% --module-path "%MODULES%\modules;%MODULES%\modules-thirdparty" --module org.apache.lucene.luke %*
29*72ba7ae2SDawid WeissSET EXITVAL=%errorlevel%
30*72ba7ae2SDawid WeissEXIT /b %EXITVAL%
31627ef4d4SDawid WeissENDLOCAL
32