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

Improve ITs for set goal #1112

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions versions-maven-plugin/src/it/it-set-005-properties/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,87 +18,4 @@
<module>module-a2</module>
</modules>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<artifactId>maven-rar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ assert parentPom.version == '1.2.1-SNAPSHOT'

def moduleA1 = new XmlSlurper().parse( new File( basedir, 'module-a1/pom.xml' ) )
assert moduleA1.parent.version == '1.2.1-SNAPSHOT'
assert moduleA1.version == '2.0.7-SNAPSHOT'

def moduleA2 = new XmlSlurper().parse( new File( basedir, 'module-a2/pom.xml' ) )
assert moduleA2.parent.version == '1.2.1-SNAPSHOT'
Expand Down
2 changes: 1 addition & 1 deletion versions-maven-plugin/src/it/it-set-005/module-a1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>localdomain.localhost</groupId>
<artifactId>project-a</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
83 changes: 0 additions & 83 deletions versions-maven-plugin/src/it/it-set-005/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,87 +18,4 @@
<module>module-a2</module>
</modules>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<artifactId>maven-rar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
8 changes: 5 additions & 3 deletions versions-maven-plugin/src/it/it-set-005/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import groovy.xml.XmlSlurper

def parentPom = new XmlSlurper().parse( new File( basedir, 'pom.xml' ) )
def parentPom = new XmlSlurper().parse(new File(basedir, 'pom.xml'))
assert parentPom.version == '1.2.1-SNAPSHOT'

def moduleA1 = new XmlSlurper().parse( new File( basedir, 'module-a1/pom.xml' ) )
def moduleA1 = new XmlSlurper().parse(new File(basedir, 'module-a1/pom.xml'))
assert moduleA1.parent.version == '1.2.1-SNAPSHOT'
assert moduleA1.version == '2.0.7-SNAPSHOT'

def moduleA2 = new XmlSlurper().parse( new File( basedir, 'module-a2/pom.xml' ) )
def moduleA2 = new XmlSlurper().parse(new File(basedir, 'module-a2/pom.xml'))
assert moduleA2.parent.version == '1.2.1-SNAPSHOT'
assert moduleA2.version == '1.2.1-SNAPSHOT'

5 changes: 3 additions & 2 deletions versions-maven-plugin/src/it/it-set-006/invoker.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set -DnewVersion=1.2.1-SNAPSHOT -DupdateMatchingVersions=false
invoker.nonRecursive=true
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:set \
-DnewVersion=1.2.1-SNAPSHOT \
-DupdateMatchingVersions=false
2 changes: 1 addition & 1 deletion versions-maven-plugin/src/it/it-set-006/module-a1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>localdomain.localhost</groupId>
<artifactId>project-a</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
88 changes: 3 additions & 85 deletions versions-maven-plugin/src/it/it-set-006/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<name>mversions-114</name>

<description>
invoking versions:set on root module should not update child module versions
unless they are the same as the parent old version unless
invoking versions:set on root module should update all child module versions
even they are the different as the parent old version
with DupdateMatchingVersions=false
</description>

<modules>
Expand All @@ -19,87 +20,4 @@
<module>module-a3</module>
</modules>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<artifactId>maven-rar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.0.4</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Loading
Loading