Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Hadoop programming-maven environment building

Shulou Source: shulou.com Published: 2022-06-03 06:06:40 09月24日 Update

maven:

Configure maven environment

① Decompress maven to a path with no spaces and no Chinese

② Add environment variable M2_HOME and PATH path

M2_HOME=C:\mysoft\apache-maven-3.5.0

PATH=%M2_HOME%\bin

Test (mvn -version)

Edit pom.xml file

org.apache.hadoop

hadoop-client

2.7.4

maven basic command

mvn clean compile

mvn clean package

mvn archetype:generate

Configure maven repository

① Get warehouse files

② Configuration conf/settings file

/path/to/local/repo

eclipe integration maven

① Go back to eclipse for configuration

Windows->Preferences-> Search maven->User Settings

Global Settings //Find maven Settings file

User Settings //Find maven Settings file

Local Repository //maven Settings file configured repository address

Build a private server

① Get tomcat and nexus.war and put them under the path

② Configure environmental variables

CATALINA_HOME=C:\mysoft\apache-tomcat-8.5.15

PATH=%CATALINA_HOME%\bin

③ Put nexus under tomcat webapps, start tomcat, initialize nexus.war

④web browser localhost:8080/nexus Enter the nexus home page. If you can enter, it proves that the initialization is complete.

Edit C:\mysoft\apache-tomcat-8.5.15\webapps\nexus\WEB-INF\classes\nexus.properties file,

nexus-work=C:/mysoft/apache-tomcat-8.5.15/sonatype-work/nexus //This path is a dependency library for private servers.

④ Extract the central file into the private server dependency library sonatype-work\nexus\storage\central

7 Start tamcat to check whether the private service is successfully built

Configure maven settings file

The administrator sets the index to update automatically

admin admin123

configuration->Download Remote Indexes= true

Register tamcat to system services

Step 1:

In tomcat bin directory, enter cmd

Step 2:

Command line type service.bat install tomcat

Step 3:

Modify tomcat service startup mode under windows service

Tags: File configuration private server path environment warehouse service variable command administrator management success address foundation method service first browser directory space system Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL vpn Apple MariaDB