自己凑合写的,没办法,没用Maven自动发布。每次自己做补丁包,创建目录也是麻烦。用脚本少点几次鼠标吧。
@echo off
rem 创建日期\项目名\WEB-INF\classes\com.lxhg.xxx格式的目录
rem 基本配置信息
set path_home=F:\Project\back
if exist %path_home% goto okHome
md %path_home%
:okHome
f:
cd %path_home%
rem create folder using date as name
set "ymd=%date:~,4%%date:~5,2%%date:~8,2%"
if exist %ymd% goto okDate
md %ymd%
:okDate
cd %ymd%
set /p project_name=input your project name:
echo your project name is %project_name%
if exist %project_home% goto okProject
md %project_name%
:okProject
cd %project_name%
set project_home=%path_home%\%ymd%\%project_name%
echo %project_home%
rem 进入项目根目录准备创建com\lxhg\xxx目录层次
cd %project_home%
if exist WEB-INF goto okINF
md WEB-INF
:okINF
cd WEB-INF
if exist classes goto okCLASSES
md classes
:okCLASSES
cd classes
set /p package_name=input your package name:
echo pwd
echo your project name is %package_name%
rem 切割输入的包名com.lxhg.ufshop需要切割成com lxhg ufshop
set string=%package_name%
:split
for /f "tokens=1,* delims=." %%i in ("%string%") do (
echo %%i
md %%i
cd %%i
set string=%%j
)
if not "%string%"=="" goto split
cd %project_home%
pause
网友评论