How to deploy the test environment

Programming Voice project is generally used in Java (Java here for an example)

Deployment steps are as follows:

The remote git repository code is deployed to a remote server
1, git clone
git pull the code on the remote server

2, mvn clean
delete target directory (the directory compiled deleted files) on the server

3, mvn package jar / war
root on the server directory package, will generate jar / war pack

4, deploy command: java -jar
springboot usually comes with tomcat generate jar package
springboot project will produce a jar directly compile deploy using java -jar


to generate the war package
, if not springboot then generates war package, the war package into the webapps directory of tomcat,
start Tomcat, this package can be decompressed automatically, that is, your web directory, which is equivalent released.

================================================== =============================
the native code is deployed to a remote server
1, mvn install
the project to install a local maven local repository. (Project relies on plug-ins will be downloaded to reproduce local)

2, mvn Clean Package Penalty for
local projects will generate the code packaged jar / war Pack

3, mvn deploy
the package to fight the local upload to the remote repository Nexus

4, deploy command: java -jar
springboot usually comes with tomcat generate jar package
springboot project will produce a jar directly compile deploy using java -jar


to generate the war package
, if not, then springboot package will generate war, the war package into the webapps directory of tomcat,
start Tomcat, this package can be decompressed automatically, that is, your web directory, which is equivalent released.

Guess you like

Origin www.cnblogs.com/gufengchen/p/11080176.html