Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hbase source code compilation and import eclipse

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

First of all, go to Apache's official website to download the source package of hbase1.0.1.

Since the source code package is managed by maven, you need to install maven

1. Install MAVEN

Download the installation package

Decompress the file, Maven needs JDK support, configure JAVA_HOME and Path environment variables

Enter mvn-version on the command line, which indicates that the installation is successful as shown in the following figure.

two。 Configure the local warehouse path

Open the settings.xml file in the...\ apache-maven-3.3.3\ conf directory and modify the node to our custom local warehouse path (default is under ${user.home} / .m2 / repository directory)

3. Install the MAVEN plug-in M2Eclipse (http://www.eclipse.org/m2e/)

Click Help > Install New Software...

Enter http://download.eclipse.org/technology/m2e/releases in the address bar to download the latest version

Restart eclipse after installation is complete, configure the Maven installation directory and local repository directory (without using the plug-in built-in maven)

As shown in the following figure

Window > Preferences > Maven > Installations

Window > Preferences > Maven > User Settings

4.eclipse imports hbase source code

File > Import

Will be reported to Missing artifact jdk.toos:jdk.toos:jar:1.7 after import

Many frameworks rely on tools.jar in jdk, but not in the maven repository

How to solve this problem, you only need to add the following configuration to the pom.xml file of the project, and specify maven to go locally to find tools.jar,

Jdk.tools

Jdk.tools

1.7

System

${JAVA_HOME} / lib/tools.jar

Plugin execution not covered by lifecycle configuration reported an error

The reason is that eclipse's M2e plug-in does not support execution yet.

Solution 1: put a label on top of the label

..........

< /build>

Solution 2:

Window-Perferences-Maven-Lifecycle Mapping

Save the following:

< lifecycleMappingMetadata>

Org.codehaus.mojo

Aspectj-maven-plugin

Compile

[1.3,)

< /lifecycleMappingMetadata>

Remember to click the "Reload workspace lifecycle mappings metadata" button

Problem solved.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report