Artifact not re-built on run

I have a two module project:

project_agent
--module_myagent
--module_myapp

There is an artifact that bundles module_myagent into myagent.jar

Run configuration runs myapp.Test class with VM option:

-javaagent:project_agent/out/artifacts/myagent.jar

it has checked Before Launch Make and Build 'myagent:jar' artifact.


Problem:
When I start this run configuration myagent.jar is not re-built, i.e. changes in module_myagent are not re-compiled and rebundled into myagent.jar. I need to force manual compilation of classes from module_myagent for myagent.jar to be rebuilt.

Am I missing anything in the settings  ?:|? Would like for Shift-F10 to re-build myagent.jar if there were any changes in module_myagent.

P.S. If I add module_myagent to dependencies of module_myapp than the changes are picked up and myagent.jar is re-built but this is not an acceptable solution as module_myagent is added to runtime classpath (even if Scope is "Compile")
project_myagent.PNG

2 comments
Comment actions Permalink

Looks like this is a bug. Could you please create an issue in our tracker (http://youtrack.jetbrains.com/issues/IDEA)? As a workaround you can add the
following line:
makeProjectOnRun=true
to /bin/idea.properties file.

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.