[
http://jira.codehaus.org/browse/MNG-2722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aaron Digulla updated MNG-2722:
-------------------------------
Attachment: embedder-start-twice.patch
This fix causes all kinds of problems in various Maven plugins if you have to
change the settings, for example, by calling start() a second time with a
different settings.xml file (setUserSettingsFile() and setGlobalSettingsFile())
because some parts of Maven don't copy the new values.
In the attached test case, you'll find a couple of bugs:
- The embedder crashes horribly if you change the localRepository path to an
empty directory (see stacktrace in the test case).
- The path to the repository is correct in the embedder but not in the
execution request if the second settings file specifies localRepository
My guess is that this causes all kinds of strange bugs and behaviors in the
plugins which are then loaded.
> Create a strategy for providing sane default values in the
> MavenExecutionRequest
> --------------------------------------------------------------------------------
>
> Key: MNG-2722
> URL: http://jira.codehaus.org/browse/MNG-2722
> Project: Maven 2
> Issue Type: Task
> Components: Embedding
> Reporter: Jason van Zyl
> Attachments: embedder-start-twice.patch
>
>
> Ideally an Embedder user should be able to do something like:
> MavenEmbedder embedder = new MavenEmbedder();
> MavenExecutionRequestion request = new DefaultMavenExecutionRequestion()
> .setBasedir( directory )
> .setGoals( Arrays.asList( new String[]{ "package" } ) );
> embedder.execute( request );
> And this should work.
--
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