forked from jbosstm/quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.bat
executable file
·43 lines (33 loc) · 2.21 KB
/
run.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
rem JBoss, Home of Professional Open Source
rem Copyright 2016, Red Hat, Inc., and others contributors as indicated
rem by the @authors tag. All rights reserved.
rem See the copyright.txt in the distribution for a
rem full listing of individual contributors.
rem This copyrighted material is made available to anyone wishing to use,
rem modify, copy, or redistribute it subject to the terms and conditions
rem of the GNU Lesser General Public License, v. 2.1.
rem This program is distributed in the hope that it will be useful, but WITHOUT A
rem WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
rem PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
rem You should have received a copy of the GNU Lesser General Public License,
rem v.2.1 along with this distribution; if not, write to the Free Software
rem Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
rem MA 02110-1301, USA.
@echo off
echo "Running recovery quickstart"
IF NOT %QUICKSTART_NARAYANA_VERSION%x == x SET NARAYANA_VERSION_PARAM="-Dversion.narayana=${QUICKSTART_NARAYANA_VERSION}"
rem To run an example use the maven java exec pluging. For example to run the second recovery example
rem (need to run with cmd /c as mvn exec:java does not fork the process and the failure ends the current bat process)
cmd /c mvn -e compile exec:java %NARAYANA_VERSION_PARAM% -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-f"
rem We expect to fail as halt of JVM happens
rem IF %ERRORLEVEL% NEQ 0 exit -1
mvn -e compile exec:java %NARAYANA_VERSION_PARAM% -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.DummyRecovery -Dexec.args="-r"
IF %ERRORLEVEL% NEQ 0 exit -1
echo "Dummy recovery example succeeded"
rem And to run the JMS recovery example:
cmd /c mvn -e compile exec:java %NARAYANA_VERSION_PARAM% -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-f"
rem IF %ERRORLEVEL% NEQ 0 exit -1
mvn -e compile exec:java %NARAYANA_VERSION_PARAM% -Dexec.mainClass=org.jboss.narayana.jta.quickstarts.recovery.JmsRecovery -Dexec.args="-r"
IF %ERRORLEVEL% NEQ 0 exit -1
echo "JMS recovery example succeeded"
echo "All recovery examples succeeded"