You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/01/19 11:11:00 UTC

[GitHub] jixuan1989 opened a new pull request #4: modify ASF header for each file and add related maven plugin

jixuan1989 opened a new pull request #4: modify ASF header for each file and add related maven plugin
URL: https://github.com/apache/incubator-iotdb/pull/4
 
 
   * modify asf header for each file
   * enable apache-rat-plugin
   * add more exclusive files on apache-rat-plugin and license-maven-plugin, i.e., *.json, *.md, and *.csv
   
   only 3 files (pom.xml, tsfile/pom.xml, and jdbc/pom.xml) are modified manually, all others are modified by program automatically.
   
   So, reviewers need to review the 3 files.
   
   I also attach the 3 diff files:
   
   ```diff
   diff --git a/pom.xml b/pom.xml
   index 118be212..8dcc8fa8 100644
   --- a/pom.xml
   +++ b/pom.xml
   @@ -1,8 +1,6 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    
   -    Copyright © 2019 Apache IoTDB(incubating) (dev@iotdb.apache.org)
   -
        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
   @@ -13,11 +11,12 @@
    
            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.
   +    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.
    
    -->
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   @@ -275,6 +274,7 @@
                        <configLocation>checkstyle.xml</configLocation>
                    </configuration>
                </plugin>
   +            <!-- use mvn license:remove to remove license header; mvn license:format -->
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
   @@ -292,8 +292,9 @@
                        </mapping>
                        <excludes>
                            <exclude>**/README.md</exclude>
   -                        <exclude>**/src/test/resources/**</exclude>
   -                        <exclude>**/src/main/resources/**</exclude>
   +                        <exclude>**/src/test/resources/*.json</exclude>
   +                        <exclude>**/src/main/resources/*.json</exclude>
   +                        <exclude>jdbc/example/data/*.csv</exclude>
                            <exclude>**/*.log</exclude>
                            <exclude>licenses-binary/*</exclude>
                            <exclude>.checkstyle</exclude>
   @@ -316,7 +317,7 @@
                  Check if all files contain Apache headers in them.
                  Ignore this plugin, we use license-maven-plugin to check apache header.
                -->
   -            <!-- 			<plugin>
   +            <plugin>
                  <groupId>org.apache.rat</groupId>
                  <artifactId>apache-rat-plugin</artifactId>
                  <executions>
   @@ -329,29 +330,33 @@
                    </execution>
                  </executions>
                  <configuration>
   -                Should be enabled as soon as the headers are in position
   -                <skip>true</skip>
                    <excludes>
   -                  Git related files
   +                  <!-- Git related files -->
                      <exclude>**/.git/**</exclude>
                      <exclude>**/.gitignore</exclude>
    
   -                  Maven related files
   +                  <!-- Maven related files -->
                      <exclude>**/target/**</exclude>
    
   -                  Eclipse related files
   +                  <!-- Eclipse related files -->
                      <exclude>**/.project</exclude>
                      <exclude>**/.settings/**</exclude>
                      <exclude>**/.classpath</exclude>
    
   -                  IntelliJ related files
   +                  <!-- IntelliJ related files -->
                      <exclude>**/.idea/**</exclude>
                      <exclude>**/*.iml</exclude>
   -                  Runtime log
   +                  <!-- Runtime log -->
                      <exclude>**/*.log</exclude>
   +                  <!-- licenses-binary -->
   +                  <exclude>licenses-binary/*</exclude>
   +                  <!-- MarkDown files -->
   +                  <exclude>**/*.md</exclude>
   +                  <!--Checkstyle files -->
   +                  <exclude>.checkstyle</exclude>
                    </excludes>
                  </configuration>
   -            </plugin> -->
   +            </plugin>
                <!--use `mvn cobertura:cobertura` -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
   ```
   
   ```diff
   diff --git a/tsfile/pom.xml b/tsfile/pom.xml
   index ba1c9393..8e33bd3f 100644
   --- a/tsfile/pom.xml
   +++ b/tsfile/pom.xml
   @@ -1,8 +1,6 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    
   -    Copyright © 2019 Apache IoTDB(incubating) (dev@iotdb.apache.org)
   -
        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
   @@ -13,11 +11,12 @@
    
            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.
   +    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.
    
    -->
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   @@ -93,6 +92,17 @@
                        </execution>
                    </executions>
                </plugin>
   +            <plugin>
   +                <groupId>org.apache.rat</groupId>
   +                <artifactId>apache-rat-plugin</artifactId>
   +                <configuration>
   +                    <excludes>
   +                        <exclude>src/test/resources/*.json</exclude>
   +                        <!-- MarkDown files -->
   +                        <exclude>**/*.md</exclude>
   +                    </excludes>
   +                </configuration>
   +            </plugin>
            </plugins>
        </build>
    </project>
   ```
   
   ```diff
   diff --git a/jdbc/pom.xml b/jdbc/pom.xml
   index 2a072710..1c9f2e7a 100644
   --- a/jdbc/pom.xml
   +++ b/jdbc/pom.xml
   @@ -1,6 +1,8 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
   
   +    Copyright © 2019 Apache IoTDB(incubating) (dev@iotdb.apache.org)
   +
        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
   @@ -11,12 +13,11 @@
   
            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.
   +    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.
   
    -->
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   @@ -74,17 +75,6 @@
                        <skipTests>${jdbc.test.skip}</skipTests>
                    </configuration>
                </plugin>
   -            <plugin>
   -                <groupId>org.apache.rat</groupId>
   -                <artifactId>apache-rat-plugin</artifactId>
   -                <configuration>
   -                    <excludes>
   -                        <exclude>example/data/kafka_data.csv</exclude>
   -                        <!-- MarkDown files -->
   -                        <exclude>**/*.md</exclude>
   -                    </excludes>
   -                </configuration>
   -            </plugin>
            </plugins>
        </build>
        <profiles>
   ```
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services