[
https://issues.apache.org/jira/browse/BEAM-7480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855459#comment-16855459
]
Maximilian Michels commented on BEAM-7480:
------------------------------------------
I've tried out your proposed solution. It gets rid off the duplicate content
root issue in IntelliJ. However, now IntelliJ does not recognize any of the
source. Upon marking source folders manually, dependencies are not resolved
correctly. Compiling and testing via Gradle works but Spotless does not because
it operates on the SourceSet level. Overall, the cons seem to outweigh the pros.
With newer IntelliJ version ({{2019.1.2}}) duplicate content roots are
de-duplicated during import; the issue in the project settings is not present
anymore. This seems like a good enough fix.
> Content root "runners/flink/1.5/src/main/java" is defined for modules
> "beam.runners.flink.1.5.main" and "beam.runners.flink.1.6.main".
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: BEAM-7480
> URL: https://issues.apache.org/jira/browse/BEAM-7480
> Project: Beam
> Issue Type: Improvement
> Components: runner-flink
> Reporter: Luke Cwik
> Assignee: Maximilian Michels
> Priority: Major
>
> When editing module settings in Intellij, I get the following error now:
> ```
> Content root "~/git/beam/runners/flink/1.5/src/main/java" is defined for
> modules "beam.runners.flink.1.5.main" and "beam.runners.flink.1.6.main".
> Two modules in a project cannot share the same content root.
> ```
> I have hit this error before when getting "two" projects both point at the
> same source path. This has been worked around in the past by setting the
> source in compileJava/compileTestJava instead of updating the content roots
> to point to the same directory.
>
> Both runners/google-cloud-dataflow-java/worker and
> [runners/google-cloud-dataflow-java/worker/legacy-worker|https://github.com/apache/beam/blob/f50e7d0d3e8ac7ee39f46bc2cf7ce52f944e502f/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle#L181]
> use the same source files.
> [runners/google-cloud-dataflow-java/worker/legacy-worker|https://github.com/apache/beam/blob/f50e7d0d3e8ac7ee39f46bc2cf7ce52f944e502f/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle#L181]
> uses a method that works around the Intellij limitation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)