Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Use single version for whole project #500

Closed
Incarnation-p-lee opened this issue Dec 13, 2018 · 9 comments
Closed

Use single version for whole project #500

Incarnation-p-lee opened this issue Dec 13, 2018 · 9 comments
Assignees

Comments

@Incarnation-p-lee
Copy link
Contributor

Current we have to edit 17 lines for version upgrade, should depend on one and only one version for this repo.

@Incarnation-p-lee
Copy link
Contributor Author

We can leverage maven revision place holder to archive this target.

@LennartHaggkvistHM
Copy link
Contributor

Please note that if you use ${revision} then the public advice is to use flatten-maven-plugin - but that one alters the pom files in a lot of ways. More information: mojohaus/flatten-maven-plugin#51

@Incarnation-p-lee
Copy link
Contributor Author

@LennartHaggkvistHM
Thanks for your information, We decide to clean up this as it is stupid to change the version in about 20 locations for each version upgrading. We may follow the rules from spring boot project and only leverage ${revision} in this repo. Please correct me if something misleading.

Incarnation-p-lee added a commit that referenced this issue Dec 13, 2018
@LennartHaggkvistHM
Copy link
Contributor

@Incarnation-p-lee
My experience is that it can be a problem - so I would suggest that you
a) check the installed files in your local mvn repo so that they doesn't contain ${revision} - they should contain the actual version.
b) verify with another project using the new versions (ie - some other project using the snapshot version)

@Incarnation-p-lee
Copy link
Contributor Author

Incarnation-p-lee commented Dec 13, 2018

@LennartHaggkvistHM
You mean if other repo leverage ${revision} and depends on this package or this package dependencies with ${revision} will result in override or something mess. If yes, that may be a problem, need to investigate the risk before the PR.

@Incarnation-p-lee
Copy link
Contributor Author

@LennartHaggkvistHM
Thanks for you advice. My previous understanding is not very correct. ${revision} may be the mess even we leverage the plugin flatten-maven-plugin. As our dependency graph is different to spring-boot-project, the plugin doesn't not works very well.

We may consider to abandon ${revision}, and within that plugin the whole process may become complicated. We may prefer some simple way to resolve this, like some script to replace the version.

@Incarnation-p-lee
Copy link
Contributor Author

close this issue due to abandon revision.

@LennartHaggkvistHM
Copy link
Contributor

@Incarnation-p-lee there is now a new version of the flatten-maven-plugin that works better. I suggest that you test it. The example on https://maven.apache.org/maven-ci-friendly.html works better now.

@Incarnation-p-lee
Copy link
Contributor Author

@LennartHaggkvistHM Good to learn this, we will have a try later.

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

No branches or pull requests

2 participants