2013-06-03 44 views

回答

0
<html t:type="layout" title="" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"> 
    <div> 
     <h4>Version:</h4> 
      ${project.version} 
     <h4>Revision:</h4> 
      ${buildNumber} 
    </div> 
</html> 
0

添加在您的MANIFEST.MF

實施,構建

的實現版本:11111

在你AppModule.java

public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration) { 
    ....... 
    String version = "0"; 
    if (null != AppModule.class.getPackage()) { 
     version = AppModule.class.getPackage().getImplementationVersion(); 
    } 

    configuration.add(SymbolConstants.APPLICATION_VERSION, version); 
    ....... 
} 

添加屬性在你的頁面類

@Inject 
@Symbol(SymbolConstants.APPLICATION_VERSION) 
@Property 
protected String buildNumber; 
+0

嘿嘿,謝謝你,我會嘗試一下。 我注意到我的解決方案只顯示特定頁面的buildnumber,這是錯誤的。 – MartinC

相關問題