| Priority |
Normal |
| Type | Bug |
| State | Duplicate |
| Assignee | Anton Makeev |
| Subsystem | Maven Integration |
| Affected versions |
No affected versions
|
| Fixed in |
No fix versions
|
| Fixed in build | Next build |
| Build |
7590
|
| Severity |
0
|
IDEA-17064 |
IDEA does not handle <optional> dependency tag |
|
|
Could you please give some concrete 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.
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.