[MNG-6770] Custom mojo changing project version but mavenSession doesn't get updated
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 40m
- Merged PRs (30d)
- 275
Description
**[Yuna Morgenstern](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=yuna90)** opened **[MNG-6770](https://issues.apache.org/jira/browse/MNG-6770?redirect=false)** and commented
I am using a custom maven plugin which helps me to preset the other plugins.
When I change my pom version (with org.codehaus.mojo:versions-maven-plugin:2.7)
and execute the maven-deploy-plugin afterwords, than the plugin is getting my old version from somewhere in the session. As I am unable to debug through, it would be great if someone could help me to fix this issue. where are these properties coming from: "artifact", "projectArtifact", "finalName" "project.build.finalName", "attachedArtifacts"...
Every plugin seems to work fine except the maven-deploy-plugin which is using the project version from somewhere.
After versioning, I am changing the project in the MavenProject session as well without success of effect for the next plugin. The only way is currently to run my plugin twice. one for deployment and before everything else.
My application is doing following in order:
* Cleaning
* Resolving Plugins & Dependencies
* Updates Plugins & Dependencies
* Updates Project Semantic Version
* Compiles Main & Test
* Builds Javadoc
* Builds Sources
* Builds Artifact file
* Signs files with GPG
* Tagging
* Deployment
Oh and I can't change the Settings xml data in the session, it doesn't have an effect to the maven-deploy-plugin as well. seems that the deploy plugin reads the settings file again. can I switch the settings file location in the mavenSession somehow?
---
No further details from [MNG-6770](https://issues.apache.org/jira/browse/MNG-6770?redirect=false)
Contributor guide
Assessment
This issue has not been assessed yet.