|
|
|
A simple example:
1. I have project A that has a dependency on project B 2. The dependency on project B is marked as optional with <optional>true</optional> and <scope>compile</compile> => B is not transitive in Maven terms 3. I have a project C that depends on project B 4. Now, if I'm in IDEA project B will be added to the list of modules libraries. This means that I can use anything within project B and that will compile within IDEA. But, if I run a maven build I will get an ClassNotFoundException as maven it will not add project B to classpath as project B is not considered transitive by Maven. For use cases of such usage you may take a look at http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html I'm afraid IDEA does not support optional inter-module dipendencies. The classpath is build transitively irrelatively the export flag.
We will handle the <optional> tag and set the export flag accordingly. This functonality will be available in the fist 7.0.4 eap. If you have some problem running your apps from IDEA, please elaborate the details. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Could you please give some concrete example?