zentol commented on code in PR #40: URL: https://github.com/apache/flink-connector-elasticsearch/pull/40#discussion_r983963215
##########
pom.xml:
##########
@@ -901,484 +417,25 @@ under the License.
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
- <!--surefire for unit tests and integration tests-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M5</version>
- <configuration>
- <!-- enables TCP/IP communication
between surefire and forked JVM-->
- <forkNode
implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>
- <trimStackTrace>false</trimStackTrace>
- <systemPropertyVariables>
-
<forkNumber>0${surefire.forkNumber}</forkNumber>
- <!-- $$ ensures that surefire
resolves this to the current forkNumber,
- instead of maven during
initialization -->
-
<mvn.forkNumber>$${surefire.forkNumber}</mvn.forkNumber>
-
<checkpointing.randomization>true</checkpointing.randomization>
-
<buffer-debloat.randomization>true</buffer-debloat.randomization>
- <user.country>US</user.country>
-
<user.language>en</user.language>
- <!-- force the use of the
Changelog State Backend in tests on mini-cluster
- on: enable
CheckpointingOptions.ENABLE_STATE_CHANGE_LOG on cluster level
- random: enable it
randomly, unless explicitly set
- unset: don't alter the
configuration
- -->
-
<checkpointing.changelog>random</checkpointing.changelog>
-
<project.basedir>${project.basedir}</project.basedir>
- <!--suppress
MavenModelInspection -->
-
<test.randomization.seed>${test.randomization.seed}</test.randomization.seed>
-
<junit.jupiter.extensions.autodetection.enabled>true</junit.jupiter.extensions.autodetection.enabled>
- </systemPropertyVariables>
- <argLine>-Xms256m -Xmx2048m
-XX:+UseG1GC</argLine>
- </configuration>
- <executions>
- <!--execute all the unit tests-->
- <execution>
- <id>default-test</id>
- <phase>test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <includes>
-
<include>${test.unit.pattern}</include>
- </includes>
-
<forkCount>${flink.forkCountUnitTest}</forkCount>
-
<argLine>${flink.surefire.baseArgLine} -Xmx${flink.XmxUnitTest}</argLine>
- </configuration>
- </execution>
- <!--execute all the integration tests-->
- <execution>
- <id>integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <includes>
-
<include>**/*.*</include>
- </includes>
- <excludes>
-
<exclude>${test.unit.pattern}</exclude>
- <!-- Exclude
classes generated by Scala that surefire rejects
- e.g.,
'org.apache.flink.api.scala.typeutils.Foo$Bar$Foobar'. -->
-
<exclude>**/*$*</exclude>
- </excludes>
-
<forkCount>${flink.forkCountITCase}</forkCount>
-
<argLine>${flink.surefire.baseArgLine} -Xmx${flink.XmxITCase}</argLine>
-
<reuseForks>false</reuseForks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <classpathContainers>
- <classpathContainer>
-
org.eclipse.jdt.launching.JRE_CONTAINER
- </classpathContainer>
- </classpathContainers>
- <downloadSources>true</downloadSources>
-
<downloadJavadocs>true</downloadJavadocs>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>enforce-maven</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
-
<requireMavenVersion>
- <!--
enforce at least mvn version 3.1.1 (see FLINK-12447) -->
-
<version>[3.1.1,)</version>
-
</requireMavenVersion>
-
<requireJavaVersion>
-
<version>${target.java.version}</version>
-
</requireJavaVersion>
- </rules>
- </configuration>
- </execution>
- <execution>
-
<id>forbid-direct-table-planner-dependencies</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
-
<bannedDependencies>
-
<excludes>
-
<exclude>org.apache.flink:flink-table-planner_*</exclude>
-
</excludes>
-
<includes>
-
<include>org.apache.flink:flink-table-planner_*:*:*:test</include>
-
</includes>
-
<message>
-
Direct dependencies on flink-table-planner are not allowed.
-
You should depend on either Table API modules or flink-table-planner-loader.
-
</message>
-
</bannedDependencies>
- </rules>
- </configuration>
- </execution>
- <execution>
- <id>dependency-convergence</id>
- <!-- disabled by default as it
interacts badly with shade-plugin -->
- <phase>none</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
-
<dependencyConvergence/>
- </rules>
- </configuration>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <configuration>
- <!-- This section contains the core
configuration that is applied to every jar that we create.-->
- <filters combine.children="append">
- <filter>
- <artifact>*</artifact>
- <excludes>
- <!-- Globally
exclude log4j.properties from our JAR files. -->
-
<exclude>log4j.properties</exclude>
-
<exclude>log4j2.properties</exclude>
-
<exclude>log4j-test.properties</exclude>
-
<exclude>log4j2-test.properties</exclude>
- <!-- Do not
copy the signatures in the META-INF folder.
- Otherwise, this
might cause SecurityExceptions when using the JAR. -->
-
<exclude>META-INF/*.SF</exclude>
-
<exclude>META-INF/*.DSA</exclude>
-
<exclude>META-INF/*.RSA</exclude>
- <!--
META-INF/maven can contain 2 things:
- - For
archetypes, it contains an archetype-metadata.xml.
- - For
other jars, it contains the pom for all dependencies under the respective
<groupId>/<artifactId>/ directory.
-
- We want
to exclude the poms because they may be under an incompatible license,
- however
the archetype metadata is required and we need to keep that around.
-
- This
pattern excludes directories under META-INF/maven.
-
('?*/**' does not work because '**' also matches zero directories;
-
everything that matches '?*' also matches '?*/**')
-
- The
initial '**' allows the pattern to also work for multi-release jars that may
contain such entries under
-
'META-INF/versions/11/META-INF/maven/'.
- -->
-
<exclude>**/META-INF/maven/?*/?*/**</exclude>
- </excludes>
- </filter>
- </filters>
- <transformers combine.children="append">
- <!-- The service transformer is
needed to merge META-INF/services files -->
- <transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
- <!-- The
ApacheNoticeResourceTransformer collects and aggregates NOTICE files -->
- <transformer
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
- <projectName>Apache
Flink</projectName>
-
<encoding>UTF-8</encoding>
- </transformer>
- </transformers>
- </configuration>
- <executions>
- <execution>
- <id>shade-flink</id>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
-
<shadeTestJar>false</shadeTestJar>
-
<shadedArtifactAttached>false</shadedArtifactAttached>
-
<createDependencyReducedPom>true</createDependencyReducedPom>
-
<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
- <!-- Filters MUST be
appended; merging filters does not work properly, see MSHADE-305 -->
- <filters
combine.children="append">
- <!-- drop
entries into META-INF and NOTICE files for the dummy artifact -->
- <filter>
-
<artifact>org.apache.flink:flink-shaded-force-shading</artifact>
-
<excludes>
-
<exclude>**</exclude>
-
</excludes>
- </filter>
- <!--
io.netty:netty brings its own LICENSE.txt which we don't need -->
- <filter>
-
<artifact>io.netty:netty</artifact>
-
<excludes>
-
<exclude>META-INF/LICENSE.txt</exclude>
-
</excludes>
- </filter>
- </filters>
- <artifactSet>
- <includes>
- <!--
Unfortunately, the next line is necessary for now to force the execution
- of the
Shade plugin upon all sub modules. This will generate effective poms,
- i.e.
poms which do not contain properties which are derived from this root pom.
- In
particular, the Scala version properties are defined in the root pom and without
-
shading, the root pom would have to be Scala suffixed and thereby all other
modules.
-
Removing this exclusion will also cause compilation errors in at least
- 1
module (flink-connector-elasticsearch5), for unknown reasons.
- -->
-
<include>org.apache.flink:flink-shaded-force-shading</include>
- </includes>
- </artifactSet>
- </configuration>
- </execution>
- </executions>
</plugin>
- <!-- generate configuration docs -->
<plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
- <version>0.1</version>
- <executions>
- <execution>
- <id>directories</id>
- <goals>
-
<goal>directory-of</goal>
- </goals>
- <phase>initialize</phase>
- <configuration>
-
<property>rootDir</property>
- <project>
-
<groupId>org.apache.flink</groupId>
-
<artifactId>flink-connector-elasticsearch-parent</artifactId>
- </project>
- </configuration>
- </execution>
- </executions>
</plugin>
</plugins>
-
- <pluginManagement>
- <plugins>
- <plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
- <configuration>
-
<source>${target.java.version}</source>
-
<target>${target.java.version}</target>
- <!-- The semantics of this
option are reversed, see MCOMPILER-209. -->
-
<useIncrementalCompilation>false</useIncrementalCompilation>
- <compilerArgs>
- <!-- Prevents
recompilation due to missing package-info.class, see MCOMPILER-205 -->
-
<arg>-Xpkginfo:always</arg>
- </compilerArgs>
- </configuration>
- </plugin>
-
- <plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.1.2</version>
- <dependencies>
- <dependency>
-
<groupId>com.puppycrawl.tools</groupId>
-
<artifactId>checkstyle</artifactId>
- <!-- Note: match
version with docs/flinkDev/ide_setup.md -->
- <version>8.14</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>validate</id>
- <phase>validate</phase>
- <goals>
-
<goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-
<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
-
<configLocation>/tools/maven/checkstyle.xml</configLocation>
-
<logViolationsToConsole>true</logViolationsToConsole>
-
<failOnViolation>true</failOnViolation>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
-
<artifactId>spotless-maven-plugin</artifactId>
- <version>${spotless.version}</version>
- <configuration>
- <java>
- <googleJavaFormat>
-
<version>1.7</version>
-
<style>AOSP</style>
- </googleJavaFormat>
-
- <!-- \# refers to the
static imports -->
- <importOrder>
-
<order>org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\#</order>
- </importOrder>
-
- <removeUnusedImports />
- </java>
- </configuration>
- <executions>
- <execution>
- <id>spotless-check</id>
- <phase>validate</phase>
- <goals>
-
<goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
-
- <plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-javadoc-plugin</artifactId>
-
<version>2.9.1</version><!--$NO-MVN-MAN-VER$-->
- <configuration>
- <quiet>true</quiet>
-
<detectOfflineLinks>false</detectOfflineLinks>
- <additionalJOptions
combine.children="append">
-
<additionalJOption>-Xdoclint:none</additionalJOption>
- </additionalJOptions>
- </configuration>
- </plugin>
-
- <plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-enforcer-plugin</artifactId>
- <version>3.0.0-M1</version>
- </plugin>
-
- <plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-dependency-plugin</artifactId>
Review Comment:
This was not ported to the parent because it's not really required. Its not
even run, and mostly a remnant of my attempts to rid Flink of undeclared
dependencies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
