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

Huge decrease performance since 2.13 on goal update-properties with --update-snapshots #942

Closed
frederic-valin-maif opened this issue Apr 17, 2023 · 2 comments

Comments

@frederic-valin-maif
Copy link

Hi,
We observe a huge decrease about performance since plugin version 2.13.0 when launching update-properties with -U (--update-snapshots) with a simple pom like :

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.22.RELEASE</version>
    </parent>

    <groupId>fr.groupId</groupId>
    <artifactId>artId</artifactId>
    <version>1.4.0</version>
    <packaging>jar</packaging>

</project>

With version 2.12.0 :

mvn -U org.codehaus.mojo:versions-maven-plugin:2.12.0:update-properties -DprocessParent=true
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< fr.groupId:artId >--------------------------
[INFO] Building artId 1.4.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.12.0:update-properties (default-cli) @ artId ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.661 s
[INFO] Finished at: 2023-04-17T17:37:01+02:00
[INFO] ------------------------------------------------------------------------

With 2.15.0 (but we observe that since 2.13.0), the same command without -U is acceptable

 mvn org.codehaus.mojo:versions-maven-plugin:2.15.0:update-properties -DprocessParent=true
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< fr.groupId:artId >--------------------------
[INFO] Building artId 1.4.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.15.0:update-properties (default-cli) @ artId ---
[INFO] Property ${spring-session.version}: Leaving unchanged as 1.3.5.RELEASE
[INFO] Property ${spring-loaded.version}: Leaving unchanged as 1.2.8.RELEASE
[INFO] Property ${reactor-spring.version}: Leaving unchanged as 2.0.7.RELEASE
[INFO] Property ${jtds.version}: Leaving unchanged as 1.3.1
[INFO] Property ${hikaricp-java7.version}: Leaving unchanged as 2.4.13
[INFO] Property ${thymeleaf-extras-conditionalcomments.version}: Leaving unchanged as 2.1.2.RELEASE
[INFO] Property ${reactor.version}: Leaving unchanged as 2.0.8.RELEASE
[INFO] Property ${nekohtml.version}: Leaving unchanged as 1.9.22
[INFO] Property ${statsd-client.version}: Leaving unchanged as 3.1.0
[INFO] Property ${crashub.version}: Leaving unchanged as 1.3.2
[INFO] Property ${wsdl4j.version}: Leaving unchanged as 1.6.3
[INFO] Property ${commons-digester.version}: Leaving unchanged as 2.1
[INFO] Property ${couchbase-cache-client.version}: Leaving unchanged as 2.1.0
[INFO] Property ${spring-integration-java-dsl.version}: Leaving unchanged as 1.2.3.RELEASE
[INFO] Property ${simple-json.version}: Leaving unchanged as 1.1.1
[INFO] Property ${hikaricp-java6.version}: Leaving unchanged as 2.3.13
[INFO] Property ${gemfire.version}: Leaving unchanged as 8.2.13
[INFO] Property ${jstl.version}: Leaving unchanged as 1.2
[INFO] Property ${jaybird.version}: Leaving unchanged as 2.2.15
[INFO] Property ${jetty-jsp.version}: Leaving unchanged as 2.2.0.v201112011158
[INFO] Property ${jetty.version}: Leaving unchanged as 9.4.19.v20190610
[INFO] Property ${jms-api.version}: Leaving unchanged as 1.1-rev-1
[INFO] Property ${maven-eclipse-plugin.version}: Leaving unchanged as 2.10
[INFO] Property ${neo4j-ogm.version}: Leaving unchanged as 2.1.6
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.619 s
[INFO] Finished at: 2023-04-17T17:39:26+02:00
[INFO] ------------------------------------------------------------------------

But if we left the -U, it takes more than 5 minutes

mvn -U org.codehaus.mojo:versions-maven-plugin:2.15.0:update-properties -DprocessParent=true
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------------< fr.groupId:artId >--------------------------
[INFO] Building artId 1.4.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.15.0:update-properties (default-cli) @ artId ---
...
Downloading from nexus-public-repositories: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-bom/maven-metadata.xml
Downloading from nexus-mirror: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-bom/maven-metadata.xml
Downloaded from nexus-public-repositories: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-bom/maven-metadata.xml (7.5 kB at 10 kB/s)
Downloaded from nexus-mirror: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-bom/maven-metadata.xml (7.5 kB at 10 kB/s)
Downloading from nexus-mirror: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-http/maven-metadata.xml
Downloading from nexus-public-repositories: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-http/maven-metadata.xml
Downloaded from nexus-mirror: http://nexus/repository/maven-public/org/springframework/integration/spring-integration-http/maven-metadata.xml (9.8 kB a
...
[INFO] Property ${gemfire.version}: Leaving unchanged as 8.2.13
[INFO] Property ${jstl.version}: Leaving unchanged as 1.2
[INFO] Property ${jaybird.version}: Leaving unchanged as 2.2.15
[INFO] Property ${jetty-jsp.version}: Leaving unchanged as 2.2.0.v201112011158
[INFO] Property ${jetty.version}: Leaving unchanged as 9.4.19.v20190610
[INFO] Property ${jms-api.version}: Leaving unchanged as 1.1-rev-1
[INFO] Property ${maven-eclipse-plugin.version}: Leaving unchanged as 2.10
[INFO] Property ${neo4j-ogm.version}: Leaving unchanged as 2.1.6
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:22 min
[INFO] Finished at: 2023-04-17T17:46:19+02:00
[INFO] ------------------------------------------------------------------------

Thanks for your help to investigate this problem.
Regards,
Fred.

@andrzejj0
Copy link
Contributor

andrzejj0 commented Apr 17, 2023

Since 2.13.0, the goal no longer ignores parent poms, which fixes #367. As a side effect, resolution of all the properties must take longer.

There's a feature toggle which you can use to revert to the old behaviour, which disables that extra property resolution: please set the includeParent parameter to false (this parameter was introduced in 2.14.0 following similar reports about decreased performance caused by resolution of properties defined in parent poms).

@andrzejj0
Copy link
Contributor

@slachiewicz should we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants