Build the war package build environment on Linux

Source: Internet
Author: User
Tags svn

I. Check if your Linux machine has its own JDK
Java-version check can be, if there is a need for the compilation of different versions, first uninstall, and then install the required version of the compilation
JDK installation and configuration.
(1) JDK installation
Unzip the package:
#tar-xvzf jdk1.7.tar.gz-c/home/ai #解压缩包到指定目录下.
(2) Configuring environment variables
Modifying Global environment Variables/etc/profile
Export java_home=/home/ai/jdk1.7.0_79
Export path= $PATH: $JAVA _home/bin
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Two. Install Maven
(1) Unzip the downloaded MAVEN installation package to the specified directory
#tar-xvzf apache-maven-3.3.9.tar.gz-c/home/ai #解压缩包到指定目录下.
(2) Configuring the Settings.xml file
<localRepository>/home/ai/mavenRepository</localRepository>
#/home/ai/mavenrepository Storage directory for MAVEN repositories
Note: If you are unable to connect to the network, you will need to manually upload the warehouse jar packages required by the project.
(3) Configuring MAVEN environment variables
Modifying Global environment Variables/etc/profile
Export maven_home=/home/ai/apache-maven-3.3.9
Export m2_home=/home/ai/apache-maven-3.3.9
Export path= $PATH: $MAVEN _home/bin: $M 2_home/bin
Three. SVN download project
SVN CO/HTTP path (full path to directory or file) [local directory full path]--username user name--password password
SVN co svn://10.4.63.11/quartzproject/maintain/home/ai/maintain--username LKK--password * * *
Four. Enter the compile command into the specified directory.
[Email protected] maintain]$ mvn clean package-dmaven.test.skip=true &
[Email protected] ~]$ [INFO] scanning for projects ...
[INFO]
[INFO]------------------------------------------------------------------------
[INFO] Building Maintain maven 1.0-snapshot
[INFO]------------------------------------------------------------------------
[INFO]
[INFO]---maven-clean-plugin:3.0.0:clean (default-clean) @ Maintain---
[INFO] Deleting/home/ai/maintain/target
[INFO]
[INFO]---maven-resources-plugin:2.6:resources (default-resources) @ Maintain---
[WARNING] Using platform Encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 Resource
[INFO] Copying Resources
[INFO]
[INFO]---maven-compiler-plugin:2.3.2:compile (default-compile) @ Maintain---
[INFO] Compiling 430 source Files to/home/ai/maintain/target/classes
[INFO]
[INFO]---maven-resources-plugin:2.6:testresources (default-testresources) @ Maintain---
[INFO] Not copying test resources
[INFO]
[INFO]---maven-compiler-plugin:2.3.2:testcompile (default-testcompile) @ Maintain---
[INFO] Not compiling test sources
[INFO]
[INFO]---maven-surefire-plugin:2.12.4:test (default-test) @ Maintain---
[INFO] Tests is skipped.
[INFO]
[INFO]---maven-war-plugin:2.2:war (default-war) @ Maintain---
[INFO] Packaging WebApp
[INFO] Assembling WebApp [Maintain] in [/home/ai/maintain/target/maintain-1.0-snapshot]
[INFO] Processing War Project
[INFO] Copying webapp resources [/home/ai/maintain/src/main/webapp]
[INFO] Webapp assembled in [961 msecs]
[INFO] Building War:/home/ai/maintain/target/maintain-1.0-snapshot.war
[INFO] Web-inf/web.xml already added, skipping
[INFO]------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]------------------------------------------------------------------------
[INFO] Total time:19.834 S
[INFO] Finished at:2017-01-09t19:14:24+08:00
[INFO] Final memory:66m/1963m
[INFO]------------------------------------------------------------------------
Compiled successfully, the resulting war package is located in the/home/ai/maintain/target/maintain-1.0-snapshot.war directory



This article is from "Dream Dreams" blog, please be sure to keep this source http://dreamy.blog.51cto.com/12471447/1891637

Build the war package build environment on Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.