Compile Exchange¶
This topic describes how to compile Nebula Exchange. Users can also download the compiled .jar
file directly.
Prerequisites¶
- Install Maven.
- Download pulsar-spark-connector_2.11, and unzip it to
io/streamnative/connectors
directory of the local Maven library.
Steps¶
-
Clone the repository
nebula-exchange
in the/
directory.git clone -b v2.6 https://github.com/vesoft-inc/nebula-exchange.git
-
Switch to the directory
nebula-exchange
.cd nebula-exchange/nebula-exchange
-
Package Nebula Exchange.
mvn clean package -Dmaven.test.skip=true -Dgpg.skip -Dmaven.javadoc.skip=true
After the compilation is successful, you can view a directory structure similar to the following in the current directory.
.
├── README-CN.md
├── README.md
├── pom.xml
├── src
│ ├── main
│ └── test
└── target
├── classes
├── classes.timestamp
├── maven-archiver
├── nebula-exchange-2.x.y-javadoc.jar
├── nebula-exchange-2.x.y-sources.jar
├── nebula-exchange-2.x.y.jar
├── original-nebula-exchange-2.x.y.jar
└── site
In the target
directory, users can find the exchange-2.x.y.jar
file.
Note
The JAR file version changes with the release of the Nebula Java Client. Users can view the latest version on the Releases page.
When migrating data, you can refer to configuration file target/classes/application.conf
.
Failed to download the dependency package¶
If downloading dependencies fails when compiling:
- Check the network settings and ensure that the network is normal.
-
Modify the
mirror
part of Maven installation directorylibexec/conf/settings.xml
:<mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror>