SpringSide4学习笔记1

来源:互联网 发布:微店 知乎 编辑:程序博客网 时间:2024/06/06 17:45

首先非常感谢江南白衣~项目首页:http://www.springside.org.cn/

不知道从哪里看起就从我点的第一个文件说说吧~

quick-start.bat

针对像我一样的小白鸟,我就直接写在代码上面了 其实人家代码写的很好了 我全当翻译一下吧

大牛请多多指教

#关闭回显 就是不显示命令行返回的信息@echo off#显示下面两句话告诉你运行的先决条件 JDK6.0以上并且设置了JAVA_HOME Maven要求3.0.4以上 并且添加到了path中#现在明白echo命令了吧 其实就是显示东西的 echo [Pre-Requirement] Makesure install JDK 6.0+ and set the JAVA_HOME.echo [Pre-Requirement] Makesure install Maven 3.0.4+ and set the PATH.#设置了一个变量叫做MVN 它的值是mvn mvn就是Maven的命令名set MVN=mvn#设置MAVEN_OPTS变量  这个变量是啥 参看以下http://book.51cto.com/art/201011/234380.htmset MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128mecho [Step 1] Install all springside modules to local maven repository.#call 执行一个命令行吧 可以参照一个bat编程 %MVN%意思是引用一个叫MVN的变量 这个变量上面定义为mvn #整句就是执行mvn install -pl xxxx 将代码安装到代码仓库 -pl 项目名称参数 不知道这么翻译对不对 -D 定义一个系统属性 跳过test 可以看一下helpcall %MVN% clean install -pl org.springside:springside-parent,org.springside:springside-core,org.springside:springside-extension -Dmaven.test.skip=true#一个判断语句如果出错 错误等级为1 就去error锚点处 error就在后面if errorlevel 1 goto errorecho [Step 2] Generate Eclipse project files for all projects#这个是mvn调用elcipse插件将项目转换成eclipsecall %MVN% eclipse:clean eclipse:eclipseif errorlevel 1 goto errorecho [Step 3] Init schema and data for all example projects.#使用调用mvn的ant插件执行一个ant的任务 这个任务的描述在pom文件里面 刷新数据的一个操作 -P参数 激活 refresh-db的Profilecall %MVN% antrun:run -Prefresh-db -pl org.springside.examples:mini-service,org.springside.examples:mini-web,org.springside.examples:showcaseif errorlevel 1 goto errorecho [Step 4] Start all example projects.cd examples\mini-service#清理编辑 调用jetty服务器插件 开启8082端口运行这个项目start "Mini-Service" %MVN% clean jetty:run -Djetty.port=8082if errorlevel 1 goto errorcd ..\mini-webstart "Mini-Web" %MVN% clean jetty:run -Djetty.port=8081if errorlevel 1 goto errorcd ..\showcasestart "Showcase" %MVN% clean jetty:runif errorlevel 1 goto errorcd ..\..\echo [INFO] Please wait a moment then access below demo sites:echo [INFO] http://localhost:8082/mini-serviceecho [INFO] http://localhost:8081/mini-webecho [INFO] http://localhost:8080/showcasegoto end:errorecho Error Happen!!!:endpause#设置



写几个mvn的参考大家去看看

maven常见问题问答 http://blog.sina.com.cn/s/blog_8717466801010iib.html

maven pom.xml详解 http://www.blogjava.net/jianyue/articles/227932.html

Maven入门教程http://fluagen.blog.51cto.com/146595/40086

.............

欢迎大牛给出指导意见~


原创粉丝点击