Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-15899] [build] Inherit from Apache Parent POM #12

Closed
wants to merge 2 commits into from

Conversation

tzulitai
Copy link
Contributor

@tzulitai tzulitai commented Feb 4, 2020

This is a first step towards making Stateful Functions release-ready.

See details about what settings the Apache Parent POM covers here: https://maven.apache.org/pom/asf/index.html.

As an end result of this change, we should be able to perform mvn clean install -Papache-release without issues.

@tzulitai
Copy link
Contributor Author

tzulitai commented Feb 4, 2020

Building with mvn clean install -Papache-release currently fails with the following:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadocs) on project statefun-sdk: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/Context.java:70: error: bad use of '>'
[ERROR]    * @param delay the amount of delay before invoking the target function. Value needs to be >= 0.
[ERROR]                                                                                              ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/Context.java:92: error: bad use of '>'
[ERROR]    * @param delay the amount of delay before invoking the target function. Value needs to be >= 0.
[ERROR]                                                                                              ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/StatefulFunction.java:54: error: unterminated inline tag
[ERROR]  * <pre>{@code
[ERROR]         ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/StatefulFunction.java:57: error: unknown tag: Persisted
[ERROR]  *     @Persisted
[ERROR]        ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/StatefulFunction.java:58: error: unknown tag: Integer
[ERROR]  *     PersistedValue<Integer> intState = PersistedValue.of("state-name", Integer.class);
[ERROR]                      ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/StatefulFunction.java:60: error: unknown tag: Override
[ERROR]  *     @Override
[ERROR]        ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/match/MatchBinder.java:70: warning: no @return
[ERROR]   public <T> MatchBinder predicate(Class<T> type, BiConsumer<Context, T> action) {
[ERROR]                          ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/match/MatchBinder.java:96: warning: no @return
[ERROR]   public <T> MatchBinder predicate(
[ERROR]                          ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/match/MatchBinder.java:113: warning: no @return
[ERROR]   public MatchBinder otherwise(BiConsumer<Context, Object> action) {
[ERROR]                      ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/spi/StatefulFunctionModule.java:55: error: malformed HTML
[ERROR]  * <ahref="https://github.com/google/auto/tree/master/service">AutoService</a> tool.
[ERROR]    ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/spi/StatefulFunctionModule.java:55: error: bad use of '>'
[ERROR]  * <ahref="https://github.com/google/auto/tree/master/service">AutoService</a> tool.
[ERROR]                                                               ^
[ERROR] /Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/src/main/java/org/apache/flink/statefun/sdk/spi/StatefulFunctionModule.java:55: error: unexpected end tag: </a>
[ERROR]  * <ahref="https://github.com/google/auto/tree/master/service">AutoService</a> tool.
[ERROR]                                                                           ^
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/../bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/tzulitai/repos/apache/flink-statefun/statefun-sdk/target/apidocs' dir.

Will need to go through and fix the above Javadocs and maybe cover Javadoc checks in our builds.

@tzulitai tzulitai changed the title [FLINK-15898] [build] Inherit from Apache Parent POM [FLINK-15899] [build] Inherit from Apache Parent POM Feb 4, 2020
@tzulitai
Copy link
Contributor Author

tzulitai commented Feb 5, 2020

The Javadocs are fixed with 45be13e.
You should be able to verify the changes now with mvn clean install -Papache-release.

We might at some point want to use the Maven Checkstyle Plugin to enforce checks on Javadocs per build.

cc @igalshilman

@igalshilman
Copy link
Contributor

Thanks @tzulitai !
Can you check if spotless can be configured to conform with that java doc style?

@tzulitai
Copy link
Contributor Author

tzulitai commented Feb 6, 2020

Hi @igalshilman, I think it'll be possible, since Spotless is capable of formatting Javadocs.
I've filed a JIRA for this as a follow-up: https://issues.apache.org/jira/browse/FLINK-15930.

I'll proceed to merge this PR as is, thanks for the review.

@tzulitai tzulitai closed this in 4ada151 Feb 6, 2020
morsapaes pushed a commit to morsapaes/flink-statefun that referenced this pull request Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants