Author: sgoeschl Date: Mon Oct 10 06:29:26 2005 New Revision: 312642 URL: http://svn.apache.org/viewcvs?rev=312642&view=rev Log: +) synchronizing with my CVS repo +) upgrading to groovy-all-1.0-jsr-03.jar
Modified: jakarta/turbine/fulcrum/trunk/groovy/project.xml jakarta/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java jakarta/turbine/fulcrum/trunk/groovy/src/test/org/apache/fulcrum/groovy/GroovyServiceTest.java jakarta/turbine/fulcrum/trunk/groovy/xdocs/changes.xml jakarta/turbine/fulcrum/trunk/groovy/xdocs/configuration.xml Modified: jakarta/turbine/fulcrum/trunk/groovy/project.xml URL: http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/groovy/project.xml?rev=312642&r1=312641&r2=312642&view=diff ============================================================================== --- jakarta/turbine/fulcrum/trunk/groovy/project.xml (original) +++ jakarta/turbine/fulcrum/trunk/groovy/project.xml Mon Oct 10 06:29:26 2005 @@ -22,7 +22,7 @@ <dependency> <groupId>groovy</groupId> <artifactId>groovy-all</artifactId> - <version>1.0-beta-9</version> + <version>1.0-jsr-03</version> </dependency> <!-- Needed only for testing --> Modified: jakarta/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java URL: http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java?rev=312642&r1=312641&r2=312642&view=diff ============================================================================== --- jakarta/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java (original) +++ jakarta/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java Mon Oct 10 06:29:26 2005 @@ -52,10 +52,10 @@ Contextualizable, Disposable, Serviceable, Reconfigurable { /** use precompiled and cached Groovy scripts */ - public final String CONFIG_USECACHE = "useCache"; + public final static String CONFIG_USECACHE = "useCache"; /** the resource domain to look up Groovy scripts */ - public final String CONFIG_DOMAIN = "domain"; + public final static String CONFIG_DOMAIN = "domain"; /** maps from a script name to a script */ private GroovyScriptCache scriptCache; @@ -64,7 +64,7 @@ private boolean useCache; /** maximumline lengthfor dumping arguments */ - private final int MAX_LINE_LENGTH = 1000; + private final static int MAX_LINE_LENGTH = 1000; /** the resource domain to look up Groovy scripts */ private String domain; @@ -85,6 +85,15 @@ } /** + * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) + */ + public void service(ServiceManager serviceManager) throws ServiceException + { + super.service( serviceManager ); + this.getServiceManager().lookup( ResourceManagerService.class.getName() ); + } + + /** * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration cfg) throws ConfigurationException @@ -93,7 +102,7 @@ // do we cache the Groovy scripts to improve performance ? - this.useCache = cfg.getAttributeAsBoolean(CONFIG_USECACHE); + this.useCache = cfg.getAttributeAsBoolean(CONFIG_USECACHE,true); // get the domain for the Groovy Scrips @@ -101,15 +110,6 @@ } /** - * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) - */ - public void service(ServiceManager serviceManager) throws ServiceException - { - super.service( serviceManager ); - this.getServiceManager().lookup( ResourceManagerService.class.getName() ); - } - - /** * @see org.apache.avalon.framework.activity.Initializable#initialize() */ public void initialize() throws Exception @@ -122,8 +122,9 @@ */ public void reconfigure(Configuration cfg) throws ConfigurationException { - super.reconfigure(cfg); + super.reconfigure(cfg); this.scriptCache.clear(); + this.configure(cfg); } /** @@ -239,10 +240,15 @@ */ public boolean exists(String scriptName) { - return this.getResourceManagerService().exists( - this.getDomain(), - scriptName - ); + if( this.getResourceManagerService().exists(this.getDomain()) && + this.getResourceManagerService().exists(this.getDomain(), scriptName) ) + { + return true; + } + else + { + return false; + } } /** @@ -459,12 +465,6 @@ catch (CompilationFailedException e) { String msg = "Compilation failed : " + scriptName; - this.getLogger().error( msg, e ); - throw e; - } - catch (IOException e) - { - String msg = "Parsing the script failed : " + scriptName; this.getLogger().error( msg, e ); throw e; } Modified: jakarta/turbine/fulcrum/trunk/groovy/src/test/org/apache/fulcrum/groovy/GroovyServiceTest.java URL: http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/groovy/src/test/org/apache/fulcrum/groovy/GroovyServiceTest.java?rev=312642&r1=312641&r2=312642&view=diff ============================================================================== --- jakarta/turbine/fulcrum/trunk/groovy/src/test/org/apache/fulcrum/groovy/GroovyServiceTest.java (original) +++ jakarta/turbine/fulcrum/trunk/groovy/src/test/org/apache/fulcrum/groovy/GroovyServiceTest.java Mon Oct 10 06:29:26 2005 @@ -256,7 +256,7 @@ try { // compile a invalid Groovy script - this.getService().compile( "test", "tryz{} caught[]" ); + this.getService().compile( "test", "import foo.*." ); fail( "This script shouldn't compile" ); } catch (CompilationFailedException e) Modified: jakarta/turbine/fulcrum/trunk/groovy/xdocs/changes.xml URL: http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/groovy/xdocs/changes.xml?rev=312642&r1=312641&r2=312642&view=diff ============================================================================== --- jakarta/turbine/fulcrum/trunk/groovy/xdocs/changes.xml (original) +++ jakarta/turbine/fulcrum/trunk/groovy/xdocs/changes.xml Mon Oct 10 06:29:26 2005 @@ -8,6 +8,9 @@ <body> <release version="1.0.1-dev" date="in SVN"> <action dev="goeschsi" type="fix"> + Upgrading from groovy-all-1.0-beta9 to groovy-all-1.0-jsr-03 + </action> + <action dev="goeschsi" type="fix"> Using the newest fulcrum-resourcemanager-service </action> </release> Modified: jakarta/turbine/fulcrum/trunk/groovy/xdocs/configuration.xml URL: http://svn.apache.org/viewcvs/jakarta/turbine/fulcrum/trunk/groovy/xdocs/configuration.xml?rev=312642&r1=312641&r2=312642&view=diff ============================================================================== --- jakarta/turbine/fulcrum/trunk/groovy/xdocs/configuration.xml (original) +++ jakarta/turbine/fulcrum/trunk/groovy/xdocs/configuration.xml Mon Oct 10 06:29:26 2005 @@ -37,7 +37,7 @@ <source> <![CDATA[ <ResourceManagerService> - <domain name="groovy" type="file"> + <domain name="groovy" type="org.apache.fulcrum.resourcemanager.impl.FileResourceManager"> <suffix>groovy</suffix> <location>./src/test/scripts</location> <useLocator>true</useLocator> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]