Opentsdb's official online introduction of how to import opentsdb source code into eclipse, the offical link , but the steps super cumbersome, there is a simple method, the following to import OpenTSDB2.0.0 as an example.
1. Download the OpenTSDB2.0.0 code
wget https://codeload.github.com/OpenTSDB/opentsdb/tar.gz/v2.0.0
2. Unzip and enter the source directoryTar zxf v2.0.0 CD opentsdb-2.0.0/
3. Generate the Pom.xml file./build.sh Pom.xml
4.
comment out the GPG plugin in the Pom.xml file:<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>[email protected]</keyname>
</configuration>
</plugin>
-
5. Compiling
MVN install-dskiptests
6. Create Eclipse ProjectMVN Eclipse:eclipse
7. Import EclipseImport-->existing Projects into workspace-->select root directory Select the Opentsdb directory opentsdb-2.0.0, click Finish
8. After the import will have a Packege compile error, in fact, this packege source has been imported into the project, the package will be exclude directly offRight-click the package--->build Path--->exclude! At last
How to import opentsdb source into eclipse