Can someone tell me why after executing a .bat script only the first mvn deploy command is executed and then execution close. Why all command are not executed?
set GROUP_BASE=com.oracle.jdeveloper.jars
set VERSION=10.1.3.3.0.4157
set JDEV_HOME=C:/Oracle/jdevstudio10133
set REPO_URL=http://localhost:8081/nexus/content/repositories/thirdparty
set REPOSITORY_ID=thirdparty
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_lib -DartifactId=bc4jct -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/lib/bc4jct.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_lib开发者_运维技巧 -DartifactId=adfm -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/lib/adfm.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_jlib -DartifactId=bc4jui -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/jlib/bc4jui.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.jlib -DartifactId=osdt_core -Dversion=%VERSION% -Dfile=%JDEV_HOME%/jlib/osdt_core.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.ord_jlib -DartifactId=ordim -Dversion=%VERSION% -Dfile=%JDEV_HOME%/ord/jlib/ordim.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.xdoclet-1_2_1 -DartifactId=xdoclet-ibm-module-1.2.1 -Dversion=%VERSION% -Dfile=%JDEV_HOME%/xdoclet-1.2.1/xdoclet-ibm-module-1.2.1.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.jlib -DartifactId=jssl-1_1 -Dversion=%VERSION% -Dfile=%JDEV_HOME%/jlib/jssl-1_1.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.jlib -DartifactId=javax-ssl-1_1 -Dversion=%VERSION% -Dfile=%JDEV_HOME%/jlib/javax-ssl-1_1.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
Try with using the CALL command.
...
call mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_lib -DartifactId=bc4jct -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/lib/bc4jct.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
call mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_lib -DartifactId=adfm -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/lib/adfm.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
...
If you invoke a command without using CALL, control passes over to the new program and does not return (in your example this is what happens after the first mvn ...
). CALL returns control to the caller and execution continues with the next instruction.
Try this for each line you are running mvn:
START /WAIT "" mvn deploy:deploy-file -DgroupId=%GROUP_BASE%.BC4J_lib -DartifactId=bc4jct -Dversion=%VERSION% -Dfile=%JDEV_HOME%/BC4J/lib/bc4jct.jar -Dpackaging=jar -DrepositoryId=%REPOSITORY_ID% -Durl=%REPO_URL%
精彩评论