weld-se CDI and intellij idea with multiple modules

468 views Asked by At

I have case where I am developing simple standalone application constructed from 3 jars (A,B,C) built by maven. each of this jar is a separate module in intellij idea.

jar A has dependency on jar B and C. jar A starts weld-se container and load beans from itself and from other jars.

now this works perfectly fine when all jars are built and started from maven/cmd. but if I start it from intellij, weld-se is not able to find beans from others module - even though beans.xml are correctly placed in META-INF and META-INF is copied to target directory.

the problem occurs because IDEA puts target/classes (for each managed module) on classpath when starting application rather then built jars (so any updates to sources are immediately picked up after making project).

Is there any work-around to develop with such configuration in IDEA??? I am using IDEA 12 but I don't think it matters.

I know that building artifacts for war archive is sometimes tricky and I had to exclude modules and force inetllij to load jars to archive. but I cannot do it here.

any help appreciated!

0

There are 0 answers