Julien's question traces back (I assume) to a thread with the subject
"Component xxx does not contain embedded component 'yyy'".

PageTester was not picking up the tml files from the
src/main/resources tree, but when copied to src/test/resources,
everything worked.  This was, of course, a diagnosis not a solution,
and I didn't have a response when asked how to get them picked up from
src/main/resources.

I made the suggestion to copy from src/main/resources to
src/test/resources because I finally remembered hitting this issue
several months ago.  At that time, I needed to actually get some work
done, and I never did get back to the question, and my automated
testing isn't where it should be as a result.

If anyone does have the solution to having PageTester pick up tml
files located in src/main/resources in an Eclipse/m2eclipse
environment, I would also really appreciate knowing it.

As I think about it, the solution may lie in a targetPath option for a
resource specification in the pom - have two resource specifications
pointing at src/main/resources - one copies to default destination,
the other to src/target/test-classes?  Just thinking out loud...

Regards,
Jonathan


On Thu, Feb 16, 2012 at 5:15 AM, Lance Java <lance.j...@googlemail.com> wrote:
> I would avoid putting resources (.tml and .properties) in src/main/java as
> you are going against maven's conventions.
>
> Only java files should go in src/main/java. Resources should go into
> src/main/resources and test resources should go in src/test/resources.
>
> What you said initially about needing to copy resources into
> src/test/resources is incorrect. Your test cases will see all classes in
> src/main/java and all resources in src/main/resources. With the addition
> that all of the src/test/* files are available too.
>
> I use maven with the m2eclipse plugin which keeps eclipse up-to-date with
> your pom.xml.
>
> On Thursday, 16 February 2012, Julien Martin <bal...@gmail.com> wrote:
>> Hello Chris,
>>
>> Thanks! You pointed me to the right direction. I changed my POM as
> follows:
>> *<build>*
>> * <resources>*
>> * <resource>*
>> * <directory>src/main/java</directory>*
>> * <includes>*
>> * <include>**/*.tml</include>*
>> * <include>**/*.properties</include>*
>> * </includes>*
>> * </resource>*
>> * <resource>*
>> * <directory>src/main/resources</directory>*
>> * <includes>*
>> * <include>**/*</include>*
>> * <include>**/*.xml</include>*
>> * <include>**/*.tml</include>*
>> * <include>**/*.properties</include>*
>> * </includes>*
>> * </resource>*
>> * </resources>*
>> It now works fine.
>> Regards,
>> Julien.
>>
>> Le 16 février 2012 09:26, Chris Mylonas <ch...@opencsta.org> a écrit :
>>
>>> I don't know, but there's a tapestry testing module called testify that
>>> might be worth having a look at the docs.
>>> Might be some hints there
>>>
>>> http://tapestrytestify.sourceforge.net/project-layout.html
>>>
>>> I don't know the answer for you unfortunately,
>>>
>>> HTH,
>>> Chris
>>>
>>> On 16/02/2012, at 7:13 PM, Julien Martin wrote:
>>>
>>> > Hello all,
>>> > I am interested in getting feedback from those of you who use Maven +
>>> > Eclipse in order to develop Tapestry applications.
>>> > I recently realized that Tapestry templates located in
>>> > *src/main/resources*also need to be located in
>>> > *src/test/resources* in order to be picked up during unit tests.
>>> > I am not sure how to configure my environment to avoid copying the
>>> > **.tml*files from
>>> > *src/main/resources* into *src/test/resources*.
>>> > Can anyone please share tips or advice?
>>> > Regards,
>>> > J.
>>> > P.S. This is slightly off-topic as it also relates to Eclipse and
> Maven.
>>> > Sorry...
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>



-- 
Jonathan Barker
ITStrategic

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

Reply via email to