[
https://issues.apache.org/jira/browse/MNG-6770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16948943#comment-16948943
]
Yuna Morgenstern commented on MNG-6770:
---------------------------------------
Hm I could try...
_I am creating here
[https://github.com/YunaBraska/deployment-maven-plugin|https://github.com/YunaBraska/deployment-maven-plugin]
my own deployment plugin for my default spring boot applications. The goal of
the plugin is to get rid of deployment descriptions in my project and to just
auto configure/run the needed plugins.
This is what I use to reproduce the issue. This sets the version which seems to
be fine until the maven-deploy-plugin tries to deploy the old version.
{code:bash}
mvn clean -Dmaven.test.skip=true install; mvn
berlin.yuna:maven-deployment-plugin:12.0.2:run -Dproject.version="1.1.1"
-Ddeploy -Ddeploy.url="https://user:[email protected]"
{code}
I really don't understand where the plugins and the session is getting all the
properties from. The maven-deploy-plugin even ignores my changes to the
settings.xml from in the maven-session. but that's another story. Maybe I am
missing something. Its just very hard to create plugins which are calling other
plugins ;)
> Custom mojo changing project version but mavenSession doesn't get updated
> --------------------------------------------------------------------------
>
> Key: MNG-6770
> URL: https://issues.apache.org/jira/browse/MNG-6770
> Project: Maven
> Issue Type: Bug
> Reporter: Yuna Morgenstern
> Priority: Minor
>
> 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?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)