10.26 配置psplkf小程序

环境

服务器 Win Server 2008,nginx, maven,

psplkf 标准的mvn工程,可以使用eclipse,导入,file-import-maven project就行,

但是我们之后build这个工程的时候,使用了

mvn clean package -DskipTests=true -Puat,这个具体在eclipse怎么实现?

https://www.cnblogs.com/mr-wuxiansheng/p/6852045.html 生成war是这样

但是会有问题,是没有指定profile

需要

Go to

Properties-->Maven-->Active Maven Profiles

and type in only the profile name that you want to run.

If you want to run your ABC profile type in ABC in the Active Maven Profile input box.

The description(seperated by commas) given there is a bit confusing.

Once you define your profile name or id in the input box. You can clean and run your project on your server. By doing so your mentioned active maven profile will be run.

 

否则的话,就手动 mvn clean package -DskipTests=true -Puat

(当然,前提是已经安装了maven并且配置好环境变量)

至于测试命令

mvn -Dtest=PsplServiceTest  test
mvn -Dtest=AutoServiceTest  test

 

这两个运行会报错,但是这个是Junit单元测试,这两个不用管。

 

所以,最简单的方法是,我们直接用notepad++打开需要修改的java文件,然后手动clean,

接着,把生成的kf.war文件复制到服务器对应的tomcat的服务下,webapps文件夹其中,tomcat7_73是测试环境,tomcat7_71是生产环境,

复制进去之后,把kf的文件夹删掉!这样我们在使用D:\dev\tomcat7_73\bin下的tomcat7_73w启动服务的时候,他才会自动的解压kf.war文件,否则会使用原来的

重启完服务就部署成功咯!!

经过重新部署,AITalk和psplkf服务会一直跑,并且去除了轮次限制和工作时间限制,方便我们测试。

posted @ 2018-10-26 15:05  yjy888  阅读(129)  评论(0编辑  收藏  举报