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

update-parent does not respect -DallowMajorUpdates #499

Closed
askoog opened this issue Sep 28, 2021 · 1 comment · Fixed by #737
Closed

update-parent does not respect -DallowMajorUpdates #499

askoog opened this issue Sep 28, 2021 · 1 comment · Fixed by #737
Milestone

Comments

@askoog
Copy link

askoog commented Sep 28, 2021

The update-parent goal does not respect the properties allowMajorUpdates, allowMinorUpdates and allowIncrementalUpdates that use-latest-version goal uses. This is somewhat confusing (even though the documentation states that the property is not used)

Example 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.springframework.boot</groupId>                                                      
            <artifactId>spring-boot-starter-parent</artifactId>                                              
            <version>1.5.22.RELEASE</version>                                                                
        </parent>                                                                                            
                                                                                                             
        <artifactId>test-pom</artifactId>                                                                    
</project>                                                                                                   

Updating the parent version will update to a new major version even if allowMajorUpdates is declared

$ mvn versions:update-parent -DallowMajorUpdates=false
...
[INFO] -----------------< org.springframework.boot:test-pom >------------------
[INFO] Building test-pom 1.5.22.RELEASE
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- versions-maven-plugin:2.2:update-parent (default-cli) @ test-pom ---
[INFO] Updating parent from 1.5.22.RELEASE to 2.5.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Since, for example the java version used and other breaking changes might be inherited from the parent, there should be a way to update the parent without updating to a new major version

askoog added a commit to askoog/versions-maven-plugin that referenced this issue Sep 28, 2021
ath0s pushed a commit to AvanzaBank/versions-maven-plugin that referenced this issue Feb 22, 2022
ath0s pushed a commit to AvanzaBank/versions-maven-plugin that referenced this issue Feb 22, 2022
@github-actions
Copy link

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 29, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 5, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 5, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 5, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 5, 2022
jarmoniuk added a commit to jarmoniuk/versions-maven-plugin that referenced this issue Oct 7, 2022
@slawekjaranowski slawekjaranowski linked a pull request Oct 8, 2022 that will close this issue
@slawekjaranowski slawekjaranowski added this to the 2.13.0 milestone Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants