Hello,
am evaluating lombok usage for a projet. I did follow web site
instructions, added
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>0.9.3</version>
<scope>provided</scope>
</dependency>
to my maven, used lombok.jar to edit my STS.ini that now looks like
this:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/
org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519
-product
com.springsource.sts.ide
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-javaagent:/home/...../springsource/sts-2.3.2.RELEASE/lombok.jar
-Xbootclasspath/a:/home/...../springsource/sts-2.3.2.RELEASE/
lombok.jar
and restarted eclipse. I then created to simple classes:
@Data
public class TestB {
private int x;
private String y;
}
public class TestA {
public void doTest(TestB b){
b.getX();
}
}
Eclipse provides mes with auto completion, where i see that TestB has
get/setX, get/setY, toString, equals and hashcode defined in TestB.
However, it underlines b.getX(); and says "The method getX() is
undefined for the type testB. When i run with maven package i get this
output:
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Product Sender Daemon 0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources)
@ productsSender-sender ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 19 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
productsSender-sender ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- aspectj-maven-plugin:1.3:compile (default) @ productsSender-
sender ---
[ERROR] The method getX() is undefined for the type TestB
[WARNING] advice defined in
org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has
not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in
org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl
has not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in
org.springframework.mock.staticmock.AbstractMethodMockingControl has
not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in
org.springframework.mock.staticmock.AbstractMethodMockingControl has
not been applied [Xlint:adviceDidNotMatch]
[WARNING] advice defined in
org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect
has not been applied [Xlint:adviceDidNotMatch]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 8.031s
[INFO] Finished at: Wed Mar 16 15:46:46 CET 2011
[INFO] Final Memory: 10M/235M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:
1.3:compile (default) on project productsSender-sender: Compiler
errors:
error at b.getX();
^
/home/delbd/dev/workspace-Psender/
be.meteo.products.tool.productsSender-all/sender/src/main/java/
TestA.java:5:0::0 The method getX() is undefined for the type TestB
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException