[
https://issues.apache.org/jira/browse/AURORA-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337087#comment-14337087
]
Kevin Sweeney commented on AURORA-1146:
---------------------------------------
Ok I think I've narrowed it down.
As a workaround you can
1. Import the project from build.gradle (not the output of {{./gradlew idea}}).
2. Run {{./gradlew classes}} once. This will run the annotation processor and
generate the cmdline info with a message like:
{noformat}
Note: Writing
file:/home/ksweeney/workspace/aurora/dist/classes/main/com/twitter/common/args/apt/cmdline.arg.info.txt.2
{noformat}
3. You can debug LocalSchedulerMain from IntelliJ now. This works because
importing from gradle adds {{dist/}} to the intellij classpath rather than
{{out/}}, and {{dist/}} contains the .txt file that the annotation processor
generated.
4. Whenever anything that's not a Java source file changes (you add or remove a
{{@CmdLine}} arg or change a {{.thrift}} file, re-run {{./gradlew classes}}.
It seems that the best way to fix this is to integrate the annotation processor
as a codegen-like task similar to the thrift codegen plugins. This
stackoverflow question more-or-less describes how to do this:
http://stackoverflow.com/questions/15584472/integrating-annotation-processors-with-gradle.
Then the project created by {{./gradlew idea}} will work as expected.
Since I've found a workaround for now I'm going to unassign this for the moment
- someone should feel free to pick it up.
> LocalSchedulerMain broken by JMH upgrade
> ----------------------------------------
>
> Key: AURORA-1146
> URL: https://issues.apache.org/jira/browse/AURORA-1146
> Project: Aurora
> Issue Type: Bug
> Components: Build, Scheduler
> Reporter: Kevin Sweeney
> Assignee: Kevin Sweeney
>
> Since the JMH patch the CmdLine annotation processor no longer runs in
> IntelliJ, making it impossible to run LocalSchedulerMain. This looks likely
> related to JMH adding its own annotation processor to the compile classpath.
> {noformat}
> commit 5542c556133bc1292e0a991b9db31f6465a83de8
> Author: Maxim Khutornenko <[email protected]>
> Date: Thu Dec 11 11:57:09 2014 -0800
> Adding JMH framework support for scheduler performance analysis.
>
> Reviewed at https://reviews.apache.org/r/28710/
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)