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

alexpl pushed a commit to branch ignite-2.15
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/ignite-2.15 by this push:
     new 79dbfc7ca32 IGNITE-17194 Fix update version script - Fixes #9235.
79dbfc7ca32 is described below

commit 79dbfc7ca32395cbeba04c7e2221863124928274
Author: Aleksey Plekhanov <plehanov.a...@gmail.com>
AuthorDate: Thu Apr 20 15:06:46 2023 +0300

    IGNITE-17194 Fix update version script - Fixes #9235.
    
    Signed-off-by: Aleksey Plekhanov <plehanov.a...@gmail.com>
    (cherry picked from commit 3762c8b0a296f5768795d831c679b07a692e2588)
---
 docs/_config.yml                      |   2 +-
 modules/core/pom.xml                  |  27 ---------
 modules/ducktests/pom.xml             |  27 ---------
 modules/platforms/cpp/pom.xml         |  68 ----------------------
 modules/platforms/dotnet/DEVNOTES.txt |   2 +-
 modules/platforms/dotnet/pom.xml      |  29 ----------
 pom.xml                               | 104 +++++++++++++++++++++++++++++++++-
 scripts/update-versions.sh            |   2 +-
 8 files changed, 105 insertions(+), 156 deletions(-)

diff --git a/docs/_config.yml b/docs/_config.yml
index 48045baf026..e658e18378f 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -25,7 +25,7 @@ attrs: &asciidoc_attributes
   csharpCodeDir: code-snippets/dotnet
   githubUrl: https://github.com/apache/ignite/tree/master
   githubVersionUrl: https://github.com/apache/ignite/tree/ignite-{version}
-  docSourceUrl: https://github.com/apache/ignite/tree/IGNITE-7595/docs
+  docSourceUrl: https://github.com/apache/ignite/tree/master/docs
 collections:
   docs:
     permalink: /docs/:path:output_ext
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 9913700b807..6981f15671e 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -295,33 +295,6 @@
                     <skip>false</skip>
                 </configuration>
             </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>update-versions</id>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <phase>initialize</phase>
-                        <configuration>
-                            <target>
-                                <echo message="Update ignite.version in 
resource files" />
-
-                                <replaceregexp byline="true" encoding="UTF-8">
-                                    <regexp pattern="(ignite.version=).+$" />
-                                    <substitution 
expression="\1${project.version}" />
-                                    <fileset 
dir="${project.basedir}/src/main/resources">
-                                        <include name="ignite.properties" />
-                                    </fileset>
-                                </replaceregexp>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 
diff --git a/modules/ducktests/pom.xml b/modules/ducktests/pom.xml
index 8ee6628000a..7855d62bf4a 100644
--- a/modules/ducktests/pom.xml
+++ b/modules/ducktests/pom.xml
@@ -121,33 +121,6 @@
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>update-versions</id>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <phase>initialize</phase>
-                        <configuration>
-                            <target>
-                                <echo message="Update ignite.version in 
ducktests" />
-
-                                <replaceregexp byline="true" encoding="UTF-8">
-                                    <regexp pattern="(__version__ = ).*$"/>
-                                    <substitution 
expression="\1'${project.version}'" />
-                                    <fileset dir="${basedir}/">
-                                        <include 
name="${project.basedir}/tests/ignitetest/__init__.py" />
-                                    </fileset>
-                                </replaceregexp>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
             <plugin>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
diff --git a/modules/platforms/cpp/pom.xml b/modules/platforms/cpp/pom.xml
deleted file mode 100644
index 6edf82ad14d..00000000000
--- a/modules/platforms/cpp/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
--->
-
-<!--
-    POM 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 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent-internal</artifactId>
-        <version>${revision}</version>
-        <relativePath>../../../parent-internal/pom.xml</relativePath>
-    </parent>
-
-    <artifactId>ignite-cpp</artifactId>
-    <packaging>pom</packaging>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>update-versions</id>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <phase>initialize</phase>
-                        <configuration>
-                            <target>
-                                <echo message="Update ignite.version in C++" />
-
-                                <replaceregexp byline="true" encoding="UTF-8">
-                                    <regexp 
pattern="(project\(.*\s)\d+\.\d+\.\d+.*?(\))" />
-                                    <substitution 
expression="\1${ignite.platform.full.version}\2" />
-                                    <fileset dir="${project.basedir}/">
-                                        <include name="**/CMakeLists.txt" />
-                                    </fileset>
-                                </replaceregexp>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/modules/platforms/dotnet/DEVNOTES.txt 
b/modules/platforms/dotnet/DEVNOTES.txt
index ed060dcc490..80d5c04d5cd 100644
--- a/modules/platforms/dotnet/DEVNOTES.txt
+++ b/modules/platforms/dotnet/DEVNOTES.txt
@@ -24,7 +24,7 @@ Note that .NET Core SDK 3.1 and PowerShell must be installed 
first.
 
 The command below will build the binaries and NuGet packages with Maven:
 
-    ./mvnw clean install -am -pl modules/platforms/dotnet -DskipTests -P 
platforms
+    ./mvnw clean install -am -pl modules/platforms/dotnet -DskipTests -P 
build-dotnet
 
 
 Solutions and Projects
diff --git a/modules/platforms/dotnet/pom.xml b/modules/platforms/dotnet/pom.xml
index 23dc450ec03..bb7fecb2fc5 100644
--- a/modules/platforms/dotnet/pom.xml
+++ b/modules/platforms/dotnet/pom.xml
@@ -60,35 +60,6 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
-                    <execution>
-                        <id>update-versions</id>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <phase>initialize</phase>
-                        <configuration>
-                            <target>
-                                <echo message="Update ignite.version in .NET" 
/>
-
-                                <replaceregexp byline="true" encoding="UTF-8">
-                                    <regexp 
pattern="(\[assembly:\s*Assembly\w*Version\w*\(&quot;)\d+\.\d+\.\d+(\.\d+)?(&quot;\)\])"
 />
