Repository: calcite
Updated Branches:
  refs/heads/master 8bbef2d6f -> 95fd04176


[CALCITE-553] Enable compiler profiles by default

A number of profiles were conditionally enabled by default
in an attempt to make incremental compilation work. The
implementation ended up breaking standard maven convention
such as the inclusion of the "clean" lifecycle phase with
another lifecycle phase such as "package".

The profiles can still be disabled on the command line by
users who wish to do so (and know they haven't updated the
files).

Closes apache/calcite#196


Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/95fd0417
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/95fd0417
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/95fd0417

Branch: refs/heads/master
Commit: 95fd04176576958c7766c98945186092ae226764
Parents: 8bbef2d
Author: Josh Elser <[email protected]>
Authored: Thu Feb 11 18:15:23 2016 -0500
Committer: Josh Elser <[email protected]>
Committed: Thu Feb 18 23:58:17 2016 -0500

----------------------------------------------------------------------
 core/pom.xml          | 10 ++++++----
 site/_docs/howto.md   | 20 +++++++++++++++++---
 site/develop/index.md |  7 -------
 3 files changed, 23 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/95fd0417/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 64c4e3a..8a548dd 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -416,8 +416,9 @@ limitations under the License.
       the same contents -->
       <id>generate-version-properties</id>
       <activation>
-        <activeByDefault>false</activeByDefault>
-        
<file><missing>target/classes/org-apache-calcite-jdbc.properties</missing></file>
+        <property>
+          <name>!skipGenerate</name>
+        </property>
       </activation>
       <build>
         <resources>
@@ -435,8 +436,9 @@ limitations under the License.
       -->
       <id>generate-parser</id>
       <activation>
-        <activeByDefault>false</activeByDefault>
-        
<file><missing>target/generated-sources/fmpp/javacc/Parser.jj</missing></file>
+        <property>
+          <name>!skipGenerate</name>
+        </property>
       </activation>
       <build>
         <plugins>

http://git-wip-us.apache.org/repos/asf/calcite/blob/95fd0417/site/_docs/howto.md
----------------------------------------------------------------------
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index 1498152..13f2e72 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -62,6 +62,22 @@ $ cd calcite
 $ mvn install
 {% endhighlight %}
 
+Calcite includes a number of machine-generated codes. By default, these are
+regenerated on every build, but this has the negative side-effect of causing
+a re-compilation of the entire project when the non-machine-generated code
+has not changed. To make sure incremental compilation still works as intended,
+provide the `skipGenerate` command line option with your maven command.
+If you invoke the `clean` lifecycle phase, you must not specify the
+`skipGenerate` option as it will not recompile the necessary code for the build
+to succeed.
+
+{% highlight bash %}
+$ mvn clean
+$ mvn package
+... hacks ...
+$ mvn package -DskipGenerate
+{% endhighlight %}
+
 [Running tests](#running-tests) describes how to run more or fewer
 tests.
 
@@ -71,9 +87,7 @@ The test suite will run by default when you build, unless you 
specify
 `-DskipTests`:
 
 {% highlight bash %}
-# Note: "mvn clean install" does not work; use "mvn clean" then "mvn install"
-$ mvn clean
-$ mvn -DskipTests install
+$ mvn -DskipTests clean install
 $ mvn test
 {% endhighlight %}
 

http://git-wip-us.apache.org/repos/asf/calcite/blob/95fd0417/site/develop/index.md
----------------------------------------------------------------------
diff --git a/site/develop/index.md b/site/develop/index.md
index 3705c43..c2b11f3 100644
--- a/site/develop/index.md
+++ b/site/develop/index.md
@@ -52,13 +52,6 @@ $ cd calcite
 $ mvn install
 {% endhighlight %}
 
-If you need to re-build from scratch, clean and install as two separate steps:
-
-{% highlight bash %}
-$ mvn clean
-$ mvn install
-{% endhighlight %}
-
 The HOWTO describes how to
 [build from a source distribution]({{ site.baseurl 
}}/docs/howto.html#building-from-a-source-distribution),
 [run more or fewer tests]({{ site.baseurl }}/docs/howto.html#running-tests) and

Reply via email to