Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      module-info.java is required for JDK9 Jigsaw feature.

        Activity

        Hide
        stevel@apache.org Steve Loughran added a comment -

        What does this do for the java7/8 compilers? Do they fail when they hit the file, or explicitly know to skip it?

        If they fail, we will have to create a separate src/modules/ source tree just for the module-info

        Show
        stevel@apache.org Steve Loughran added a comment - What does this do for the java7/8 compilers? Do they fail when they hit the file, or explicitly know to skip it? If they fail, we will have to create a separate src/modules/ source tree just for the module-info
        Hide
        stevel@apache.org Steve Loughran added a comment -

        Maven seems to cover this

        We can compile the main code as Java 8, while adding in the module-info classes with java9c. This will let us add modularity data to a build which still runs in a Java 8 JVM. Nice

        Show
        stevel@apache.org Steve Loughran added a comment - Maven seems to cover this We can compile the main code as Java 8, while adding in the module-info classes with java9c. This will let us add modularity data to a build which still runs in a Java 8 JVM. Nice
        Hide
        ajisakaa Akira Ajisaka added a comment -

        Java8 compiler fails when it hits module-info.java. To avoid this problem, I'm thinking we can create a setting for java8 to skip this file.

        pom.xml
        <profiles>
          <profile>
            <id>java8</id>
            <activation>
              <jdk>1.8</jdk>
            </activation>
            <build>
              <plugins>
                <plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <configuration>
                    <excludes>
                      <exclude>**/module-info.java</exclude>
                    </excludes>
                  </configuration>
                </plugin>
              </plugins>
            </build>
          </profile>
        </profiles>
        
        Show
        ajisakaa Akira Ajisaka added a comment - Java8 compiler fails when it hits module-info.java. To avoid this problem, I'm thinking we can create a setting for java8 to skip this file. pom.xml <profiles> <profile> <id>java8</id> <activation> <jdk>1.8</jdk> </activation> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <excludes> <exclude>**/module-info.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> </profile> </profiles>
        Hide
        stevel@apache.org Steve Loughran added a comment -

        I see. we should make sure that IDEs don't fail either; having a separate resource tree may be required for IDEA and eclipse

        Show
        stevel@apache.org Steve Loughran added a comment - I see. we should make sure that IDEs don't fail either; having a separate resource tree may be required for IDEA and eclipse

          People

          • Assignee:
            Unassigned
            Reporter:
            ajisakaa Akira Ajisaka
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development