Skip to content
Permalink
Browse files
IGNITE-16546 Introduce root.dir property for better maven plugins beh…
…aviour (#665)
  • Loading branch information
vveider committed Feb 16, 2022
1 parent 18d663d commit 812865687a05dadb68ee7ea31cb2d19c2a52b873
Showing 4 changed files with 20 additions and 5 deletions.
@@ -16,10 +16,15 @@ set -o nounset; set -o errexit; set -o pipefail; set -o errtrace; set -o functra


ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
find ${ROOT} -name "pom.xml" | \
find "${ROOT}" -name "pom.xml" | \
grep -v parent | \
while read -r pom; do
if grep '<properties>' "${pom}"; then
echo "[ERROR] Found <properties> section: ${pom}"
fi
if grep '<properties>' "${pom}" &>/dev/null; then
xpath -q -e "project/properties/*" "${pom}" | \
{ grep -vE '(root\.directory)' || true; } | \
while read -r property; do
property="$(sed -r 's|.*</(.*)>|\1|' <<< "${property}")"
echo "[ERROR] Found forbidden property '${property}' in '$(sed -r "s|${ROOT}/||" <<< "${pom}")'"
done
fi
done
@@ -32,6 +32,10 @@
<artifactId>ignite-examples</artifactId>
<version>3.0.0-SNAPSHOT</version>

<properties>
<root.directory>${pom.basedir}/..</root.directory>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.ignite</groupId>
@@ -43,6 +43,8 @@
</licenses>

<properties>
<root.directory>${pom.basedir}/../..</root.directory>

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

@@ -877,7 +879,7 @@
<javaVersion>${maven.compiler.source}</javaVersion>
<!-- Augment the standard rule set with our rules -->
<violationsFiles>
<violationFile>check-rules/modernizer-rules.xml</violationFile>
<violationFile>${root.directory}/check-rules/modernizer-rules.xml</violationFile>
</violationsFiles>
<ignorePackages>
<package>org.apache.ignite.internal.sql.engine</package>
@@ -33,6 +33,10 @@
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<root.directory>${pom.basedir}</root.directory>
</properties>

<modules>
<module>examples</module>
<module>modules/affinity</module>

0 comments on commit 8128656

Please sign in to comment.