Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-incubating
    • Fix Version/s: 1.0.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      org-apache-calcite-jdbc.properties includes build.timestamp=${build.timestamp} so it is different on each build execution.

      Need to do something with that.

      Does it make sense to convert this file to some generated java source?
      That might allow us to reuse Velocity caching of maven-remote-resource-plugins.

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment -

          Closing now that 1.0.0-incubating has been released.

          Show
          julianhyde Julian Hyde added a comment - Closing now that 1.0.0-incubating has been released.
          Show
          vladimirsitnikov Vladimir Sitnikov added a comment - Fixed in https://git-wip-us.apache.org/repos/asf?p=incubator-calcite.git;a=commit;h=35a5b4f53b550761b3e6f1321767471a9820d95f
          Hide
          vladimirsitnikov Vladimir Sitnikov added a comment - - edited

          Could we create it only if it does not exist?

          Yes, this can be done.

          Here's the patch. Do you accept such approach?

          @@ -162,10 +162,6 @@ limitations under the License.
                   </excludes>
                 </resource>
                 <resource>
          -        <directory>src/main/resources/version</directory>
          -        <filtering>true</filtering>
          -      </resource>
          -      <resource>
                   <!-- Copy freemarker template and fmpp configuration files of
                        Calcite's SQL parser to allow clients to extend parser. -->
                   <directory>${basedir}/src/main/codegen</directory>
          @@ -174,4 +170,22 @@ limitations under the License.
               </resources>
             </build>
           
          +  <profiles>
          +    <profile>
          +      <id>generate-version-properties</id>
          +      <activation>
          +        <activeByDefault>false</activeByDefault>
          +        <file><missing>target/classes/org-apache-calcite-jdbc.properties</missing></file>
          +      </activation>
          +      <build>
          +        <resources>
          +          <resource>
          +            <directory>src/main/resources/version</directory>
          +            <filtering>true</filtering>
          +          </resource>
          +        </resources>
          +      </build>
          +    </profile>
          +  </profiles>
          +
           </project>
          
          Show
          vladimirsitnikov Vladimir Sitnikov added a comment - - edited Could we create it only if it does not exist? Yes, this can be done. Here's the patch. Do you accept such approach? @@ -162,10 +162,6 @@ limitations under the License. </excludes> </resource> <resource> - <directory>src/main/resources/version</directory> - <filtering>true</filtering> - </resource> - <resource> <!-- Copy freemarker template and fmpp configuration files of Calcite's SQL parser to allow clients to extend parser. --> <directory>${basedir}/src/main/codegen</directory> @@ -174,4 +170,22 @@ limitations under the License. </resources> </build> + <profiles> + <profile> + <id>generate-version-properties</id> + <activation> + <activeByDefault>false</activeByDefault> + <file><missing>target/classes/org-apache-calcite-jdbc.properties</missing></file> + </activation> + <build> + <resources> + <resource> + <directory>src/main/resources/version</directory> + <filtering>true</filtering> + </resource> + </resources> + </build> + </profile> + </profiles> + </project>
          Hide
          vladimirsitnikov Vladimir Sitnikov added a comment -

          Why can't it use git.properties?

          Show
          vladimirsitnikov Vladimir Sitnikov added a comment - Why can't it use git.properties?
          Hide
          julianhyde Julian Hyde added a comment -

          No, we need the file. It's where the JDBC driver gets its name and version from.

          Show
          julianhyde Julian Hyde added a comment - No, we need the file. It's where the JDBC driver gets its name and version from.
          Hide
          vladimirsitnikov Vladimir Sitnikov added a comment -

          Can we drop this org-apache-calcite-jdbc.properties?
          I guess we can use git.properties instead.

          Show
          vladimirsitnikov Vladimir Sitnikov added a comment - Can we drop this org-apache-calcite-jdbc.properties? I guess we can use git.properties instead.
          Hide
          julianhyde Julian Hyde added a comment -

          Could we create it only if it does not exist? For regular builds we would get a stale build.timestamp – but that's not a problem. For release builds we would be sure to do a clean first, therefore we will get an accurate build.timestamp.

          Show
          julianhyde Julian Hyde added a comment - Could we create it only if it does not exist? For regular builds we would get a stale build.timestamp – but that's not a problem. For release builds we would be sure to do a clean first, therefore we will get an accurate build.timestamp.

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              vladimirsitnikov Vladimir Sitnikov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development