maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomo Suzuki <suzt...@google.com.INVALID>
Subject Re: Finding out what the versions plugin did
Date Sun, 07 Jul 2019 11:59:46 GMT
Hi Mark,

I would either

1. try display-dependency-updates and other display-* goals:

https://www.mojohaus.org/versions-maven-plugin/examples/display-dependency-updates.html

https://www.mojohaus.org/versions-maven-plugin/display-property-updates-mojo.html


2. leverage the backup file(s) created by the versions plugin
before committing.

 “diff pom.xml pom.xml.versionsBackup”

Both approaches still require parsing the output though.

Regards,
Tomo

On Sun, Jul 7, 2019 at 06:09 Mark Raynsford
<org.apache.maven.user@io7m.com.invalid> wrote:

> Hello!
>
> Is there a machine-readable way I can find out what the Versions plugin
> did after I've executed it? I'm writing a CI task that tries to
> periodically update the dependencies of a project.
>
> Essentially, the task does this:
>
> $ mvn clean verify
> $ mvn -DallowMajorUpdates=false \
>   versions:use-latest-releases \
>   versions:update-properties
> $ mvn clean verify
>
> If the second "clean verify" execution succeeds, then we assume that
> all the new dependency versions are fine. The task then goes on to
> commit the pom.xml changes.
>
> The problem: I'd like to retrieve the list of dependencies that were
> updated (their previous and current versions) so that I can produce a
> nice commit message and changelog entry. I can't seem to get this
> information out of the plugin.
>
> I've seen the documentation for the dependency-updates-report goal, so
> I tried doing this:
>
> $ mvn clean verify
> $ mvn \
>   -DallowMajorUpdates=false \
>   -DdependencyUpdatesReportFormats=xml
>   -DoutputDirectory=. \
>   versions:dependency-updates-report \
>   versions:use-latest-releases \
>   versions:update-properties
> $ mvn clean verify
>
> But this just doesn't appear to produce any output. Am I doing
> something wrong?
>
> Is there some better way to do this?
>
> --
> Mark Raynsford | http://www.io7m.com
>
> --
Regards,
Tomo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message