Tapestry Training -- From The Source

Let me help you get your team up to speed in Tapestry ... fast. Visit howardlewisship.com for details on training, mentoring and support!

Thursday, October 13, 2011

Tapestry 5.3 Maven Archetype

After struggling most of yesterday day, I finally have the Maven archetype working.

Use the command:


mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org/


This points Maven at the Tapestry-specific Archetype Catalog, you want the first option ("Tapestry 5 Quickstart Project"), then choose the fourth option ("5.3-beta-20").

I need to fix something broken in the CSS of the archetype; otherwise it's working nicely, and demonstrates a bunch of new features in Tapestry 5.3; it also makes use of up-to date features, such as using the @Import annotation (instead of the now removed @IncludeStylesheet annotation), and some Ajax features on the first page.

I may switch things around to make use of Twitter's Bootstrap CSS stylesheets.

Here's a full session of creating the application and getting it running; it took less than 30 seconds:



7 comments:

kheldar666 said...

Hi Howard,

I tried to run the Archetype few minutes ago and I get this :

[DEBUG] Retrieving parent-POM: org.easymock:easymock-parent:pom:3.0 for project: null:easymock:jar:null from the repository.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:easymock:jar:null

Reason: Cannot find parent: org.easymock:easymock-parent for project: null:easymock:jar:null for project null:easymock:jar:null

Any idea ?

By the way : I do love Tapestry, your job is amazing :)

Unknown said...

Odd; could be version of Maven .... I'm on 3.0.3; perhaps there's an issue if you are still on Maven 2? I would have thought compatibility wouldn't be a problem.

I'll wipe out my local repository and try again.

kheldar666 said...

Hi Howard,

Indeed I am on Maven 2... I will try on Maven 3.

Martin

kheldar666 said...

I confirm : works on Maven 3.0.3 :)

Unknown said...

Hello,

I really do hope reporting form validation errors will be like http://twitter.github.com/bootstrap//#forms by default!

and that those bubbles go away. We at work did several T5 apps, and just about everybody that saw default error client side reporting was raising their eyebrows.

Dominik said...

Hi Howard,

I did run the Archetype and everything's working fine when I#m starting it via mvn jetty:run.
But after importing it into Eclipse and starting it via the RunJettyRun Plugin I get the following error:
[ERROR] ioc.Registry java.util.EmptyStackException
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Streaming asset stack en/core.js
[ERROR] ioc.Registry [ 2] Minimizing JavaScript
[...]
Caused by: java.util.EmptyStackException
at java.util.Stack.peek(Unknown Source)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.getCurrentScope(JavaScriptCompressor.java:559)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSymbolTree(JavaScriptCompressor.java:1105)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.compress(JavaScriptCompressor.java:553)

Do you have any idea why that's happening?

Unknown said...

5.3-beta-23 fixes the graphic glitches (was corrupted image files), and includes a Gradle build.gradle as will as a Maven pom.xml. Not sure what Dominic's issue is (I haven't had a chance to check into it).