If in an interface, it can be a single item
Note: This article is done in the way of the Gradle project !
Note: This article is done in the maven project Way!
How to correctly import Maven projects (including related source code) downloaded from GitHub in idea (blogger recommendation)
If in an interface, it can be multiple items
Note: This article is done in the maven project Way!
How to set up the idea in the Idea Learning series (similar to the one in eclipse with multiple sub-projects in Workspace) (Customize new or import a local existing MAVEN project) (detailed text)
First, Gradle installation
1. Installing the JDK
1.1 Need to install jdk1.5 above to run Gradle.
1.2 Verify that the JDK is installed successfully java–version.
1.3 Set the JAVA_HOME environment variable.
2. Download Gradle
Address: http://services.gradle.org/distributions/
3, decompression gradle-3.5-bin.zip.
4, set the GRADLE_HOME environment variable.
%gradle_home%\ bin;
5, verify that Gradle is installed successfully gradle–v.
Microsoft Windows [version 6.1.7601] Copyright (c) Microsoft Corporation. All rights reserved. C:\users\administrator>gradle-version------------------------------------------------------------Gradle 3.5- -----------------------------------------------------------Build Time: 2017-04-10 13:37:25 utcrevision: B762622a185d59ce0cfc9cbc6ab5dd22469e18a6groovy: 2.4.10Ant: Apache Ant (TM) version 1.9.6 compiled on June 29 2015JVM: 1.8.0_66 (Oracle Corporation 25.66-b18) OS: Windows 7 6.1 amd64c:\users\administrator>
Second, download Apache flume source code
1, download flume Source: http://archive.apache.org/dist/flume/
2, decompression flume source Package
Third, build idea project document with Gradle
1, go to cmd, switch to flume source root directory
2. Executive Order: Gradle idea
If you have this step, the following error appears, then
Microsoft Windows [version 6.1.7601] Copyright (c) Microsoft Corporation. All rights reserved. C:\USERS\ADMINISTRATOR>CD/D D:D:\>CD D:\SOFTWARE\APACHE-FLUME-1.7.0-SRCD:\SOFTWARE\APACHE-FLUME-1.7.0-SRC >gradle ideastarting a Gradle Daemon (subsequent builds'll be faster) Failure:build failed with an exception.* what W ent wrong:task ' idea ' isn't found in the root project ' APACHE-FLUME-1.7.0-SRC '. * Try:run gradle tasks to get a list of available Tasks. Run with--stacktrace Optioto get the stack trace. Run with--info or--debug option to get more log outp. BUILD failedtotal time:30.504 secsd:\software\apache-flume-1.7.0-src>
Workaround:
To edit the Build.gradle file, add the following content.
repositories { jcenter () maven { url ' https://maven.google.com ' } }
3. Import Flume Project
3.1 Choose Idea Import Project
3.2 Select Flume Source Location
3.3 Select external model Gradle
3.4 Choose Gradle Home
3.5 Importing Idea
If you want to see other versions of Flume in the future, so too.
It will automatically go to the dependent version of your MAVEN repository and open it.
Spark Latest source download and import into the development environment to boost high-quality code (Scala idea for Eclipse and IntelliJ idea apply) (take spark2.2.0 source package for example) (illustrated)
How to import the project's source code (blogger recommendation) to the big Data project in idea (similar to the single subproject in Eclipse workspace)