beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [1/2] incubator-beam git commit: Move the separate package-info.java compile to java7 profile since it's not needed with java8 This fixes compiling in Eclipse (assuming Neon which require java8) Slightly speeds up Java8 compile (one invoke of compiler pl
Date Thu, 03 Nov 2016 22:11:10 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master eac68cb21 -> 2a1fdee5c


Move the separate package-info.java compile to java7 profile since it's not needed with java8
This fixes compiling in Eclipse (assuming Neon which require java8)
Slightly speeds up Java8 compile (one invoke of compiler plugin)


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/3cef71e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/3cef71e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/3cef71e0

Branch: refs/heads/master
Commit: 3cef71e0653c24c44aef3515ce80c70eceac37c6
Parents: eac68cb
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Nov 2 16:14:00 2016 -0400
Committer: Kenneth Knowles <klk@google.com>
Committed: Thu Nov 3 15:10:56 2016 -0700

----------------------------------------------------------------------
 pom.xml | 73 +++++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 48 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/3cef71e0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cb1e4d6..ea7d4ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,6 +133,8 @@
     <woodstox.version>4.4.1</woodstox.version>
     
     <compiler.error.flag>-Werror</compiler.error.flag>
+    <compiler.default.pkginfo.flag>-Xpkginfo:always</compiler.default.pkginfo.flag>
+    <compiler.default.exclude>nothing</compiler.default.exclude>
   </properties>
 
   <packaging>pom</packaging>
@@ -224,6 +226,48 @@
         <beam.javadoc_opts>-Xdoclint:-missing</beam.javadoc_opts>
       </properties>
     </profile>
+    <profile>
+      <id>java7-packageinfo</id>
+      <activation>
+        <jdk>1.7</jdk>
+      </activation>
+      <properties>
+        <!--
+         Exclude package-info.java from main compilation to work around
+         https://jira.codehaus.org/browse/MCOMPILER-205
+         -->
+        <compiler.default.pkginfo.flag>-Xpkginfo:legacy</compiler.default.pkginfo.flag>
+        <compiler.default.exclude>**/package-info.java</compiler.default.exclude>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <executions>
+              <!--
+               Compile just package-info.java to avoid
+               https://bugs.openjdk.java.net/browse/JDK-8022161
+               -->
+              <execution>
+                <id>compile-package-info</id>
+                <goals>
+                  <goal>compile</goal>
+                </goals>
+                <phase>compile</phase>
+                <configuration>
+                  <compilerArgs>
+                    <arg>-Xpkginfo:always</arg>
+                  </compilerArgs>
+                  <includes>
+                    <include>**/package-info.java</include>
+                  </includes>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
 
     <profile>
       <id>eclipse-jdt</id>
@@ -832,10 +876,6 @@
           </configuration>
           <executions>
 
-            <!--
-              Exclude package-info.java from main compilation to work around
-              https://jira.codehaus.org/browse/MCOMPILER-205
-            -->
             <execution>
               <id>default-compile</id>
               <goals>
@@ -843,29 +883,12 @@
               </goals>
               <phase>compile</phase>
               <configuration>
-                <excludes>
-                  <exclude>**/package-info.java</exclude>
-                </excludes>
-              </configuration>
-            </execution>
-
-            <!-- 
-              Compile just package-info.java to avoid 
-              https://bugs.openjdk.java.net/browse/JDK-8022161
-            -->
-            <execution>
-              <id>compile-package-info</id>
-              <goals>
-                <goal>compile</goal>
-              </goals>
-              <phase>compile</phase>
-              <configuration>
                 <compilerArgs>
-                  <arg>-Xpkginfo:always</arg>
+                  <arg>${compiler.default.pkginfo.flag}</arg>
                 </compilerArgs>
-                <includes>
-                  <include>**/package-info.java</include>
-                </includes>
+                <excludes>
+                  <exclude>${compiler.default.exclude}</exclude>
+                </excludes>
               </configuration>
             </execution>
           </executions>


Mime
View raw message