java - Maven + Delombok issue when compiling in Eclipse -
i have maven project in eclipse uses lombok/delombok.
when build, eclipse, using maven script (e.g. mvn clean package), works fine.
however, when run directly eclipse (say clean/build of project), have classpath issue concerning class should present in tools.jar jdk. have tried adding tools.jar directly in project build path, without success.
[edit]
stack trace is:
03/07/11 23:39:44 cest: maven builder: full_build 03/07/11 23:39:44 cest: [warn] pom com.google.code.gwt-log:gwt-log:jar:3.1.2 missing, no dependency information available 03/07/11 23:39:44 cest: build errors fiveorbs; org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.projectlombok:maven-lombok-plugin:0.9.3.1:delombok (default) on project fiveorbs: execution default of goal org.projectlombok:maven-lombok-plugin:0.9.3.1:delombok failed: required class missing while executing org.projectlombok:maven-lombok-plugin:0.9.3.1:delombok: com/sun/tools/javac/util/context ----------------------------------------------------- realm = plugin>org.projectlombok:maven-lombok-plugin:0.9.3.1 strategy = org.codehaus.plexus.classworlds.strategy.selffirststrategy urls[0] = file:/c:/users/daedin/.m2/repository/org/projectlombok/maven-lombok- plugin/0.9.3.1/maven-lombok-plugin-0.9.3.1.jar urls[1] = file:/c:/program%20files/java/jdk1.6.0_26/jre/../lib/tools.jar urls[2] = file:/c:/users/daedin/.m2/repository/org/projectlombok/lombok/0.9.3/lombok-0.9.3.jar urls[3] = file:/c:/users/daedin/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar number of foreign imports: 1 import: entry[import realm classrealm[maven.api, parent: null]] ----------------------------------------------------- [/edit]
my configuration follows:
- eclipse 3.6 helios
- maven 2.3
- jdk 1.6
- lombok 0.9.3
- delombok maven plugin 0.9.3.1
the part of pom.xml contains declaration of delombok plugin follows:
<plugin> <groupid>org.projectlombok</groupid> <artifactid>maven-lombok-plugin</artifactid> <version>0.9.3.1</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>delombok</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupid>sun.jdk</groupid> <artifactid>tools</artifactid> <version>1.6</version> <scope>system</scope> <systempath>${java.home}/../lib/tools.jar</systempath> </dependency> </dependencies> </plugin> i apologize if question seems trivial, have been looking answer couple of hours, , i'm starting stuck.
thanks in advance hint may able provide - , please let me know if have omitted useful information.
you need make sure eclipse launched using jdk (not jre). sure, set path executable in eclipse.ini
on *x systems (probably includind macos):
-vm /path/to/jdk/bin/javaw on win*:
-vm c:/path/to/jdk/bin/javaw.exe or -vm c:\\path\\to\\jdk\\bin\\javaw.exe
Comments
Post a Comment