Looks like you have an old version of this file. The correct oane is:
package org.example.myapp.services; import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.tapestry.ioc.MappedConfiguration; import org.apache.tapestry.ioc.OrderedConfiguration; import org.apache.tapestry.ioc.annotations.InjectService; import org.apache.tapestry.services.Request; import org.apache.tapestry.services.RequestFilter; import org.apache.tapestry.services.RequestHandler; import org.apache.tapestry.services.Response; /** * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to * configure and extend Tapestry, or to place your own services. */ public class AppModule { public static void contributeApplicationDefaults( MappedConfiguration<String, String> configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just "en" (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma seperated series of locale names; // the first locale name is the default when there's no reasonable match). configuration.add("tapestry.supported-locales", "en"); } /** * This is a service definition, the service will be named TimingFilter. The interface, * RequestFilter, is used within the RequestHandler service pipeline, which is built from the * RequestHandler service configuration. Tapestry IoC is responsible for passing in an * appropriate Log instance. Requests for static resources are handled at a higher level, so * this filter will only be invoked for Tapestry related requests. */ public RequestFilter buildTimingFilter(final Log log) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { long startTime = System.currentTimeMillis(); try { // The reponsibility of a filter is to invoke the corresponding method // in the handler. When you chain multiple filters together, each filter // received a handler that is a bridge to the next filter. return handler.service(request, response); } finally { long elapsed = System.currentTimeMillis() - startTime; log.info(String.format("Request time: %d ms", elapsed)); } } }; } /** * This is a contribution to the RequestHandler service configuration. This is how we extend * Tapestry using the timing filter. A common use for this kind of filter is transaction * management or security. */ public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, @InjectService("TimingFilter") RequestFilter filter) { // Each contribution to an ordered configuration has a name, When necessary, you may // set constraints to precisely control the invocation order of the contributed filter // within the pipeline. configuration.add("Timing", filter); } } adasal wrote: > > I can use this to run 5.0.4 as per Daniel Jue but I cannot run 5.0.5. > I have cheated(?) and installed 5.0.4 tapestry-core as 5.0.5-SNAPSHOT then > if I e.g. mvn clean install -U this is the console output. It looks for > the > corresponding pom which it doesn't find. > Otherwise, without the cheat, it would ask for the 5.0.5-SNAPSHOT be > downloaded manually. I am very unclear how to do that or if that is what I > should do. > In short I don't get how to grab a snapshot using maven. Any ideas? > Adam > > [INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking > for > upda > tes from apache.snapshots > [INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking > for > upda > tes from howardlewisship.com > [INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking > for > upda > tes from central > [INFO] snapshot > org.apache.maven.plugins:maven-install-plugin:2.3-SNAPSHOT:chec > king for updates from apache.snapshots > [INFO] snapshot > org.apache.maven.plugins:maven-install-plugin:2.3-SNAPSHOT:chec > king for updates from howardlewisship.com > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] Copying 1 resource > [INFO] snapshot org.apache.tapestry:tapestry-core:5.0.5-SNAPSHOT: checking > for u > pdates from apache.snapshots > [INFO] snapshot org.apache.tapestry:tapestry-core:5.0.5-SNAPSHOT: checking > for u > pdates from codehaus.snapshots > [INFO] snapshot org.apache.tapestry:tapestry-core:5.0.5-SNAPSHOT: checking > for u > pdates from openqa > Downloading: > http://people.apache.org/repo/m2-snapshot-repository//org/apache/ta > pestry/tapestry-core/5.0.5-SNAPSHOT/tapestry-core-5.0.5-SNAPSHOT.pom > [WARNING] Unable to get resource from repository apache.snapshots ( > http://people > .apache.org/repo/m2-snapshot-repository/) > Downloading: > http://snapshots.repository.codehaus.org/org/apache/tapestry/tapest > ry-core/5.0.5-SNAPSHOT/tapestry-core-5.0.5-SNAPSHOT.pom > [WARNING] Unable to get resource from repository codehaus.snapshots ( > http://snap > shots.repository.codehaus.org) > Downloading: > http://maven.openqa.org//org/apache/tapestry/tapestry-core/5.0.5-SN > APSHOT/tapestry-core-5.0.5-SNAPSHOT.pom > [WARNING] Unable to get resource from repository openqa ( > http://maven.openqa.org > /) > [INFO] [compiler:compile] > [INFO] Compiling 2 source files to > C:\workspace\tapestry-maven\myapp\target\clas > ses > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Compilation failure > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[5,34] package org.apache.commons.logging does not exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[6,31] package org.apache.tapestry.ioc does not exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[7,31] package org.apache.tapestry.ioc does not exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[8,43] package org.apache.tapestry.ioc.annotations does not > exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[9,43] package org.apache.tapestry.ioc.annotations does not > exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[10,43] package org.apache.tapestry.ioc.annotations does not > exist > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[25,12] cannot find symbol > symbol : class MappedConfiguration > location: class org.example.myapp.services.AppModule > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[45,49] cannot find symbol > symbol : class Log > location: class org.example.myapp.services.AppModule > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[74,41] cannot find symbol > symbol : class OrderedConfiguration > location: class org.example.myapp.services.AppModule > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[20,1] cannot find symbol > symbol: class Id > @Id("app") > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[23,5] cannot find symbol > symbol : class Contribute > location: class org.example.myapp.services.AppModule > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[75,13] cannot find symbol > symbol : class InjectService > location: class org.example.myapp.services.AppModule > > C:\workspace\tapestry-maven\myapp\src\main\java\org\example\myapp\services\AppMo > dule.java:[73,5] cannot find symbol > symbol : class Contribute > location: class org.example.myapp.services.AppModule > > > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 22 seconds > [INFO] Finished at: Thu May 31 16:22:10 BST 2007 > [INFO] Final Memory: 5M/12M > [INFO] > ------------------------------------------------------------------------ > > On 29/05/07, RobertSchreiber <[EMAIL PROTECTED]> wrote: >> >> >> I found a note somewhere down on some page. >> >> I used >> -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/ >> when >> running maven. >> >> I changed the quickstsrt/pom.xml:<tapestry-release-version> to >> 5.0.5-SNAPSHOT >> and now I even managed to download that version (without problems)! >> >> Regards, Robert >> -- >> View this message in context: >> http://www.nabble.com/Shipwreck-when-downloading-T5.0.5-tf3809133.html#a10858332 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Shipwreck-when-downloading-T5.0.5-tf3809133.html#a10900395 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]