[英]Add existing java project to maven
I have the following problem: 我有以下问题:
Using Eclipse, I created a maven Spring project running at localhost. 使用Eclipse,我创建了一个在localhost运行的maven Spring项目。 My task is to create a deployment procedure for moving the local project to dev/production server.
我的任务是创建一个将本地项目移动到开发/生产服务器的部署过程。
The flow is the following: I commit the changes to the corporate SVN. 流程如下:我将更改提交给公司SVN。 I wrote a script, which downloads the latest revision to the dev server.
我编写了一个脚本,将最新版本下载到开发服务器。 I also have maven installed on the same server.
我还在同一台服务器上安装了maven。
How do I tell maven to build this project (let's say the source is downloaded from the SVN to /home/project1/latest/
), so I can rsync the compiled java class files to the tomcat root directory? 我如何告诉maven构建这个项目(假设源代码是从SVN下载到
/home/project1/latest/
)的,所以我可以将已编译的Java类文件同步到tomcat的根目录?
It is always the best practice to build the project in a common Build server(using continuous integration utility like Jenkins) and then distributing the same jar/war files to the required environment. 最好的做法始终是在通用的Build服务器中构建项目(使用像Jenkins这样的持续集成实用程序),然后将相同的jar / war文件分发到所需的环境。
This will make sure that the tested code-base gets upgraded to higher environments. 这将确保将经过测试的代码库升级到更高的环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.