tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r738649 - in /tapestry/tapestry5/trunk: ./ quickstart/src/main/resources/archetype-resources/ tapestry-annotations/ tapestry-component-report/ tapestry-core/src/main/java/org/apache/tapestry5/ tapestry-core/src/main/java/org/apache/tapestry...
Date Wed, 28 Jan 2009 22:27:16 GMT
Author: hlship
Date: Wed Jan 28 22:27:16 2009
New Revision: 738649

URL: http://svn.apache.org/viewvc?rev=738649&view=rev
Log:
TAP5-482: Maven repository location http://archiva.openqa.org/repository/releases has a unwanted
trailing slash in the master pom.xml
TAP5-480: Upgrade Surefire Plugin and TestNG dependencies to latest version (2.4.3 and 5.8,
respectively)

Modified:
    tapestry/tapestry5/trunk/pom.xml
    tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml
    tapestry/tapestry5/trunk/tapestry-annotations/pom.xml
    tapestry/tapestry5/trunk/tapestry-component-report/pom.xml
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/PageTester.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/TapestryAppInitializerTest.java
    tapestry/tapestry5/trunk/tapestry-ioc/pom.xml
    tapestry/tapestry5/trunk/tapestry-test/pom.xml

Modified: tapestry/tapestry5/trunk/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/pom.xml (original)
+++ tapestry/tapestry5/trunk/pom.xml Wed Jan 28 22:27:16 2009
@@ -255,7 +255,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.4</version>
+                    <version>2.4.3</version>
                     <configuration>
                         <suiteXmlFiles>
                             <suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
@@ -386,7 +386,7 @@
         <repository>
             <id>OpenQA_Release</id>
             <name>OpenQA Release Repository</name>
-            <url>http://archiva.openqa.org/repository/releases/</url>
+            <url>http://archiva.openqa.org/repository/releases</url>
         </repository>
     </repositories>
 
@@ -440,6 +440,7 @@
         <!-- Version 2.1 lists everything as 100% covered, weird. -->
         <cobertura-plugin-version>2.2-SNAPSHOT</cobertura-plugin-version>
         <update-release-info>false</update-release-info>
+        <testng-version>5.8</testng-version>
     </properties>
 
 </project>

Modified: tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml (original)
+++ tapestry/tapestry5/trunk/quickstart/src/main/resources/archetype-resources/pom.xml Wed
Jan 28 22:27:16 2009
@@ -19,7 +19,7 @@
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
-            <version>5.1</version>
+            <version>5.8</version>
             <classifier>jdk15</classifier>
             <scope>test</scope>
         </dependency>

Modified: tapestry/tapestry5/trunk/tapestry-annotations/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-annotations/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-annotations/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-annotations/pom.xml Wed Jan 28 22:27:16 2009
@@ -21,7 +21,7 @@
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
-            <version>5.7</version>
+            <version>${testng-version}</version>
             <classifier>jdk15</classifier>
             <scope>test</scope>
         </dependency>

Modified: tapestry/tapestry5/trunk/tapestry-component-report/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-component-report/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-component-report/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-component-report/pom.xml Wed Jan 28 22:27:16 2009
@@ -86,7 +86,7 @@
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
-            <version>5.7</version>
+            <version>${testng-version}</version>
             <classifier>jdk15</classifier>
             <scope>test</scope>
         </dependency>

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
Wed Jan 28 22:27:16 2009
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2009 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
 import org.apache.tapestry5.internal.TapestryAppInitializer;
 import org.apache.tapestry5.ioc.Registry;
 import org.apache.tapestry5.ioc.def.ModuleDef;
-import org.apache.tapestry5.ioc.services.*;
+import org.apache.tapestry5.ioc.services.SymbolProvider;
 import org.apache.tapestry5.services.HttpServletRequestHandler;
 import org.apache.tapestry5.services.ServletApplicationInitializer;
 import org.slf4j.Logger;
