Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Setup annotation processor options from maven compiler plugin config values #1

Closed
wants to merge 3 commits into from

Conversation

lorenzhawkes
Copy link
Contributor

compilerArgument and compilerArguments elements of the maven compiler
plugin.

The compilerArguments map simply looks for options that begin with -A.
The compilerArgument string is parsed looking for strings
that match the form -Akey[=value]

compilerArgument and compilerArguments elements of the maven compiler
plugin.

The compilerArguments map simply looks for options that begin with -A.
The compilerArgument string is parsed looking for strings
that match the form -Akey[=value]
the compiler arguments config, since they can not be specified there
correctly.

Renamed some methods to make their purpose clearer.

removed the isProcNone method and replaced it with
isAnnotationProcessingEnabled. This now looks for the -proc:none in the
compilerArgument element or the proc config element containing none. If
one of those is present in all configured compilers then annotation
processing is disabled.
@fbricon
Copy link
Member

fbricon commented Apr 19, 2012

That looks ok.

Now can you please :

  • add some test case(s) checking AptConfig.getRawProcessorOptions(javaProject) returns the expected options
  • rebase your branch and squash your commits into one (see http://help.github.com/rebase/). You'll have to force push the changes to your repo, but that should'nt be a problem.
    Your changes should appear as one commit after all the upstream ones.

fbricon pushed a commit that referenced this pull request Apr 23, 2012
Attempt to parse out annotation processor arguments from the
compilerArgument element of the maven compiler plugin.

The compilerArgument string is parsed looking for strings
that match the form -Akey[=value]

N.B. This method was cherry-picked from
#1
  - Fred

Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon
Copy link
Member

fbricon commented Apr 23, 2012

Since adding support for org.bsc.maven:maven-processor-plugin required quite some refactoring (3c6bf77), that pull request is out-of date, so I used your compilerArgument parsing method directly, kept you as the author.

Thanks.

@fbricon fbricon closed this Apr 23, 2012
@lorenzhawkes
Copy link
Contributor Author

Thanks for your help Fred

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

Successfully merging this pull request may close these issues.

None yet

2 participants