Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d1e3436
Original idea as is during our discussion with Ritesh.
fapifta Feb 3, 2022
8c29ad1
Switch to the annotating validator methods instead of interfaces and …
fapifta Feb 4, 2022
6d400d3
Added some TODO and Javadoc. Fixed findbugs, and started to eliminate…
fapifta Feb 4, 2022
dddbf38
Add remaining API docs
fapifta Feb 4, 2022
8b9ef2b
Fix checkstyle
fapifta Feb 4, 2022
b392734
Reorganize code, to simplify the integration point in the server side…
fapifta Feb 8, 2022
209f626
first trials with apt...
fapifta Feb 9, 2022
d0d4840
Add an annotation processor to validate methods that are annotated to…
fapifta Feb 10, 2022
2a152e7
Remove contextAware property from the annotation, and from the annota…
fapifta Feb 11, 2022
98db101
Make the annotation processor code more readable and structured. Fix …
fapifta Feb 11, 2022
926266b
Change the validation logic, after removing conext awareness as an op…
fapifta Feb 12, 2022
152917d
Add annotation processor tests, and fix some errors found.
fapifta Feb 15, 2022
9c2fe1a
Add license text to new classes.
fapifta Feb 15, 2022
c7ae28a
Add junit test, fix revealed problems, and remove some unnecessary st…
fapifta Feb 16, 2022
f9ced3c
Rename annotation processor test.
fapifta Feb 16, 2022
99d0179
Removed serverversion, and use ClientVersions to decide on the client…
fapifta Feb 16, 2022
d7fed1e
Fix checkstyle issues, and a test compilation issue caused be the rem…
fapifta Feb 16, 2022
01c9489
Added spotbugs related info so that findbugs check can run.
fapifta Feb 16, 2022
9a0258c
Adjust rat to check the annotation processor module as well.
fapifta Feb 16, 2022
51e9f5a
Update the jar-report.txt
fapifta Feb 16, 2022
267b92f
Extend some documentation, fix findbugs reported synchronization prob…
fapifta Feb 16, 2022
b27c17d
Fix missing licenses after rat check adjustments.
fapifta Feb 16, 2022
46563c9
Revert "Update the jar-report.txt"
fapifta Feb 16, 2022
24911aa
Update the jar-report.txt
fapifta Feb 16, 2022
d1c899a
Move the decision about whether a condition is present to the conditi…
fapifta Feb 17, 2022
959e4a3
make predicates final in validaitonconditions enum.
fapifta Feb 17, 2022
3637271
Remove unused imports from RequestValidations.
fapifta Feb 17, 2022
a414aef
Fix wording in apidoc.
fapifta Feb 17, 2022
b66c55b
Add note about -proc:none in doc comment inside annotation procesor m…
fapifta Feb 17, 2022
c8d4d97
Address CI issues caused by the test validators. Re-organize the vali…
fapifta Feb 22, 2022
18a0e96
Add debug logging to expose in the logs which validator methods were …
fapifta Feb 22, 2022
e82145d
Address checkstyle issues.
fapifta Feb 22, 2022
d87b1f8
Addressing review comments.
fapifta Mar 4, 2022
697b1ac
Addressing further review comments.
fapifta Mar 11, 2022
eaac42e
Rebasing on new master and fix ClientVersions->ClientVersion rename.
fapifta Mar 11, 2022
4d69af6
Re-trigger CI.
fapifta Mar 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions dev-support/annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->
<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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.ozone</groupId>
<artifactId>ozone-annotation-processing</artifactId>
<version>1.3.0-SNAPSHOT</version>
<description>Apache Ozone annotation processing tools for validating custom
annotations at compile time.
</description>
<name>Apache Ozone Annotation Processing</name>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spotbugs.version>3.1.12</spotbugs.version>
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
<checkstyle.version>8.29</checkstyle.version>
</properties>

<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!--
| As this pom is not a child of the main ozone pom.xml, if we want
| findbugs and checkstyle to be running for the module, the plugins
| have to be defined here.
-->
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.version}</version>
<configuration>
<maxHeap>1024</maxHeap>
<xmlOutput>true</xmlOutput>
<includeTests>true</includeTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>../../hadoop-hdds/dev-support/checkstyle/checkstyle.xml</configLocation>
<suppressionsLocation>../../hadoop-hdds/dev-support/checkstyle/suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<failOnViolation>false</failOnViolation>
<outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
</configuration>
</plugin>
<!--
| Compiler plugin configuration have to be modified to compile the
| annotation processor, without having any annotation processor applied
| as due to the presence of
| META-INF/services/javac.annotation.processing.Processor the compilation
| would fail as the linked processor class can not be find while we are
| compiling it, hence the compiler argument -proc:none is specified here.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note as to why we need -proc:none and the sequence of events that should occur when we fresh build the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noting this!, I have extended the note into the comment before the plugin definition about the compiler argument specified here.

<includes>
<include>org/apache/ozone/annotations/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading