[ 
https://issues.apache.org/jira/browse/AURORA-1146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15049277#comment-15049277
 ] 

John Sirois commented on AURORA-1146:
-------------------------------------

It looks like in modern IntelliJ the run configuration for a main puts _all_ 
classes from module dependencies on the classpath and this is the issue here; 
ie I find the following pertinent bits of classpath when right-click-run-main 
in IDEA:
{noformat}
/usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar
/home/jsirois/dev/3rdparty/aurora/out/test/aurora
/home/jsirois/dev/3rdparty/aurora/out/production/aurora
/home/jsirois/dev/3rdparty/aurora/dist/build-properties
/home/jsirois/dev/3rdparty/aurora/out/production/api
/home/jsirois/dev/3rdparty/aurora/api/dist/thrift/classes
/home/jsirois/dev/3rdparty/aurora/api/dist/dependency-cache
/home/jsirois/dev/3rdparty/aurora/api/dist/thrift/gen-resources
/home/jsirois/dev/3rdparty/aurora/api/dist/thriftEntities/classes
/home/jsirois/dev/3rdparty/aurora/api/dist/thriftEntities/gen-resources
/home/jsirois/.gradle/caches/modules-2/files-2.1/org.apache.thrift/libthrift/0.9.1/16c9cccf08caa385b5fc93934cb3216fe6ac6a72/libthrift-0.9.1.jar
...
/home/jsirois/dev/3rdparty/aurora/out/test/commons
/home/jsirois/dev/3rdparty/aurora/out/production/commons
/home/jsirois/dev/3rdparty/aurora/commons/dist/thrift/classes
{noformat}

Naively - this is bad behavior on the part of IDEA, neither 
`/home/jsirois/dev/3rdparty/aurora/out/test/aurora` nor 
`/home/jsirois/dev/3rdparty/aurora/out/test/commons` (the problem cp entry in 
this case) should be on the classpath of LocalSchedulerMain for most reasonable 
definitions of classpath dependencies between modules, and classpath 
dependencies between production src and test code.

There appear to be no knobs at all in the IDE to narrow the scope of a module 
dependency such that you only depend on its production src.

> 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
>
> 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 <ma...@apache.org>
> 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)

Reply via email to