Skip to content

Commit

Permalink
[CALCITE-536] Add @PackageMarker to package-info.java so maven-compil…
Browse files Browse the repository at this point in the history
…er skips compilation when the sources are unchanged

This is a temporary workaround for https://jira.codehaus.org/browse/MCOMPILER-205.
The proper fix is to generate empty package-info.class in maven-compiler-plugin when package-info.java is "empty"
  • Loading branch information
vlsi committed Jan 6, 2015
1 parent 46b5691 commit 957dea1
Show file tree
Hide file tree
Showing 72 changed files with 280 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Avatica server that listens for HTTP requests.
*/
@PackageMarker
package org.apache.calcite.avatica.server;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Avatica JDBC framework.
*/
@PackageMarker
package org.apache.calcite.avatica;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* JDBC driver that uses remote procedure calls.
*/
@PackageMarker
package org.apache.calcite.avatica.remote;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.calcite.avatica.util;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* This is a dummy annotation that forces javac to produce output for
* otherwise empty package-info.java.
*
* <p>The result is maven-compiler-plugin can properly identify the scope of
* changed files
*
* <p>See more details in
* <a href="https://jira.codehaus.org/browse/MCOMPILER-205">
* maven-compiler-plugin: incremental compilation broken</a>
*/
@Retention(RetentionPolicy.SOURCE)
public @interface PackageMarker {
}

// End PackageMarker.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/**
* Avatica utilities.
*/
@PackageMarker
package org.apache.calcite.avatica.util;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Avatica tests.
*/
@PackageMarker
package org.apache.calcite.avatica.test;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Provides utility classes.
*/
@PackageMarker
package org.apache.calcite.adapter.clone;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Calcite-specific classes for implementation of regular and window aggregates.
*/
@PackageMarker
package org.apache.calcite.adapter.enumerable.impl;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Query optimizer rules for Java calling convention.
*/
@PackageMarker
package org.apache.calcite.adapter.enumerable;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Query provider based on Java in-memory data
* structures.
*/
@PackageMarker
package org.apache.calcite.adapter.java;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Query provider based on a JDBC data source.
*/
@PackageMarker
package org.apache.calcite.adapter.jdbc;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
* </pre>
* </blockquote>
*/
@PackageMarker
package org.apache.calcite.adapter;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Configuration.
*/
@PackageMarker
package org.apache.calcite.config;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* preparation time is less, and so the total prepare + execute time is
* competitive for queries over small data sets.
*/
@PackageMarker
package org.apache.calcite.interpreter;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/jdbc/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* JDBC driver for Calcite.
*/
@PackageMarker
package org.apache.calcite.jdbc;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
* instantiating materializations from the intermediate results of queries, and
* recognize what materializations would be useful based on actual query load.
*/
@PackageMarker
package org.apache.calcite.materialize;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/model/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
* <a href="https://github.com/julianhyde/blog/master/optiq-csv/TUTORIAL.md">optiq-csv
* tutorial</a>.
*/
@PackageMarker
package org.apache.calcite.model;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Main package for Calcite, the dynamic data management platform.
*/
@PackageMarker
package org.apache.calcite;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Provides a heuristic planner implementation for the interfaces in
* {@link org.apache.calcite.plan}.
*/
@PackageMarker
package org.apache.calcite.plan.hep;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/plan/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Defines interfaces for constructing rule-based optimizers of
* relational expressions.
*/
@PackageMarker
package org.apache.calcite.plan;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@
* McKenna
* (1993)</a>.</p>
*/
@PackageMarker
package org.apache.calcite.plan.volcano;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Preparation of queries (parsing, planning and implementation).
*/
@PackageMarker
package org.apache.calcite.prepare;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Defines relational expressions and rules for converting between calling
* conventions.
*/
@PackageMarker
package org.apache.calcite.rel.convert;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
*
* </ul>
*/
@PackageMarker
package org.apache.calcite.rel.core;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Facilities to externalize {@link org.apache.calcite.rel.RelNode}s to and from
* XML and JSON format.
*/
@PackageMarker
package org.apache.calcite.rel.externalize;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Contains query transformation rules relating to generating SQL for
* foreign JDBC databases.
*/
@PackageMarker
package org.apache.calcite.rel.jdbc;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
*
* </ul>
*/
@PackageMarker
package org.apache.calcite.rel.logical;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
* Defines metadata interfaces and utilities for relational
* expressions.
*/
@PackageMarker
package org.apache.calcite.rel.metadata;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/rel/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
*
* </ul>
*/
@PackageMarker
package org.apache.calcite.rel;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
* provides an optimizer interface.</li>
* </ul>
*/
@PackageMarker
package org.apache.calcite.rel.rules;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Defines a type system for relational expressions.
*/
@PackageMarker
package org.apache.calcite.rel.type;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/rex/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
*
* </ul>
*/
@PackageMarker
package org.apache.calcite.rex;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Utilities required at runtime.
*/
@PackageMarker
package org.apache.calcite.runtime;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Utilities to help implement Calcite's SPIs.
*/
@PackageMarker
package org.apache.calcite.schema.impl;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* SQL validator to validate SQL abstract syntax trees and resolve
* identifiers to objects.
*/
@PackageMarker
package org.apache.calcite.schema;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
/**
* Provides a server for hosting Calcite connections.
*/
@PackageMarker
package org.apache.calcite.server;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* <p>The advisor uses the validation and parser framework set up in
* <code>org.apache.calcite.sql.validate</code> package.
*/
@PackageMarker
package org.apache.calcite.sql.advise;

import org.apache.calcite.avatica.util.PackageMarker;

// End package-info.java
Loading

0 comments on commit 957dea1

Please sign in to comment.