You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/10/13 01:56:06 UTC
svn commit: r1182623 - in /tapestry/tapestry5/trunk: ./ quickstart/
quickstart/prototypes/
quickstart/prototypes/archetype-resources/src/main/java/components/
quickstart/prototypes/archetype-resources/src/main/java/pages/
quickstart/prototypes/archetyp...
Author: hlship
Date: Wed Oct 12 23:56:05 2011
New Revision: 1182623
URL: http://svn.apache.org/viewvc?rev=1182623&view=rev
Log:
TAP5-1682: Further corrections to the build and to the sample code and templates
Removed:
tapestry/tapestry5/trunk/quickstart/prototypes/archetype.pom
Modified:
tapestry/tapestry5/trunk/build.gradle
tapestry/tapestry5/trunk/quickstart/build.gradle
tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/components/Layout.java
tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/pages/Index.java
tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/components/Layout.tml
tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/pages/Index.tml
Modified: tapestry/tapestry5/trunk/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Wed Oct 12 23:56:05 2011
@@ -61,63 +61,60 @@ subprojects {
meta
}
- if (name != "quickstart")
- {
- apply plugin: 'java'
- apply plugin: 'groovy' // mostly for testing
- apply plugin: 'maven'
- apply plugin: 'project-report'
-
- sourceCompatibility = '1.5'
- targetCompatibility = '1.5'
-
- // See http://jira.codehaus.org/browse/GRADLE-784
-
- sourceSets {
- main {
- compileClasspath += configurations.provided
- }
- test {
- compileClasspath += configurations.provided
- runtimeClasspath += configurations.provided
- }
+ apply plugin: 'java'
+ apply plugin: 'groovy' // mostly for testing
+ apply plugin: 'maven'
+ apply plugin: 'project-report'
+
+ sourceCompatibility = '1.5'
+ targetCompatibility = '1.5'
+
+ // See http://jira.codehaus.org/browse/GRADLE-784
+
+ sourceSets {
+ main {
+ compileClasspath += configurations.provided
}
-
- ideaModule {
- scopes.PROVIDED.plus += configurations.provided
+ test {
+ compileClasspath += configurations.provided
+ runtimeClasspath += configurations.provided
}
+ }
- dependencies {
- groovy "org.codehaus.groovy:groovy-all:1.7.4"
+ ideaModule {
+ scopes.PROVIDED.plus += configurations.provided
+ }
- deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
- }
+ dependencies {
+ groovy "org.codehaus.groovy:groovy-all:1.7.4"
- test {
- useTestNG()
+ deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+ }
- options.suites("src/test/conf/testng.xml")
+ test {
+ useTestNG()
- maxHeapSize = "400M"
+ options.suites("src/test/conf/testng.xml")
- // Turn off live service reloading
+ maxHeapSize = "400M"
- systemProperties["tapestry.service-reloading-enabled"] = "false"
+ // Turn off live service reloading
- jvmArgs("-XX:MaxPermSize=512m")
- }
+ systemProperties["tapestry.service-reloading-enabled"] = "false"
- task sourcesJar(type: Jar, dependsOn: classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
- }
+ jvmArgs("-XX:MaxPermSize=512m")
+ }
- artifacts {
- meta sourcesJar
- }
+ task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ }
+ artifacts {
+ meta sourcesJar
}
+
configurations {
// published -- what gets uploaded to the Nexus repository
published.extendsFrom archives, meta
@@ -140,7 +137,7 @@ subprojects {
deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
- task uploadPublished {
+ uploadPublished {
doFirst {
if (!canDeploy)
Modified: tapestry/tapestry5/trunk/quickstart/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/build.gradle?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/build.gradle (original)
+++ tapestry/tapestry5/trunk/quickstart/build.gradle Wed Oct 12 23:56:05 2011
@@ -1,41 +1,27 @@
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
+import java.util.*
-generatedDir = new File(buildDir, 'quickstart-generated')
+task processPrototypes(type: Copy) {
-task generateArchetype(type: Copy) {
srcDir = file('prototypes')
inputs.file srcDir
- outputs.dir generatedDir
-
- generatedDir.mkdirs()
+ outputs.dir sourceSets.main.classesDir
from srcDir
- into generatedDir
+ into sourceSets.main.classesDir
// Use some of the filters provided by Ant
filter(FixCrLfFilter)
filter(ReplaceTokens, tokens: [
- quickstartVersion: version, tapestryReleaseVersion: version,
+ quickstartVersion: version,
+ tapestryReleaseVersion: version,
servletApiReleaseVersion: servletAPIVersion,
- testngReleaseVersion: testngVersion, easymockReleaseVersion: easymockVersion
+ testngReleaseVersion: testngVersion,
+ easymockReleaseVersion: easymockVersion,
+ year: new GregorianCalendar()[Calendar.YEAR].toString()
])
-
-}
-
-task build(type: Jar, dependsOn: 'generateArchetype') {
-
- description = "Creates a the JAR archive for the quickstart archetype"
- group = "Release artifact"
-
- destinationDir = buildDir
- baseName = "quickstart"
- version = project.version
-
- from generatedDir
}
-artifacts {
- archives build
-}
+processResources.dependsOn processPrototypes
Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/components/Layout.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/components/Layout.java?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/components/Layout.java (original)
+++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/components/Layout.java Wed Oct 12 23:56:05 2011
@@ -4,12 +4,12 @@ import org.apache.tapestry5.*;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.*;
import org.apache.tapestry5.BindingConstants;
-import org.apache.tapestry5.SymbolConstants
+import org.apache.tapestry5.SymbolConstants;
/**
* Layout component for pages of application ${artifactId}.
*/
-@IncludeStylesheet("context:layout/layout.css")
+@Import(stylesheet="context:layout/layout.css")
public class Layout
{
/**
Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/pages/Index.java?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/pages/Index.java (original)
+++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/java/pages/Index.java Wed Oct 12 23:56:05 2011
@@ -4,7 +4,8 @@ import java.util.Date;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.*;
import org.apache.tapestry5.corelib.components.*;
-import org.apache.tapestry5.SymbolConstants
+import org.apache.tapestry5.SymbolConstants;
+import org.apache.tapestry5.alerts.AlertManager;
/**
* Start page of application ${artifactId}.
@@ -40,6 +41,8 @@ public class Index
Object onActionFromIncrementAjax()
{
+ clickCount++;
+
alertManager.info("Increment (via Ajax) clicked");
return zone;
Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/components/Layout.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/components/Layout.tml?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/components/Layout.tml (original)
+++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/components/Layout.tml Wed Oct 12 23:56:05 2011
@@ -45,26 +45,26 @@ Description: A Web 2.0 design with fluid
<li class="search" style="background: none;">
</li>
<li>
- <t:alerts/>
+ <t:alerts/>
</li>
<li t:type="if" test="sidebar">
- <h2>${D}{sidebarTitle}</h2>
+ <h2>${D}{sidebarTitle}</h2>
- <div class="sidebar-content">
- <t:delegate to="sidebar"/>
- </div>
+ <div class="sidebar-content">
+ <t:delegate to="sidebar"/>
+ </div>
</li>
</ul>
</div>
<!-- end sidebar -->
<!-- start content -->
<div class="content">
- <div class="post">
- <div class="title">
- <h2>${D}{title}</h2>
- </div>
- <div class="entry">
- <t:body/>
+ <div class="post">
+ <div class="title">
+ <h2>${D}{title}</h2>
+ </div>
+ <div class="entry">
+ <t:body/>
</div>
</div>
</div>
@@ -75,7 +75,7 @@ Description: A Web 2.0 design with fluid
<!-- start footer -->
<div class="footer">
<p class="legal">
- ©${year} ${groupId}. All Rights Reserved.
+ ©@year@ ${groupId}. All Rights Reserved.
•
Design by
<a href="http://www.freecsstemplates.org/">Free CSS Templates</a>
Modified: tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/pages/Index.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/pages/Index.tml?rev=1182623&r1=1182622&r2=1182623&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/pages/Index.tml (original)
+++ tapestry/tapestry5/trunk/quickstart/prototypes/archetype-resources/src/main/resources/pages/Index.tml Wed Oct 12 23:56:05 2011
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
<html t:type="layout" title="${artifactId} Index"
t:sidebarTitle="Current Time"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"