java开发常用命令
- cd /d e:work2,更改至当前工作目录
svnup.bat,批量更新所有项目
@echo offfor /D %%i in (.\*) do (echo %%isvn up %%i)
host.bat,本地临时更改域名解析
notepad C:\Windows\System32\drivers\etc\hosts
db.bat,方便连接内网数据库
@echo offset db=default_dbif ""%1"" == ""data"" goto dataif ""%1"" == ""user"" goto usergoto end:dataset db=data_dbgoto end:userset db=user_dbgoto end:endmysql -h192.168.1.202 -uroot -p123456 -D%db% - mvn install
项目管理通常使用mvn,组件类项目可以mvn install提交到本地依赖库后供其它项目引用,使用Nexus私服的配置为:${M2_HOME}/conf/settings.xml
<mirrors><mirror>
<id>nexus</id><name>local</name><url>http://localhost:8079/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror></mirrors>
如果要使用mvn deploy提交构件(而不是他人check out源码并mvn install),还需要配置:${M2_HOME}/conf/settings.xml
<servers><server><id>nexus</id><username>admin</username><password>admin123</password></server></servers>
以及项目配置pom.xml
<distributionManagement>
<repository><id>nexus</id><name>local</name><url>http://localhost:8079/nexus/content/groups/public/</url>
</repository></distributionManagement> - mvn war:exploded
网站项目通常不必打包war,发布时直接用WinSCP同步WebContent目录即可,命令mvn war:exploded可以构建完整的可直接被tomcat加载运行的WebContent目录,同时调试java和jsp都很方便。
一种方式是直接编译输出class到WebContent/WEB-INF/classes目录(这时WEB-INF/lib会有jar包),然后用tomcat直接加载WebContent目录
<build><resources><resource><directory>src/main/resources</directory></resource></resources><outputDirectory>WebContent/WEB-INF/classes</outputDirectory><plugins><plugin><artifactId>maven-war-plugin</artifactId><version>2.1.1</version><configuration><warSourceDirectory>WebContent</warSourceDirectory><webappDirectory>WebContent</webappDirectory></configuration></plugin></plugins></build>
另一种方式是编译输出到另外的目录(class+jsp+jar等),这时需要将WebContent也加入Source并输出到目标目录以便调试jsp(使用WebContentLink链接),同时WebContent/WEB-INF/classes链接到真正目标目录${target}/WebContent/WEB-INF/classes
<properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.encoding>UTF-8</maven.compiler.encoding><maven.compiler.source>1.7</maven.compiler.source><maven.compiler.target>1.7</maven.compiler.target><maven.test.skip>true</maven.test.skip><targets.home>E:\work2\Servers\web</targets.home></properties>
<build><directory>${targets.home}/${project.artifactId}/target</directory><outputDirectory>${targets.home}/${project.artifactId}/WebContent/WEB-INF/classes</outputDirectory><plugins><plugin><artifactId>maven-war-plugin</artifactId><version>2.1.1</version><configuration><warSourceDirectory>WebContent</warSourceDirectory><webappDirectory>${targets.home}/${project.artifactId}/WebContent</webappDirectory></configuration></plugin></plugins></build>
调试运行或发布WebContent目录即可
<Context docBase="E:\work2\Servers\web\MyWeb\WebContent" path="/MyWeb"/> - 线上部署
netstat -lntp,查看端口对应的进程
ps -ef|grep java,查看运行的java项目
nginx/sbin/nginx,运行nginx,重启-s reload,停止-s stop,配置vi nginx/conf/nginx.conf,日志tail -f nginx/logs/access.log
resin/bin/resin.sh start,运行resin,重启restart,停止stop,配置vi resin/conf/resin.xml,日志tail -f resin/log/jvm-app-0.log
ifconfig,查看IP地址;
df -hlT,查看存储;top,查看运行状态
java开发常用命令的更多相关文章
- java cmd常用命令
熟悉Java的常用命令 面试例题11:使用jar命令. 请使用jar命令,将test文件夹压缩成.jar文件,并简述其压缩包的结构. 考点:对于Java程序员来说,更多情况下是使用集成Java开发工具 ...
- Java开发常用Linux命令
1.查找文件 find / -name filename.txt根据名称查找/目录下的filename.txt文件. find . -name "*.xml"递归查找所有的xml文 ...
- java 开发常用的Linux命令
1.查找文件 find / -name filename.txt 根据名称查找/目录下的filename.txt文件. find . -name "*.xml" 递归查找所有的xm ...
- java开发常用的Linux命令
原文:https://www.cnblogs.com/not-alone/p/8505925.html 1.查找文件 find / -name filename.txt 根据名称查找/目录下的file ...
- JAVA开发常用计算机命令
系统常用命令 win+r > control (可进入控制面板,管理工具,服务) win+r > cmd > systeminfo (x86-based 指32位系统,x86-64 ...
- java开发常用jar包介绍(转载)
jta.jar 标准JTA API必要 commons-collections.jar 集合类 必要 antlr.jar ANother Tool for Language Recognition ...
- Linux中Java开发常用的软件总结:
开发工具下载: Tomcat下载:wget http://learning.happymmall.com/tomcat/apache-tomcat-7.0.73.tar.gzJDK下载: wget h ...
- Java开发常用的在线工具
原文出处: hollischuang(@Hollis_Chuang) 作为一个Java开发人员,经常要和各种各样的工具打交道,除了我们常用的IDE工具以外,其实还有很多工具是我们在日常开发及学习过程中 ...
- [开发工具]Java开发常用的在线工具
注明: 本文转自http://www.hollischuang.com/archives/1459.作为一个Java开发人员,经常要和各种各样的工具打交道,除了我们常用的IDE工具以外,其实还有很多工 ...
随机推荐
- J2EE项目相对路径、绝对路径获取
String path = getServletContext().getRealPath("/"); 这将获取web项目的全路径. this.getClass().getClas ...
- 集成Jenkins Notifier for Chrome到Jenkins CI
Jenkins也算是现在最流行的CI工具了,我们team也使用它来做持续化集成的工作.最近需要增加弹出式窗口来提醒相关人员job的状态,故选择Jenkins Notifier for Chrome这个 ...
- 如何让label和textblock分成两行
http://stackoverflow.com/questions/183406/xaml-newline-in-string-attribute http://www.developerfusio ...
- Android 模仿电视机关闭界面
Tween动画 1.在关闭电视机的时候,电视机中间都有一根白条瞬间关闭. 要实现这个效果其实就是利用Tween动画进行实现的. 动画的xml 文件是: android:startOffset=&quo ...
- easyui combobox筛选(拼音)
1.combobox本身的筛选 $('#cc').combobox({ filter: function(q, row){ var opts = $(this).combobox('options') ...
- 【转】Android 防破解技术简介
http://www.cnblogs.com/likeandroid/p/4888808.html Android 防破解技术简介 这几年随着互联网的不断发展,Android App 也越来越多!但是 ...
- Delphi ThreadPool 线程池(Delphi2009以上版本适用)
http://blog.sina.com.cn/s/blog_6250a9df0101kref.html 在网上查找Delphi线程池,结果发现寥寥无几. 看了半天源代码,弄得一头雾水,觉得不容易理解 ...
- sqldependency 支持的select
https://msdn.microsoft.com/library/ms181122.aspx 支持的 SELECT 语句 满足下列要求的 SELECT 语句支持查询通知: 必须显式说明 SEL ...
- C#利用GDI+绘制旋转文字等效果
C#中利用GDI+绘制旋转文本的文字,网上有很多资料,基本都使用矩阵旋转的方式实现.但基本都只提及按点旋转,若要实现在矩形范围内旋转文本,资料较少.经过琢磨,可以将矩形内旋转转化为按点旋转,不过需要经 ...
- iframe自适应高度的多种方法小结
转自:http://www.jb51.net/article/15780.htm 不带边框的iframe因为能和网页无缝的结合从而不刷新页面的情况下更新页面的部分数据成为可能,可是 iframe的大小 ...