[ 
http://jira.codehaus.org/browse/MINVOKER-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116816
 ] 

Gerhard Langs commented on MINVOKER-18:
---------------------------------------

One more note:
my proposed solution works, but has a small drawback: In some cases (eg. by 
interrupting a running process,) it can leave the interpolation file in place, 
and the next and all subsequent invocations then fail. So one more improvement 
would be either to also add the "deleteOnExit" flag or to always delete an old 
file before creating a new one

Gerhard.

> two executions of the same pom causes a prooblem with interpolated-pom.xml
> --------------------------------------------------------------------------
>
>                 Key: MINVOKER-18
>                 URL: http://jira.codehaus.org/browse/MINVOKER-18
>             Project: Maven 2.x Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: latest 1.1-SNAPSHOT Version, maven-2.0.7
>            Reporter: Gerhard Langs
>            Assignee: Olivier Lamy
>             Fix For: 1.1
>
>         Attachments: invoker-18.patch, invoker-18.patch, 
> pom-interpolation2-invoked.xml, pom-interpolation2.xml
>
>
> TestCase:
>    pom-interpolated2.xml uses invoker to invoke 
> "pom-interpolated2-invoked.xml  in 2 "executions".
> invocation:
>    mvn -f pom-interpolated2.xml test -e
> the second execution fails, because it is unable to create the 
> "interpolated-pom.xml".
> Proposed solution:
>    - dont tag the interpolated-pom.xml as "deleteOnExit",
>    - delete that file at the end of every execution.
> Will try to provide a patch....
> Greetings, Gerhard
> Output:
> ...
> Caused by: org.apache.maven.plugin.MojoExecutionException: fail to create 
> file 
> D:\maven\maven-invoker-plugin\src\test\resources\unit\interpolation2\.\interpolated-pom.xml
>         at 
> org.apache.maven.plugin.invoker.InvokerMojo.buildInterpolatedPomFile(InvokerMojo.java:997)
>         at 
> org.apache.maven.plugin.invoker.InvokerMojo.runBuild(InvokerMojo.java:458)
>         at 
> org.apache.maven.plugin.invoker.InvokerMojo.execute(InvokerMojo.java:341)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to