Delombok cannot find symbol

1,088 views
Skip to first unread message

Chris Alexander

unread,
Nov 14, 2011, 7:04:15 AM11/14/11
to project...@googlegroups.com
Hi all,

When we run the delombok stage as part of our maven build (just before we run tycho), we see quite a few of the following errors:

J:\build\com.project.auth\src\com\project\auth\data\User.java:8: error: package com.project.serialization does not exist
import com.project.serialization.ByteArray;
                                     ^
J:\build\com.project.auth\src\com\project\auth\data\User.java:29: error: cannot find symbol
	private ByteArray hashedPassword;
	        ^
  symbol:   class ByteArray
  location: class User

It seems this only happens with classes which are not part of the bundle being built. The delombok seems to work fine and tycho has no problem building the resulting code.

Any ideas of how we might address these messages?

Thanks

Chris

Reinier Zwitserloot

unread,
Nov 14, 2011, 7:38:53 AM11/14/11
to project...@googlegroups.com
Just to confirm, you're on the latest version (0.10.2), right? We pushed some updates through for delombok in that version.

Chris Alexander

unread,
Nov 14, 2011, 7:46:03 AM11/14/11
to project...@googlegroups.com
Yes this occurs under maven-lombok plugin 0.10.2.0

Cheers

Chris

On 14 November 2011 12:38, Reinier Zwitserloot <rein...@gmail.com> wrote:
Just to confirm, you're on the latest version (0.10.2), right? We pushed some updates through for delombok in that version.

--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/
 
To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/project-lombok?hl=en

Chris Alexander

unread,
Nov 14, 2011, 11:44:36 AM11/14/11
to project...@googlegroups.com
I've had a look into the error messages in more detail and it looks like it is being caused by Lombok not including the jar files in the project's lib/ directory when it is delomboking - the missing classes are all defined in JARs in the lib directory.

Is there a way to specify to use this lib file to delombok as well as to do so in the maven-lombok-plugin?

Thanks

Chris

Reinier Zwitserloot

unread,
Nov 15, 2011, 7:46:57 AM11/15/11
to project...@googlegroups.com, Anthony Whitford
The delombok plugin is written by Anthony Whitford, he might know more about this issue. 

 --Reinier Zwitserloot

Anthony Whitford

unread,
Nov 16, 2011, 1:20:39 AM11/16/11
to Project Lombok
The plugin should be referencing the project dependencies; when you
say "the project's lib/ directory", do you mean the project
dependencies, or something else?

What is your output for: mvn dependency:tree
Is the jar file that you need being listed? If not, how do you tell
Maven it is a dependency?
If so, what is the "scope" (test/compile/provided)?

If you are desperate, you can add a <dependencies> element to your
build plugin definition -- but that should NOT be necessary.

<build>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>0.10.2.0</version>
<dependencies>
<dependency>
<groupId>my.group</groupId>
<artifactId>myArtifact</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</build>


Hope this helps,

Anthony

djjeck

unread,
Aug 1, 2013, 1:14:11 AM8/1/13
to project...@googlegroups.com
I had a similar problem that was caused by a wrong order of source generation.
My delomboked files had dependency on files generated by gwt.
Changing the order of the plugins in the pom file solved the issue.

Just posting in hope to help somebody.
Reply all
Reply to author
Forward
0 new messages