-                                    <substitution 
expression="\1${ignite.platform.full.version}\3" />
-                                    <fileset dir="${basedir}/">
-                                        <include 
name="**/SharedAssemblyInfo.cs" />
-                                    </fileset>
-                                </replaceregexp>
-
-                                <replaceregexp byline="true" encoding="UTF-8">
-                                    <regexp 
pattern="(\[assembly:\s*AssemblyInformationalVersion\w*\(&quot;).*?(&quot;\)\])"
 />
-                                    <substitution
-                                        
expression="\1${ignite.majorVersion}.${ignite.minorVersion}.${ignite.incrementalVersion}\2"
 />
-                                    <fileset dir="${basedir}/">
-                                        <include 
name="**/SharedAssemblyInfo.cs" />
-                                    </fileset>
-                                </replaceregexp>
-                            </target>
-                        </configuration>
-                    </execution>
                     <execution>
                         <id>build-dotnet</id>
                         <phase>generate-sources</phase>
diff --git a/pom.xml b/pom.xml
index f38183fcc2f..9ae0ee861b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,10 +116,9 @@
         </profile>
 
         <profile>
-            <id>platforms</id>
+            <id>build-dotnet</id>
             <modules>
                 <module>modules/platforms/dotnet</module>
-                <module>modules/platforms/cpp</module>
             </modules>
         </profile>
 
@@ -474,6 +473,107 @@
             </modules>
         </profile>
 
+        <profile>
+            <id>update-versions</id>
+            <!-- updates versions -->
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>update-versions</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <phase>validate</phase>
+                                <configuration>
+                                    <target>
+                                        <echo message="Update ignite.version 
in docs" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp 
pattern="(&lt;ignite\.version&gt;).+(&lt;/ignite\.version&gt;)" />
+                                            <substitution 
expression="\1${project.version}\2" />
+                                            <fileset 
dir="${project.basedir}/docs/">
+                                                <include 
name="_docs/code-snippets/java/pom.xml" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp pattern="(version: ).+" />
+                                            <substitution 
expression="\1${project.version}" />
+                                            <fileset 
dir="${project.basedir}/docs/">
+                                                <include name="_config.yml" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <echo message="Update ignite.version 
in ducktests" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp pattern="(__version__ = 
).*$"/>
+                                            <substitution 
expression="\1'${project.version}'" />
+                                            <fileset 
dir="${project.basedir}/modules/ducktests/">
+                                                <include 
name="tests/ignitetest/__init__.py" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <echo message="Update ignite.version 
in C++" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp 
pattern="(project\(.*\s)\d+\.\d+\.\d+.*?(\))" />
+                                            <substitution 
expression="\1${ignite.platform.full.version}\2" />
+                                            <fileset 
dir="${project.basedir}/modules/platforms/cpp/">
+                                                <include 
name="**/CMakeLists.txt" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <echo message="Update ignite.version 
in .NET" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp 
pattern="(\[assembly:\s*Assembly\w*Version\w*\(&quot;)\d+\.\d+\.\d+(\.\d+)?(&quot;\)\])"
 />
+                                            <substitution 
expression="\1${ignite.platform.full.version}\3" />
+                                            <fileset 
dir="${project.basedir}/modules/platforms/dotnet/">
+                                                <include 
name="**/SharedAssemblyInfo.cs" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp 
pattern="(\[assembly:\s*AssemblyInformationalVersion\w*\(&quot;).*?(&quot;\)\])"
 />
+                                            <substitution
+                                                
expression="\1${ignite.majorVersion}.${ignite.minorVersion}.${ignite.incrementalVersion}\2"
 />
+                                            <fileset 
dir="${project.basedir}/modules/platforms/dotnet/">
+                                                <include 
name="**/SharedAssemblyInfo.cs" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <echo message="Update ignite.version 
in resource files" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp 
pattern="(ignite.version=).+$" />
+                                            <substitution 
expression="\1${project.version}" />
+                                            <fileset 
dir="${project.basedir}/modules/core/">
+                                                <include 
name="src/main/resources/ignite.properties" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <echo message="Update ignite.version 
in build.gradle" />
+
+                                        <replaceregexp byline="true" 
encoding="UTF-8">
+                                            <regexp pattern="(ignVer = ).*$"/>
+                                            <substitution 
expression="\1'${project.version}'" />
+                                            <fileset 
dir="${project.basedir}/modules/dev-utils/">
+                                                <include 
name="ignite-modules-test/build.gradle" />
+                                            </fileset>
+                                        </replaceregexp>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
         <profile>
             <!--
             This profile is used to provide a check that all tests are defined 
in at least one suite.
diff --git a/scripts/update-versions.sh b/scripts/update-versions.sh
index 82f82caf4b4..2aad2357df7 100755
--- a/scripts/update-versions.sh
+++ b/scripts/update-versions.sh
@@ -43,4 +43,4 @@ sed "${SED_OPTION[@]}" -e 
"s/<revision>\(.*\)</<revision>${1}</g" ./parent/pom.x
 
 echo Updating sub-modules versions to "$1" and resouces during the build
 
-mvn install -P all-java,all-scala,platforms,skip-docs -DskipTests
+mvn validate -P update-versions
\ No newline at end of file

Reply via email to