@@ -28,8 +28,6 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
-import java.util.Formatter;
-import java.util.List;
 
 /**
  * The TapestryFilter is responsible for intercepting all requests into the web application.
It identifies the requests
@@ -73,18 +71,14 @@
 
         SymbolProvider provider = new ServletContextSymbolProvider(context);
 
-        TapestryAppInitializer appInitializer = new TapestryAppInitializer(provider, filterName,
"servlet");
+        TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, provider,
filterName, "servlet");
 
         appInitializer.addModules(provideExtraModuleDefs(context));
 
-        registry = appInitializer.getRegistry();
+        registry = appInitializer.createRegistry();
 
         context.setAttribute(REGISTRY_CONTEXT_NAME, registry);
 
-        long start = appInitializer.getStartTime();
-
-        long toRegistry = appInitializer.getRegistryCreatedTime();
-
         ServletApplicationInitializer ai = registry.getService("ServletApplicationInitializer",
                                                                ServletApplicationInitializer.class);
 
@@ -94,55 +88,9 @@
 
         handler = registry.getService("HttpServletRequestHandler", HttpServletRequestHandler.class);
 
-        SymbolSource source = registry.getService("SymbolSource", SymbolSource.class);
-
         init(registry);
 
-        long toFinish = System.currentTimeMillis();
-
-        StringBuilder buffer = new StringBuilder("Startup status:\n\n");
-        Formatter f = new Formatter(buffer);
-
-        f.format("Application '%s' (Tapestry version %s).\n\n" +
-                "Startup time: %,d ms to build IoC Registry, %,d ms overall.\n\n" +
-                "Startup services status:\n",
-                 filterName,
-                 source.valueForSymbol(SymbolConstants.TAPESTRY_VERSION),
-                 toRegistry - start, toFinish - start);
-
-        int unrealized = 0;
-
-        ServiceActivityScoreboard scoreboard = registry
-                .getService(ServiceActivityScoreboard.class);
-
-        List<ServiceActivity> serviceActivity = scoreboard.getServiceActivity();
-
-        int longest = 0;
-
-        // One pass to find the longest name, and to count the unrealized services.
-
-        for (ServiceActivity activity : serviceActivity)
-        {
-            Status status = activity.getStatus();
-
-            longest = Math.max(longest, activity.getServiceId().length());
-
-            if (status == Status.DEFINED || status == Status.VIRTUAL) unrealized++;
-        }
-
-        String formatString = "%" + longest + "s: %s\n";
-
-        // A second pass to output all the services
-
-        for (ServiceActivity activity : serviceActivity)
-        {
-            f.format(formatString, activity.getServiceId(), activity.getStatus().name());
-        }
-
-        f.format("\n%4.2f%% unrealized services (%d/%d)\n", 100. * unrealized / serviceActivity.size(),
unrealized,
-                 serviceActivity.size());
-
-        logger.info(buffer.toString());
+        appInitializer.announceStartup();
     }
 
     protected final FilterConfig getFilterConfig()

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryAppInitializer.java
Wed Jan 28 22:27:16 2009
@@ -14,15 +14,19 @@
 
 package org.apache.tapestry5.internal;
 
+import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.ioc.IOCUtilities;
 import org.apache.tapestry5.ioc.Registry;
 import org.apache.tapestry5.ioc.RegistryBuilder;
 import org.apache.tapestry5.ioc.def.ContributionDef;
 import org.apache.tapestry5.ioc.def.ModuleDef;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.ioc.services.SymbolProvider;
-import org.apache.tapestry5.services.Alias;
+import org.apache.tapestry5.ioc.services.*;
 import org.apache.tapestry5.services.TapestryModule;
+import org.slf4j.Logger;
+
+import java.util.Formatter;
+import java.util.List;
 
 /**
  * This class is used to build the {@link Registry}. The Registry contains {@link org.apache.tapestry5.ioc.services.TapestryIOCModule}
@@ -35,6 +39,8 @@
  */
 public class TapestryAppInitializer
 {
+    private final Logger logger;
+
     private final SymbolProvider appProvider;
 
     private final String appName;
@@ -46,19 +52,23 @@
     private final RegistryBuilder builder = new RegistryBuilder();
 
     private long registryCreatedTime;
+    private Registry registry;
 
-    public TapestryAppInitializer(String appPackage, String appName, String aliasMode)
+    public TapestryAppInitializer(Logger logger, String appPackage, String appName, String
aliasMode)
     {
-        this(new SingleKeySymbolProvider(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM, appPackage),
appName, aliasMode);
+        this(logger, new SingleKeySymbolProvider(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM,
appPackage), appName,
+             aliasMode);
     }
 
     /**
+     * @param logger      logger for output confirmation
      * @param appProvider provides symbols for the application (normally, from the ServletContext
init parameters)
      * @param appName     the name of the application (i.e., the name of the application
servlet)
-     * @param aliasMode   the mode, used by the {@link Alias} service, normally "servlet"
+     * @param aliasMode   the mode, used by the {@link org.apache.tapestry5.services.Alias}
service, normally "servlet"
      */
-    public TapestryAppInitializer(SymbolProvider appProvider, String appName, String aliasMode)
+    public TapestryAppInitializer(Logger logger, SymbolProvider appProvider, String appName,
String aliasMode)
     {
+        this.logger = logger;
         this.appProvider = appProvider;
 
         String appPackage = appProvider.valueForSymbol(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);
@@ -139,26 +149,63 @@
         builder.add(new SyntheticModuleDef(symbolSourceContribution, aliasModeContribution,
appNameContribution));
     }
 
-    public Registry getRegistry()
+    public Registry createRegistry()
     {
         registryCreatedTime = System.currentTimeMillis();
 
-        return builder.build();
-    }
+        registry = builder.build();
 
-    /**
-     * @return the system time (in ms) when the registry has been created successfully.
-     */
-    public long getRegistryCreatedTime()
-    {
-        return registryCreatedTime;
+        return registry;
     }
 
-    /**
-     * @return the time when the initialization was started.
-     */
-    public long getStartTime()
+    public void announceStartup()
     {
-        return startTime;
+        long toFinish = System.currentTimeMillis();
+
+        SymbolSource source = registry.getService("SymbolSource", SymbolSource.class);
+
+        StringBuilder buffer = new StringBuilder("Startup status:\n\n");
+        Formatter f = new Formatter(buffer);
+
+        f.format("Application '%s' (Tapestry version %s).\n\n" +
+                "Startup time: %,d ms to build IoC Registry, %,d ms overall.\n\n" +
+                "Startup services status:\n",
+                 appName,
+                 source.valueForSymbol(SymbolConstants.TAPESTRY_VERSION),
+                 registryCreatedTime - startTime, toFinish - startTime);
+
+        int unrealized = 0;
+
+        ServiceActivityScoreboard scoreboard = registry
+                .getService(ServiceActivityScoreboard.class);
+
+        List<ServiceActivity> serviceActivity = scoreboard.getServiceActivity();
+
+        int longest = 0;
+
+        // One pass to find the longest name, and to count the unrealized services.
+
+        for (ServiceActivity activity : serviceActivity)
+        {
+            Status status = activity.getStatus();
+
+            longest = Math.max(longest, activity.getServiceId().length());
+
+            if (status == Status.DEFINED || status == Status.VIRTUAL) unrealized++;
+        }
+
+        String formatString = "%" + longest + "s: %s\n";
+
+        // A second pass to output all the services
+
+        for (ServiceActivity activity : serviceActivity)
+        {
+            f.format(formatString, activity.getServiceId(), activity.getStatus().name());
+        }
+
+        f.format("\n%4.2f%% unrealized services (%d/%d)\n", 100. * unrealized / serviceActivity.size(),
unrealized,
+                 serviceActivity.size());
+
+        logger.info(buffer.toString());
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/PageTester.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/PageTester.java?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/PageTester.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/PageTester.java
Wed Jan 28 22:27:16 2009
@@ -31,6 +31,8 @@
 import org.apache.tapestry5.ioc.util.StrategyRegistry;
 import org.apache.tapestry5.services.ApplicationGlobals;
 import org.apache.tapestry5.services.ContextPathEncoder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.Locale;
 import java.util.Map;
@@ -43,6 +45,8 @@
  */
 public class PageTester implements ComponentInvoker
 {
+    private final Logger logger = LoggerFactory.getLogger(PageTester.class);
+
     private final Registry registry;
 
     private final ComponentInvocationMap invocationMap;
@@ -89,13 +93,14 @@
 
         SymbolProvider provider = new SingleKeySymbolProvider(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM,
appPackage);
 
-        TapestryAppInitializer initializer = new TapestryAppInitializer(provider, appName,
PageTesterModule.TEST_MODE);
+        TapestryAppInitializer initializer = new TapestryAppInitializer(logger, provider,
appName,
+                                                                        PageTesterModule.TEST_MODE);
 
         initializer.addModules(PageTesterModule.class);
         initializer.addModules(moduleClasses);
         initializer.addModules(provideExtraModuleDefs());
 
-        registry = initializer.getRegistry();
+        registry = initializer.createRegistry();
 
         request = registry.getObject(TestableRequest.class, null);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/TapestryAppInitializerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/TapestryAppInitializerTest.java?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/TapestryAppInitializerTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/TapestryAppInitializerTest.java
Wed Jan 28 22:27:16 2009
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007 The Apache Software Foundation
+// Copyright 2006, 2007, 2008 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@
     @Test
     public void testLoadAppModule()
     {
-        Registry registry = new TapestryAppInitializer("org.apache.tapestry5.integration.app0",
-                                                       "foo", "").getRegistry();
+        Registry registry = new TapestryAppInitializer(null, "org.apache.tapestry5.integration.app0",
+                                                       "foo", "").createRegistry();
 
         Transformer<String> s1 = registry.getService("Service1", Transformer.class);
         assertEquals(s1.transform("a"), "A");
@@ -38,7 +38,7 @@
     {
         // Apparently just checking to see that it doesn't fail.
 
-        new TapestryAppInitializer("non_existing.package", "foo", "").getRegistry();
+        new TapestryAppInitializer(null, "non_existing.package", "foo", "").createRegistry();
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/pom.xml Wed Jan 28 22:27:16 2009
@@ -64,7 +64,7 @@
             <artifactId>testng</artifactId>
             <!-- Looks like if you override scope, you have to provide version (and classifier)
as well.
    Or perhaps this has something to do with classifier. -->
-            <version>5.1</version>
+            <version>${testng-version}</version>
             <classifier>jdk15</classifier>
             <scope>provided</scope>
         </dependency>

Modified: tapestry/tapestry5/trunk/tapestry-test/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/pom.xml?rev=738649&r1=738648&r2=738649&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-test/pom.xml Wed Jan 28 22:27:16 2009
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
-            <version>5.7</version>
+            <version>${testng-version}</version>
             <classifier>jdk15</classifier>
             <scope>compile</scope>
         </dependency>



Mime
View raw message