Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin produces "duplicate class" error #47

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 20 comments
Closed

Plugin produces "duplicate class" error #47

GoogleCodeExporter opened this issue Mar 18, 2015 · 20 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Configure the plugin as described on the project site with eclipselink or 
hibernate annotation-processor
2. Build the project
3. Build the project a second time

What is the expected output? What do you see instead?
The second build fails with an "duplicate class" error. The expected behavior 
would be, that if no changes to the sources are made, no annotations would be 
processed. And if changes are made, the classes are
generated correctly. 

What version of the product are you using? On what operating system?
Version 2.1.0 of the plugin
Maven 3.0.4
Eclipse 3.8
Windows 7 64 Bit
JDK 1.7.0_07 64 Bit

Please provide any additional information below.
Tested the issue with annotation-processing activated in m2e and without it. 
The error occurs every time. 
If you clean the project between the builds, the build succeeds. So something 
seems wrong in detecting changes.

Original issue reported on code.google.com by [email protected] on 20 Dec 2012 at 8:35

@GoogleCodeExporter
Copy link
Author

Hi, thx for feedback

You right ... the processor starts everytime, it doesn't care about source 
modifications

i'll investigate how to fix

Original comment by [email protected] on 21 Dec 2012 at 9:09

  • Changed state: Accepted
  • Added labels: Milestone-Release2.2.1

@GoogleCodeExporter
Copy link
Author

update milestone release

Original comment by [email protected] on 21 Dec 2012 at 9:10

  • Added labels: Milestone-Release2.1.1
  • Removed labels: Milestone-Release2.2.1

@GoogleCodeExporter
Copy link
Author

Hi

Could you send me your pom and a detailed console output?

Thanks in advance

Original comment by [email protected] on 21 Jan 2013 at 11:58

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Hi,

attached you find the console-output and the pom.

Another hint: Version 2.0.5 does not have the "duplicate class" problem, 2.1.0 
has it.

Kind regards
Thorsten

Original comment by [email protected] on 23 Jan 2013 at 4:49

Attachments:

@GoogleCodeExporter
Copy link
Author

thx for feedback

i'll check soon

Original comment by [email protected] on 23 Jan 2013 at 6:24

@GoogleCodeExporter
Copy link
Author

Hi,
In order to understand which update has generated the issue, could you test 
your project also with versions 2.0.6, 2.0.7  and  2.0.8 ?

So i'll able to isolate the problem 

Thanks in advance

Original comment by [email protected] on 23 Jan 2013 at 10:18

@GoogleCodeExporter
Copy link
Author

Hi,

it seems version 2.0.7 (2.0.6 is working, 2.0.7 not) introduced the problem.

Kind regards
Thorsten

Original comment by [email protected] on 24 Jan 2013 at 7:19

@GoogleCodeExporter
Copy link
Author

Hi, 

it seem to have the same issue. Also introduced by 2.0.7.

Slightly different system setup
----
Version 2.0.7 to 2.1.0 of the plugin
Maven 3.0.4
IntelliJ IDEA 12.02
Mac OS X 10.8.2 
JDK 1.7.0_11 64 Bit

Regards,
Kai

Original comment by [email protected] on 25 Jan 2013 at 3:37

@GoogleCodeExporter
Copy link
Author

I've deployed release 2.1.1-SNAPSHOT 

Please, could you test it and let me know ?

Thanks in advance

Original comment by [email protected] on 25 Jan 2013 at 7:12

@GoogleCodeExporter
Copy link
Author

Tried it, but at least for me the error remains

I attached my pom and console output.

Original comment by [email protected] on 25 Jan 2013 at 8:33

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi

Thx for feedbacks

I've deployed release 2.1.1-SNAPSHOT again ... 

Please, could you test it and let me know ?

Thanks in advance

Original comment by [email protected] on 25 Jan 2013 at 9:57

@GoogleCodeExporter
Copy link
Author

Sorry, no improvement for me. Error is the same

Original comment by [email protected] on 26 Jan 2013 at 9:12

@GoogleCodeExporter
Copy link
Author

Thx for feedback

I thought that it was enough to remove the outputClassDirectory from processor 
classpath 

will execute a more thorough analisys

Original comment by [email protected] on 26 Jan 2013 at 3:43

@GoogleCodeExporter
Copy link
Author

Since one situation in which this occurs is when two source code directories 
include the same class with the same package structure and, due the fact that  
from release 2.0.7 has been introduced support of multiple source directories, 
i guess that in your projects could happen this 

Could you confiirm this hypotesis ? 

However i've deployed a new 2.1.1-SNAPSHOT that bypass use of multiple source 
directory

Please test it and let me know. I've added some extra log so, could you use -X 
options and attach console output

Thanks in advance

Original comment by [email protected] on 26 Jan 2013 at 10:25

@GoogleCodeExporter
Copy link
Author

The new snapshot works for me.
And since I would say I dont have two source code directories with the same 
structure and classes that baffles me a bit.
However I can`t attach the console output yet because I first have to clarify 
if I am allowed to do so or if I have to anonymise it.

Original comment by [email protected] on 28 Jan 2013 at 8:00

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Hi, thx for feedback

This confirm to me  that the problem is related to 'additional source 
directories'

I understand problems about console output ... but, i need just  the debug 
output related  to messages
 "[DEBUG] source directory [.... ] ",  in order to understand the additional source directories that was added to the project 

Could i have just them?

Thanks in advance

Regards,
Bartolo

Original comment by [email protected] on 28 Jan 2013 at 12:07

@GoogleCodeExporter
Copy link
Author

I stripped it down. I hope it did not miss anything important.



Original comment by [email protected] on 29 Jan 2013 at 8:51

Attachments:

@GoogleCodeExporter
Copy link
Author

Thx, that is perfect

i've seen that there a source dir duplication

[DEBUG] source directory 
[/Applications/development/workspaces/test/jnip/src/main/java]
[DEBUG] source directory 
[/Applications/development/workspaces/test/jnip/src/main/java]

i'll check it 

Regards,
Bartolo


Original comment by [email protected] on 29 Jan 2013 at 10:34

@GoogleCodeExporter
Copy link
Author

The release 2.1.1 is out

i've disabled by default  adding of project.getCompileSourceRoots() to the 
source directories of processor

to enable it we have to use <addCompileSourceRoots>true</addCompileSourceRoots> 
parameter 

Original comment by [email protected] on 30 Jan 2013 at 3:26

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant