Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7032

Intellij is constantly changing language level of sub projects back to 1.6

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3.2, 1.4.0
    • Build System
    • None

    Description

      Every time I do maven reimport projects, Intellij is switching back to 1.6 language level. I tracked down this issue to misconfiguration in our pom.xml file. It correctly configure maven-compiler-plugin:

      			<plugin>
      				<!-- just define the Java version to be used for compiling and plugins -->
      				<groupId>org.apache.maven.plugins</groupId>
      				<artifactId>maven-compiler-plugin</artifactId>
      				<version>3.1</version><!--$NO-MVN-MAN-VER$-->
      				<configuration>
      					<source>${java.version}</source>
      					<target>${java.version}</target>
      					<!-- The output of Xlint is not shown by default, but we activate it for the QA bot
      					to be able to get more warnings -->
      					<compilerArgument>-Xlint:all</compilerArgument>
      				</configuration>
      			</plugin>
      

      where ${java.version} is set to 1.7 in the properties, but it forgets to overwrite the following properties from apache-18.pom:

        <properties>
          <maven.compiler.source>1.6</maven.compiler.source>
          <maven.compiler.target>1.6</maven.compiler.target>
        </properties>
      

      It seems like compiling from console using maven ignores those values, but they are confusing Intellij.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            pnowojski Piotr Nowojski
            pnowojski Piotr Nowojski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment