There is no support for reloading the pom during a maven invocation.

This is why the versions plugin _clearly_ states that you cannot use
it with anything else from the same maven invocation.

On 23 August 2011 17:42, Krull, Stephan <stephan.kr...@ecg-leipzig.de> wrote:
> Hello there,
>
> I am currently working on a maven command chain to fulfill several tasks in 
> one step on a maven project. the chain has the following syntax:
>
> "../apache-maven-2.2.1/bin/mvn clean versions:use-parent-release scm:checkin 
> install"
>
> Explanation: The command chain starts by changing the version number of the 
> parent artifact in the POM file to a corresponding release version (i.e. if I 
> declare "<version>1.0.0-SNAPSHOT</version" in the parent section of the POM 
> this will be transformed to "<version>1.0.0</version>"). After this change 
> maven is going to commit these changes to the source code management. 
> Thereafter I want maven to install the project with the new parent version 
> number.
>
> The problem: Changing and committing the change runs perfectly but at the 
> installation step maven is working with the old parent version. My guess is 
> that although the file (pom.xml) has already changed in the filesystem, maven 
> still holds the "org.apache.maven.project.MavenProject" object which at 
> instantiation time got the POM information before transformation. That is a 
> problem because I do not see a way to change the POM file and call install 
> (or deploy) on that currently changed project configuration in one maven call.
>
> Does anybody have a clue how to get around this problem? I have been looking 
> around to special annotations for the mojo to call but have not been lucky. 
> Maybe there is a (hidden) plugin that is able to inject a reloaded 
> MavenProject object into the reactor.
>
> Appreciate your time reading this.
>
> Regards
>
> Stephan Krull
>
>
>
>
>
>
> ECG Erdgas-Consult GmbH
> Föpplstraße 3
>
> 04347 Leipzig / Germany
> +49 341 443-1583 (phone)
> +49 341 443-1855 (fax)
>
> mailto: stephan.kr...@ecg-leipzig.de <mailto:stephan.kr...@ecg-leipzig.de>
> Internet: www.ecg-leipzig.de <http://www.ecg-leipzig.de/>
>
> __________________________________________________
>
>
> ECG Erdgas-Consult GmbH
> Föpplstraße 3
> 04347 Leipzig / Germany
>
> Court of Register: Local Court of Leipzig HRB 16467
> Chief Executive Officer: Dr. Peter Heine, Klaus-Dieter Görlich
> ________________________________________________
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to