Skip to main content

how to set apache maven path in environment variables

Download Apache Maven version 3 and save it on your local machine.
Extract the file you just downloaded using your preferred archive extraction tool.
Select your operating system below to add the bin directory of the created directory apache-maven-3.5.0 to the PATH environment variable



  1. Windows 7: Right click My Computer and select Properties. 
    Windows 8 and 10: Go to Control Panel > System > Advanced System Settings
  2. On the Advanced tab, select Environment Variables, and then find a Systems Variable called Path and add to it the path for your \bin file, for example C:\Program Files\apache-maven-3.5.0\bin

  1. Check you have set the variable correctly by opening up command prompt (run + cmd) and typing mvn -version. The output should show your Maven version.

For Ubuntu 

1.Open the command terminal and enter the following
$ export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
$ export M2=$M2_HOME/bin
$ export MAVEN_OPTS=-Xms256m -Xmx512m
Now append the M2 variable to the system path.
$ export PATH=$M2:$PATH
Check maven installed correctly, by running this command in a terminal: mvn -version. The output should show your Maven version.


Comments

Popular posts from this blog

how to Install MySQL Server on Ubuntu cloud serve

Install MySQL Install the MySQL server by using the Ubuntu package manager: sudo apt-get update sudo apt-get install mysql-server The installer installs MySQL and all dependencies. After installation is complete, the  mysql_secure_installation  utility runs. This utility prompts you to define the mysql root password and other security related options, including removing remote access to the root user and setting the root password. Allow remote access If you have iptables enabled and want to connect to the MySQL database from another machine, you must open a port in your server’s firewall (the default port is 3306). You don’t need to do this if the application that uses MySQL is running on the same server. Run the following command to allow remote access to the mysql server: sudo ufw allow mysql Start the MySQL service After the installation is complete, you can start the database service by running the following command. If the service is already started,...

spring boot sql server 2008 connection

first add the dependence in pom.xml file <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <scope>runtime</scope> </dependency> then we can add the below mention configuration in application.property file spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.datasource.url =jdbc:sqlserver://localhost:1433;databaseName=pos spring.datasource.username = sa spring.datasource.password = sa spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.SQLServer2008Dialect then check the MS-SQL syntax for entity creation.