velo / maven-annotation-plugin

Automatically exported from code.google.com/p/maven-annotation-plugin
0 stars 0 forks source link

Plugin produces "duplicate class" error #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 t.gawan...@gmail.com on 20 Dec 2012 at 8:35

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 21 Dec 2012 at 9:09

GoogleCodeExporter commented 9 years ago
update milestone release

Original comment by bartolom...@gmail.com on 21 Dec 2012 at 9:10

GoogleCodeExporter commented 9 years ago
Hi

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

Thanks in advance

Original comment by bartolom...@gmail.com on 21 Jan 2013 at 11:58

GoogleCodeExporter commented 9 years ago
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 t.gawan...@gmail.com on 23 Jan 2013 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
thx for feedback

i'll check soon

Original comment by bartolom...@gmail.com on 23 Jan 2013 at 6:24

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 23 Jan 2013 at 10:18

GoogleCodeExporter commented 9 years ago
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 t.gawan...@gmail.com on 24 Jan 2013 at 7:19

GoogleCodeExporter commented 9 years ago
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 desci...@gmail.com on 25 Jan 2013 at 3:37

GoogleCodeExporter commented 9 years ago
I've deployed release 2.1.1-SNAPSHOT 

Please, could you test it and let me know ?

Thanks in advance

Original comment by bartolom...@gmail.com on 25 Jan 2013 at 7:12

GoogleCodeExporter commented 9 years ago
Tried it, but at least for me the error remains

I attached my pom and console output.

Original comment by desci...@gmail.com on 25 Jan 2013 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 25 Jan 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Sorry, no improvement for me. Error is the same

Original comment by desci...@gmail.com on 26 Jan 2013 at 9:12

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 26 Jan 2013 at 3:43

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 26 Jan 2013 at 10:25

GoogleCodeExporter commented 9 years ago
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 desci...@gmail.com on 28 Jan 2013 at 8:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 28 Jan 2013 at 12:07

GoogleCodeExporter commented 9 years ago
I stripped it down. I hope it did not miss anything important.

Original comment by desci...@gmail.com on 29 Jan 2013 at 8:51

Attachments:

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 29 Jan 2013 at 10:34

GoogleCodeExporter commented 9 years ago
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 bartolom...@gmail.com on 30 Jan 2013 at 3:26