You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/04/04 00:55:58 UTC

[jira] Closed: (MPLUGINTESTING-1) Add convenience methods to MavenProjectStub to easily populate model from test resource

     [ http://jira.codehaus.org/browse/MPLUGINTESTING-1?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MPLUGINTESTING-1.
------------------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Fixed
    Fix Version/s: 1.2

Added in [r644546|http://svn.apache.org/viewvc?view=rev&revision=644546].

> Add convenience methods to MavenProjectStub to easily populate model from test resource
> ---------------------------------------------------------------------------------------
>
>                 Key: MPLUGINTESTING-1
>                 URL: http://jira.codehaus.org/browse/MPLUGINTESTING-1
>             Project: Maven 2.x Plugin Testing
>          Issue Type: Improvement
>          Components: plugin-testing-harness
>    Affects Versions: 1.1
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 1.2
>
>
> The following code snippet
> {code:java}
> MavenXpp3Reader pomReader = new MavenXpp3Reader();
> Model model = null;
> try
> {
>     File pomFile = new File( getBasedir(), "some-pom.xml" );
>     model = pomReader.read( ReaderFactory.newXmlReader( pomFile ) );
>     setModel( model );
> }
> catch ( Exception e )
> {
>     throw new RuntimeException( e );
> }
> {code}
> is both tiresome and error-prone (encoding). Moving this functionality into the {{MavenProjectStub}} would make life easier.

-- 
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