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

Correct message if the latest version of parent is used for update-parent #1000

Merged
merged 1 commit into from
Aug 25, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:update-parent
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>localhost</groupId>
<artifactId>dummy-parent4</artifactId>
<version>70</version>
</parent>

<groupId>localhsot</groupId>
<artifactId>issue-670</artifactId>
<version>0.31-SNAPSHOT</version>
<packaging>pom</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

import groovy.xml.XmlSlurper

def project = new XmlSlurper().parse( new File( basedir, 'pom.xml' ) )
assert project.parent.version == '70'


def buildLog = new File( basedir, "build.log")

assert buildLog.text.contains( '[INFO] The parent project is the latest version')
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,12 @@ protected ArtifactVersion resolveTargetVersion(String initialVersion)
}
}

getLog().info("No versions found");
if (versions.isEmpty(allowSnapshots)) {
getLog().info("No versions found");
} else {
getLog().info("The parent project is the latest version");
}

return null;
}

Expand Down