Building Phoenix Project

Phoenix is a fully mavenized project. Download source and build simply by doing:

  1. $ mvn package

builds, runs fast unit tests and package Phoenix and put the resulting jars (phoenix-[version].jar and phoenix-[version]-client.jar) in the generated phoenix-core/target/ and phoenix-assembly/target/ directories respectively.

To build, but skip running the fast unit tests, you can do:

  1. $ mvn package -DskipTests

To build against hadoop2, you can do:

  1. $ mvn package -DskipTests -Dhadoop.profile=2

To run all tests including long running integration tests

  1. $ mvn install

To only build the generated parser (i.e. PhoenixSQLLexer and PhoenixSQLParser), you can do:

  1. $ mvn install -DskipTests
  2. $ mvn process-sources

To build an Eclipse project, install the m2e plugin and do an File->Import…->Import Existing Maven Projects selecting the root directory of Phoenix.

Maven

Phoenix is also hosted at Apache Maven Repository. You can add it to your mavenized project by adding the following to your pom:

  1. <repositories>
  2. ...
  3. <repository>
  4. <id>apache release</id>
  5. <url>https://repository.apache.org/content/repositories/releases/</url>
  6. </repository>
  7. ...
  8. </repositories>
  9.  
  10. <dependencies>
  11. ...
  12. <dependency>
  13. <groupId>org.apache.phoenix</groupId>
  14. <artifactId>phoenix-core</artifactId>
  15. <version>[version]</version>
  16. </dependency>
  17. ...
  18. </dependencies>

Note: [version] can be replaced by 3.1.0, 4.1.0, 3.0.0-incubating, 4.0.0-incubating, etc.

Branches

Phoenix 3.0 is running against hbase0.94+, Phoenix 4.0 is running against hbase0.98.1+ and Phoenix master branch is running against hbase trunk branch.


See also:

Building Project Web Site

How to do a release

原文: http://phoenix.apache.org/building.html