Skip to content

Project fails to build in IntelliJ IDEA 2019.1 #40550

Closed
@mark-vieira

Description

@mark-vieira

The latest version of IntelliJ, 2019.1 enforces some new constraints around module content roots. It turns out that IntelliJ does not support multiple modules with the same sources context root. That is, two modules cannot share a single source directory. Gradle does in fact support such a scenario and models it correctly and we do this in a number of places in our build. While this seemed to work with IntelliJ 2018.3 I suspect it only coincidentally worked in scenarios where one root was production source and the other was test source due to implementation details in the IntelliJ project model. This is now outright disallowed and IntelliJ will remove the duplicate root definitions at import time.

2019-03-27 10:33:26,183 [ 914974]   WARN - .manage.ContentRootDataService - Path [/Users/mark/workspaces/elasticsearch/x-pack/license-tools/src/main/java] of module [elasticsearch.x-pack.license-tools.main] was removed from modules [elasticsearch.x-pack.plugin.core.test] 

There are a number of beneficial features in IntelliJ 2019.1 so we should try and sort this out. Likely by relying on project dependencies rather than shared source directories where possible, and potentially some refactoring where not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Delivery/BuildBuild or test infrastructureTeam:DeliveryMeta label for Delivery team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions