You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashley Williams <ag...@mac.com> on 2005/09/26 16:28:32 UTC

[m2] getting error when pointing to new testResources

Hi,

I'm trying to change the resources directory for tests and so I  
created the following build section in my POM:

   <build>
     <sourceDirectory>.</sourceDirectory>
     <testSourceDirectory>.</testSourceDirectory>


     <resources>
       <resource>
         <directory>resources</directory>
       </resource>
     </resources>


     <testResources>
       <resource>
         <directory>resources</directory>
       </resource>
     </testResources>


   </build>


As you can see the testResources section is identical to the  
resources section except for the name. However when I
run m2 install I get the following error:


[INFO] Reason: Failed to parse model from file '/Users/dev/projects/ 
source-tree/pom.xml'.
Error: 'TEXT must be immediately followed by END_TAG and not  
START_TAG (position: START_TAG seen ...<resource>\n         
<directory>... @18:20) '


This error goes away if I delete the testResources section. As far as  
I can tell I'm using the syntax specified on the plugin descriptor page.

Thanks
- Ashley

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] getting error when pointing to new testResources

Posted by Trygve Laugstøl <tr...@codehaus.org>.
On Mon, 2005-09-26 at 15:56 +0100, Mark Hobson wrote:
> On 26/09/05, Ashley Williams <ag...@mac.com> wrote:
> > Works now - you know I _nearly_ tried that as a last ditch attempt,
> > honestly! Seems the
> > project descriptor isn't auto-generated from the code like I thought
> > it was though.
> 
> Yeah it got me first time too - not too sure why the doc differs from
> the code since it is auto-generated?

The issue[1] is that the TestResource class inherits the Resource class
and there's a bug in the Modello plugin that renders the page.

[1]: http://jira.codehaus.org/browse/MNG-523

--
Trygve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] getting error when pointing to new testResources

Posted by Mark Hobson <ma...@gmail.com>.
On 26/09/05, Ashley Williams <ag...@mac.com> wrote:
> Works now - you know I _nearly_ tried that as a last ditch attempt,
> honestly! Seems the
> project descriptor isn't auto-generated from the code like I thought
> it was though.

Yeah it got me first time too - not too sure why the doc differs from
the code since it is auto-generated?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] getting error when pointing to new testResources

Posted by Jason van Zyl <ja...@maven.org>.
On Mon, 2005-09-26 at 15:39 +0100, Ashley Williams wrote:
> Works now - you know I _nearly_ tried that as a last ditch attempt,  
> honestly! Seems the
> project descriptor isn't auto-generated from the code like I thought  
> it was though.

It is generated but there is a bug in the generation. It's in JIRA. A
problem with modello.

-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] getting error when pointing to new testResources

Posted by Ashley Williams <ag...@mac.com>.
Works now - you know I _nearly_ tried that as a last ditch attempt,  
honestly! Seems the
project descriptor isn't auto-generated from the code like I thought  
it was though.

On 26 Sep 2005, at 15:34, Mark Hobson wrote:

> On 26/09/05, Ashley Williams <ag...@mac.com> wrote:
>
>> This error goes away if I delete the testResources section. As far as
>> I can tell I'm using the syntax specified on the plugin descriptor  
>> page.
>>
>
> Yep, the page is wrong :)  Use <testResource> rather than <resource>
> within the <testResources> block.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] getting error when pointing to new testResources

Posted by Mark Hobson <ma...@gmail.com>.
On 26/09/05, Ashley Williams <ag...@mac.com> wrote:
> This error goes away if I delete the testResources section. As far as
> I can tell I'm using the syntax specified on the plugin descriptor page.

Yep, the page is wrong :)  Use <testResource> rather than <resource>
within the <testResources> block.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org