Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Multiple <processor> tags should trigger an error #56

Closed
cowwoc opened this issue May 2, 2017 · 4 comments
Closed

Multiple <processor> tags should trigger an error #56

cowwoc opened this issue May 2, 2017 · 4 comments
Assignees

Comments

@cowwoc
Copy link

cowwoc commented May 2, 2017

If one provides the following configuration:

<configuration>
	<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
	<processor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</processor>
</configuration>

then the second processor will be ignored silently.

Expected behavior: the plugin should fail, complaining that multiple processors must be enclosed in a <processors> tag.

@Shredder121 Shredder121 self-assigned this May 7, 2017
@Shredder121
Copy link
Member

I just tested if we see multiple calls to setProcessor if the configuration has multiple <processor/> tags.
This is not the case.

So there is nothing we can do unfortunately.

To be honest, I would think it's a cleaner solution to have the check upstream (in Maven) so more than just this project benefits from it.

@cowwoc
Copy link
Author

cowwoc commented May 7, 2017

Thanks for the update. Filed https://issues.apache.org/jira/browse/MNG-6227 and closing this issue.

@cowwoc cowwoc closed this as completed May 7, 2017
@Shredder121
Copy link
Member

Thanks for reporting it.
Just for posterity's sake; it would be good if Maven allowed for discerning whether multiple tags of the same name were given, or reject it completely.

@michael-o
Copy link

Though this one is old, here is a followup: codehaus-plexus/modello#78

If you need multiple processors, use it as a list with:

<processors>
  <processor>A</processor>
  <processor>B</processor>
  ...
</processors>

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

No branches or pull requests

3 participants