-
Notifications
You must be signed in to change notification settings - Fork 987
Development Tips
Eclipse is not able to invoke all the many Maven tasks that Drill uses. There is a two-part workaround.
- Ignore those tasks in Eclipse.
- Invoke a command-line Maven build if any of the tasks must be invoked.
To ignore unsupported Maven plugins in Eclipse:
In eclipse Luna 4.4.0, you can chose to ignore this error in preferences
Eclipse > Preferences > Maven > Errors/Warnings > Plugin executiuon not covered by lifecycle configuration. Select Ignore / Warning / Error as you wish.
This is a cleaner way, as it doesn't modify your pom.xml.
You will need to do a Maven > "Update project" to fix the same error in any other project as well.
It appears that certain projects contain known issues:
-
drill-storage-hive-corerefers to unknown packages. -
drill-kudu-storagerefers to unknown classes.
Simply closing these projects in Eclipse seems to be fine when working on the core Drill.
Doing the above removes the all the red error indicators from your Drill projects in Eclipse.
You can waste vast amounts of time trying to get JMockit-based tests to run in Eclipse. You may encounter cryptic errors such as:
NoClassdefFoundError org.junit.runner.Runner
...
java.lang.UnsupportedClassVersionError: com/sun/tools/attach/spi/AttachProvider : Unsupported major.minor version 52.0
To solve these errors, you must have a consistent version of Java used by Maven and Eclipse. Drill still builds with Java 7, though Java 8 has been the current version for quite some time. To get everything to build, choose a version. Here, I chose Java 8.
- Ensure that the target version of Java is installed on your machine. (Here I assume a Mac.)
- Ensure that Eclipse runs with that version. Follow these instructions. (I found I had to use the full class path.)
- Ensure that Eclipse has that JDK version set as the default version in Eclipse -> Preferences -> Java -> Installed JREs.
- In the
drill-root/pom.xml, select the JDK version of your choice:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
- Select the Drill root project in the Package Explorer and, from the context menu, choose Maven -> Update project.