xref: /Lucene/lucene/distribution/src/binary-release/bin/luke.cmd (revision 81ab1e598f4e2a6f16de312614823c9eccb7abe2)
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..
2072ba7ae2SDawid Weiss
21*81ab1e59SDawid WeissIF DEFINED LAUNCH_CMD GOTO testing
2272ba7ae2SDawid WeissSET LAUNCH_CMD=start javaw
23*81ab1e59SDawid WeissSET LAUNCH_OPTS=
24*81ab1e59SDawid Weissgoto launch
25*81ab1e59SDawid Weiss
26*81ab1e59SDawid Weiss:testing
27*81ab1e59SDawid WeissREM For distribution testing we don't use start and pass an explicit launch ('java') command,
28*81ab1e59SDawid WeissREM otherwise we can't block on luke invocation and can't intercept the return status.
29*81ab1e59SDawid WeissREM We also force UTF-8 encoding.
30*81ab1e59SDawid WeissSET LAUNCH_OPTS=-Dfile.encoding=UTF-8
3172ba7ae2SDawid Weiss
3272ba7ae2SDawid Weiss:launch
33*81ab1e59SDawid Weiss"%LAUNCH_CMD%" %LAUNCH_OPTS% --module-path "%MODULES%\modules;%MODULES%\modules-thirdparty" --module org.apache.lucene.luke %*
3472ba7ae2SDawid WeissSET EXITVAL=%errorlevel%
3572ba7ae2SDawid WeissEXIT /b %EXITVAL%
36627ef4d4SDawid WeissENDLOCAL
37