Cicd documentation layout


Install: Install the package into the local repository, for use as a dependency in other projects locally. Goal: mvn clean install Deploy



Download 6.25 Mb.
Page16/39
Date15.06.2023
Size6.25 Mb.
#61535
1   ...   12   13   14   15   16   17   18   19   ...   39
CIcd
Install: Install the package into the local repository, for use as a dependency in other projects locally.
Goal: mvn clean install
Deploy: Done in an interation or release environment, copies the final package to the remote repository for sharing with other developers and projects.
Goal: mvn clean deploy
Note: Removes the files from a project's working directory, that were generated at build-time. Alternatively we can execute the plugin: mvn clean:clean That will do the same thing.

5.6. Install Maven through CLI:


  • Download and copy the latest Maven installation link in /opt folder. You can get the latest binary link from here: https://maven.apache.org/download.cgi

    • Once downloaded extract that binary link using below command:

[root@cicdapi opt]# wget http://apachemirror.wuchna.com/maven/maven3/
3.6.1/ binaries/apache-maven-3.6.1-bin.tar.gz
[root@cicdapi opt]# wget tar -xvf apache-maven-3.6.1-bin.tar.gz

    • Rename the installed apache-maven-3.6.1 to maven

[root@cicdapi opt]# mv apache-maven-3.6.1/ maven

5.7. Setup Maven environment variables:


export MAVEN_HOME="/opt/maven"
export PATH=$PATH:$MAVEN_HOME/bin

  • Now run the below command to set variable permanent

[root@cicdapi opt]# source /etc/profile.d/maven.sh
[root@cicdapi opt]# mvn -version

  • Above command will executes maven version, now it was installed successfully.

5.8. Maven configuration with Jenkins:


  • Go to Jenkins home page, on right side select manage Jenkins under that select Global tool configuration.

  • In the Global Tool Configuration screen, scroll down till you see the Maven section and then click on the ‘Add Maven’ button.



  • Click on save button, Now maven configured with Jenkins successfully.

Download 6.25 Mb.

Share with your friends:
1   ...   12   13   14   15   16   17   18   19   ...   39




The database is protected by copyright ©ininet.org 2024
send message

    Main page