tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Lewis Ship" <hls...@gmail.com>
Subject Re: AW: Advantages of various .tml storage locations?
Date Fri, 05 Dec 2008 17:34:38 GMT
Yes, Pages are given the option of having their templates in the
webapp, but both page and components can have their templates on the
classpath.

As I was saying, I would have preferred, in retrospect, that pages not
have a special case, and that templates always go on the classpath ...
but that horse has left the barn.

On Fri, Dec 5, 2008 at 8:44 AM, Christian Edward Gruber
<christianedwardgruber@gmail.com> wrote:
> No, that's not a maven thing, that's a Tapestry thing.  Pages always go in
> webapp.  It's actually a function of the way J2EE WARs are constructed, and
> how T5 interprets this information to construct pages.  Pages are a special
> case component.
>
> Howard, is an alternate location possible for pages?
>
> Christian.
>
> On 5-Dec-08, at 11:30 , Luther Baker wrote:
>
>> Assuming this:
>>
>> src/main/java/*com/X/app*/pages/Home.java
>>
>>
>> This doesn't work for me:
>>
>> src/main/resources/*com/X/app*/pages/Home.tml
>>
>>
>> Wherease, this works just fine:
>>
>> src/main/webapp/Home.tml
>>
>>
>> Do I need to do something special to drop my pages in the resources dir or
>> does this just work and I am overlooking something.
>>
>> Thanks,
>>
>> -Luther
>>
>>
>>
>> On Fri, Dec 5, 2008 at 10:05 AM, Christian Edward Gruber <
>> christianedwardgruber@gmail.com> wrote:
>>
>>> It's not a fix, it's a design.  Code goes in /src/main/java. Resources go
>>> in /src/main/resources.  It's part of having a place for everything, and
>>> everything in its place.
>>>
>>> You could hack it by a custom execution of the resources plugin pointing
>>> to
>>> your "alternative resources location" (ie, src/main/java) but this isn't
>>> something that needs a solution - it's how the tool works.
>>>
>>> Actually, i think you could set the resources location to src/main/java
>>> anyway... one sec...
>>>
>>> Yep.
>>>
>>> Use the <build><resources>...</resources></build> section
of the pom to
>>> point at resources in /src/main/java.  eg:
>>>
>>> <resources>
>>>      <resource>
>>>              <targetPath>/</targetPath>
>>>              <filtering>true</filtering>
>>>              <directory>${basedir}/src/main/java</directory>
>>>              <includes> <include>**/*.tml</include> </includes>
>>>      </resource>
>>> </resources>
>>> This should pick up .tml files in /src/main/java.  Not maven best
>>> practice,
>>> but if it works for you, have fun.  I still expect it will only work for
>>> components, not pages.  Howard?  True?
>>>
>>> Christian.
>>>
>>>
>>> On 5-Dec-08, at 06:05 , Maximilian Weißböck wrote:
>>>
>>> I would much prefer solution number 1. as it keeps things
>>>>
>>>> on the same place that belong together.
>>>>
>>>> Sadly maven build does not work with this solution.
>>>> Is there any maven guru how knows how to "fix" this?
>>>>
>>>> Thanks, Max
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>>>
>>>>> Von: yimmy149@gmail.com [mailto:yimmy149@gmail.com] Im Auftrag von
>>>>> James
>>>>> Hillyerd
>>>>> Gesendet: Donnerstag, 4. Dezember 2008 23:06
>>>>> An: Tapestry users
>>>>> Betreff: Advantages of various .tml storage locations?
>>>>>
>>>>> What are the pros/cons of keeping page .tml in:
>>>>>
>>>>> 1. src/main/java
>>>>>
>>>>> vs
>>>>>
>>>>> 2. src/main/resources
>>>>>
>>>>> vs
>>>>>
>>>>> 3. src/main/webapp
>>>>>
>>>>> ?
>>>>>
>>>>>
>>>>> I see JumpStart uses #1, and the tutorial uses #3.  Seems like it would
>>>>> easier to use #1 or #2 so at least the components and pages .tml are
in
>>>>> the
>>>>> same directory tree.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> -james
>>>>>
>>>>> --
>>>>> James A. Hillyerd <james@hillyerd.com>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Mime
View raw message