tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Tapestry > Maven Support FAQ
Date Thu, 30 Sep 2010 19:08:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/12/_/styles/combined.css?spaceKey=TAPESTRY&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/TAPESTRY/Maven+Support+FAQ">Maven
Support FAQ</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~hlship">Howard
M. Lewis Ship</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >then any expansions in _Tapestry templates_
that match against Maven project <br>properties are substituted.  If you look at the
deployed application you&#39;ll see that <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{\${name\}}}</span>
<span class="diff-added-words"style="background-color: #dfd;">{{$\{name\}}}</span>
is gone, replaced with your project&#39;s name! <br></td></tr>
            <tr><td class="diff-unchanged" > <br>The solution is to update
your {{pom.xml}} and ignore any .tml files when <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="MavenSupportFAQ-MavenSupport"></a>Maven Support</h2>

<h3><a name="MavenSupportFAQ-WhydoMavenprojectnamesandotherdetailsshowupinmypages%3F"></a>Why
do Maven project names and other details show up in my pages?</h3>

<p>Tapestry and maven both use the same syntax for dynamic portions of files:<br/>
the <tt>${...</tt>} syntax.  When Maven is copying resources from <tt>src/main/resources</tt>,<br/>
and when filtering is <em>enabled</em> (which is not the default),<br/>
then any expansions in <em>Tapestry templates</em> that match against Maven project<br/>
properties are substituted.  If you look at the deployed application you'll see that<br/>
<tt>${name</tt>} is gone, replaced with your project's name!</p>

<p>The solution is to update your <tt>pom.xml</tt> and ignore any .tml files
when<br/>
copying and filtering:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>pom.xml (partial)</b></div><div
class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Default; brush: java; gutter:
false"><![CDATA[
  &lt;resource&gt;
    &lt;directory&gt;src/main/resources&lt;/directory&gt;
    &lt;excludes&gt;
      &lt;exclude&gt;**/*.tml&lt;/exclude&gt;
    &lt;/excludes&gt;
    &lt;filtering&gt;true&lt;/filtering&gt;
  &lt;/resource&gt;

  &lt;resource&gt;
    &lt;directory&gt;src/main/resources&lt;/directory&gt;
    &lt;includes&gt;
      &lt;include&gt;**/*.tml&lt;/include&gt;
    &lt;/includes&gt;
    &lt;filtering&gt;false&lt;/filtering&gt;
  &lt;/resource&gt;
]]></script>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/TAPESTRY/Maven+Support+FAQ">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23339430&revisedVersion=3&originalVersion=2">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message