Extracting the Binary archive File 2.1. Run test as JUnit test & Maven Command.Here is the command using the wget that download the zip file and the corresponding checksum file.Apache-maven-3.6.3-bin.zip 100% 9.16M 13.5MB/s in 0.7sApache-maven-3.6.3-bin.zip.sha512 100% 128 -.-KB/s in 0s-rw-rw-r- 1 codejournal codejournal 9602303 apache-maven-3.6.3-bin.zip-rw-rw-r- 1 codejournal codejournal 128 apache-maven-3.6.3-bin.zip.sha5122. So far we have seen how to run a test using Eclipse IDE.
Maven Install It WithInstallation DirectoryBefore we extract the binary archive file, we need a directory. C541af234eded94dA quick glance, you would see that both the checksums are same and that ensures that the download was completed without any errors. C541af234eded94d apache-maven-3.6.3-bin.zip1c095ed556eda06c6d82. -> sha512sum apache-maven-3.6.3-bin.zip1c095ed556eda06c6d82. This command is part of coreutils package and if you don’t have install, you can install it with brew install coreutils. Its sha512, and hence we need sha512sum command to calculate the checksum of the zip file.-> mv apache-maven-3.6.3-bin.zip ~/installed/maven3/If you have downloaded the zip file, you will need unzip command to extract the zip file. -> mkdir ~/installedAfterwards, we need to move our binary archive file in this maven3 directory, and then we cd into this directory so that we can extract the archive file here. You can create these directories like this. Inside this installed directory, we need to create our maven3 directory where we will extract our binary archive file.-> ln -s apache-maven-3.6.3 latestWith the extraction of binary archive file in the installed/maven3 directory, Maven is pretty much installed in your system. You won’t have to update any environment variables(discussed in the next section)Here is how you will create a symbolic link. -> tar -xf apache-maven-3.6.3-bin.tar.gzYou don’t need to create a symbolic link to the newly extracted folder, but it will make your life easier if a symbolic link always pointed to latest Maven installation.So, if next time, you upgrade the Maven installation from 3.6.3 to 3.6.4, you can just update the symbolic link and everything should continue to work as it is. -> unzip -q apache-maven-3.6.3-bin.zipAnd if you have downloaded the tar.gz file, you will need tar command. Mac os high sierra nes emulatorExport PATH="$PATH:$M2_HOME/bin"Once this is configured, you need to re-import the configurations. Here is how, it will be configured in your. Export M2_HOME="~/installed/maven3/latest"Once, this is configured, we need to configure the PATH variable, that will enable running of the mvn command from any directory. This is the entry that you will need to put. This environment variable can be configured in any of your. It will be much better, if we could just run the mvn command from any directory without specifying the entire path to the mvn executable.A lot of Java tools look for M2_HOME environment variable to locate the Maven installation directory in the system.
0 Comments
Leave a Reply. |
AuthorTiffany ArchivesCategories |