Preparing the Development Environment
Preparing the Environment
Table 1 describes the preparations required before using LakeFormation Java SDK.
Item |
Description |
---|---|
Java JDK environment |
The Java environment is required and the Java version must be JDK 1.8 or later. |
IntelliJ IDEA |
Tool used for developing applications. The version must be 2019.1 or other compatible versions.
NOTE:
|
Maven installation |
Basic configuration of the development environment. This tool is used for project management throughout the lifecycle of software development. |
7-Zip |
This tool is used to decompress .zip and .rar packages. The 7-Zip 16.04 version is supported. |
Collecting Dependency Information
- Collecting LakeFormation Java SDK dependencies
View the JAR package of LakeFormation Java SDK of the latest version in the Maven repository at Maven SDK address and obtain the file content. The following is an example.
<dependency> <groupId>com.huaweicloud.sdk</groupId> <artifactId>huaweicloud-sdk-lakeformation</artifactId> <version>3.1.45</version> </dependency>
- Preparing maven-assembly-plugin dependencies
Prepare the following maven-assembly-plugin dependencies in advance:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.3.0</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.huawei.cloud.dalf.lakecat.examples.CatalogExample</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
Configuring IntelliJ IDEA and POM Files
- After the IntelliJ IDEA and JDK tools are installed, configure the JDK in IntelliJ IDEA.
- Start IntelliJ IDEA and choose Configure.
Figure 1 Quick Start page
- Select Structure for New Projects from the drop-down list.
Figure 2 Clicking Configure
- On the displayed Project Structure for New Projects page, select SDKs, click the plus sign (+), and click JDK.
Figure 3 Project Structure for New Projects
- On the Select Home Directory for JDK page that is displayed, select the JDK directory and click OK.
Figure 4 Select Home Directory for JDK
- After selecting the JDK, click OK to complete the configuration.
Figure 5 Completing the configuration
The operation procedure may vary according to the IDEA version.
- Start IntelliJ IDEA and choose Configure.
- Set the Maven version used by the project.
- Choose File > Settings... from the main menu of IntelliJ IDEA.
Figure 6 Settings
- Choose Build, Execution, Deployment > Maven and set Maven home directory to the Maven version installed on the local PC.
Set User settings file and Local repository as you need, and click Apply > OK.Figure 7 Selecting the local Maven installation directory
- Choose File > Settings... from the main menu of IntelliJ IDEA.
- Set the IntelliJ IDEA text file coding format to prevent garbled characters.
- Choose File > Settings... from the main menu of IntelliJ IDEA.
Figure 8 Settings
- In the navigation tree of the Settings page, choose Editor > File Encodings, and select UTF-8 for both Global Encoding and Project Encoding.
Figure 9 File Encodings
- Click Apply and OK to complete the configuration.
- Choose File > Settings... from the main menu of IntelliJ IDEA.
- Add the LakeFormation Java SDK dependencies collected in Collecting Dependency Information and the maven-assembly-plugin dependencies to the end of the pom.xml file of Maven.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot