You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/05/21 07:02:50 UTC

[flink-statefun] 02/08: [FLINK-17518] [build] Add a root.dir property to Maven

This is an automated email from the ASF dual-hosted git repository.

tzulitai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit bd06c18f7305ae494d550355add9937b1db5ba77
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Thu May 21 12:58:20 2020 +0800

    [FLINK-17518] [build] Add a root.dir property to Maven
    
    Maven, by default, doesn't have a property that points to the root
    parent module's directory. We work around that by using the
    directory-maven-plugin to define that.
---
 pom.xml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/pom.xml b/pom.xml
index e1f3668..5516230 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,6 +77,7 @@ under the License.
         <unixsocket.version>2.3.2</unixsocket.version>
         <protoc-jar-maven-plugin.version>3.11.1</protoc-jar-maven-plugin.version>
         <flink.version>1.10.1</flink.version>
+        <root.dir>${rootDir}</root.dir>
     </properties>
 
     <dependencies>
@@ -313,6 +314,24 @@ under the License.
                     </execution>
                 </executions>
             </plugin>
+
+            <plugin>
+                <groupId>org.commonjava.maven.plugins</groupId>
+                <artifactId>directory-maven-plugin</artifactId>
+                <version>0.1</version>
+                <executions>
+                    <execution>
+                        <id>directories</id>
+                        <goals>
+                            <goal>highest-basedir</goal>
+                        </goals>
+                        <phase>initialize</phase>
+                        <configuration>
+                            <property>rootDir</property>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>