Author: painter
Date: Wed Sep 18 02:09:47 2019
New Revision: 1867085

URL: http://svn.apache.org/viewvc?rev=1867085&view=rev
Log:
Updates in changes.xml - fix build that was previously broken

Added:
    turbine/fulcrum/trunk/groovy/src/changes/
    turbine/fulcrum/trunk/groovy/src/changes/changes.xml
Removed:
    turbine/fulcrum/trunk/groovy/xdocs/changes.xml
Modified:
    turbine/fulcrum/trunk/groovy/pom.xml
    
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyRunnableImpl.java
    
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java

Modified: turbine/fulcrum/trunk/groovy/pom.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/pom.xml?rev=1867085&r1=1867084&r2=1867085&view=diff
==============================================================================
--- turbine/fulcrum/trunk/groovy/pom.xml (original)
+++ turbine/fulcrum/trunk/groovy/pom.xml Wed Sep 18 02:09:47 2019
@@ -15,113 +15,108 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
-    <parent>
-       <artifactId>turbine-parent</artifactId>
-       <groupId>org.apache.turbine</groupId>
-       <version>6</version>
-   </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <groupId>org.apache.fulcrum</groupId>
-    <artifactId>fulcrum-groovy</artifactId>
-    <name>Fulcrum Groovy Component</name>
-    <version>1.0.1-dev</version>
-    
-    <url>http://turbine.apache.org/fulcrum/fulcrum-groovy</url>
-    <scm>
-        
<connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/trunk/groovy/</connection>
-        
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/groovy/</developerConnection>
-        <url>http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/</url>
-    </scm>
-
-    <build>
-        <sourceDirectory>${basedir}/src/java/</sourceDirectory>
-        <testSourceDirectory>${basedir}/src/test/</testSourceDirectory>
-        <testResources>
-            <testResource>
-                <directory>${basedir}/src/test</directory>
-                <includes>
-                    <include>**/*.*</include>
-                </includes>
-            </testResource>
-        </testResources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <includes>
-                        <include>**/*Test.*</include>
-                    </includes>
-                </configuration>
-            </plugin>
-            <plugin>
-              <artifactId>maven-antrun-plugin</artifactId>
-              <version>1.7</version>
-              <executions>
-                <execution>
-                <id>delete-temp-txt</id> <!-- Deleting temporary files -->
-                <phase>clean</phase>
-                <configuration>
-                   <target>
-                     <ant antfile="${basedir}/scripts/delete_temp-scripts.xml" 
target="delete-temp-files">
-                     <property name="delete.path" value="${basedir}/temp"/>
-                     <property name="delete.include" value="*.txt"/>
-                    </ant>
-                  </target>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-                </execution>
-              </executions>
-            </plugin>
-        </plugins>
-    </build>
-  <dependencies>
-
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-lang3</artifactId>
-      <version>3.9</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.fulcrum</groupId>
-      <artifactId>fulcrum-resourcemanager</artifactId>
-      <version>1.0.2-SNAPSHOT</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.codehaus.groovy</groupId>
-      <artifactId>groovy-all</artifactId>
-      <version>2.1.3</version>
-    </dependency>
-
-    <!--  Needed only for testing -->
-    <dependency>
-      <groupId>org.apache.fulcrum</groupId>
-      <artifactId>fulcrum-testcontainer</artifactId>
-      <version>1.0.8</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.fulcrum</groupId>
-      <artifactId>fulcrum-yaafi</artifactId>
-      <version>1.0.8</version>
-      <scope>test</scope>
-    </dependency>    
-    
-     <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>3.8.1</version>
-        <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <properties>
-    <turbine.site.path>fulcrum/fulcrum-groovy</turbine.site.path>
-  </properties>  
-         
-  
+<project
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";
+       xmlns="http://maven.apache.org/POM/4.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+       <parent>
+               <artifactId>turbine-parent</artifactId>
+               <groupId>org.apache.turbine</groupId>
+               <version>6</version>
+       </parent>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.apache.fulcrum</groupId>
+       <artifactId>fulcrum-groovy</artifactId>
+       <name>Fulcrum Groovy Component</name>
+       <version>1.0.1-dev</version>
+
+       <url>http://turbine.apache.org/fulcrum/fulcrum-groovy</url>
+       <scm>
+               
<connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/trunk/groovy/</connection>
+               
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/groovy/</developerConnection>
+               
<url>http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/</url>
+       </scm>
+
+       <build>
+               <sourceDirectory>${basedir}/src/java/</sourceDirectory>
+               <testSourceDirectory>${basedir}/src/test/</testSourceDirectory>
+               <testResources>
+                       <testResource>
+                               <directory>${basedir}/src/test</directory>
+                               <includes>
+                                       <include>**/*.*</include>
+                               </includes>
+                       </testResource>
+               </testResources>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       <includes>
+                                               <include>**/*Test.*</include>
+                                       </includes>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <version>1.7</version>
+                               <executions>
+                                       <execution>
+                                               <id>delete-temp-txt</id> <!-- 
Deleting temporary files -->
+                                               <phase>clean</phase>
+                                               <configuration>
+                                                       <target>
+                                                               <ant 
antfile="${basedir}/scripts/delete_temp-scripts.xml"
+                                                                       
target="delete-temp-files">
+                                                                       
<property name="delete.path" value="${basedir}/temp" />
+                                                                       
<property name="delete.include" value="*.txt" />
+                                                               </ant>
+                                                       </target>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.apache.commons</groupId>
+                       <artifactId>commons-lang3</artifactId>
+                       <version>3.9</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.fulcrum</groupId>
+                       <artifactId>fulcrum-resourcemanager</artifactId>
+                       <version>1.0.2-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                   <groupId>org.codehaus.groovy</groupId>
+                   <artifactId>groovy-all</artifactId>
+                   <version>2.5.8</version>
+                   <type>pom</type>
+               </dependency>
+
+               <!-- Needed only for testing -->
+               <dependency>
+                       <groupId>org.apache.fulcrum</groupId>
+                       <artifactId>fulcrum-testcontainer</artifactId>
+                       <version>1.0.8</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.fulcrum</groupId>
+                       <artifactId>fulcrum-yaafi</artifactId>
+                       <version>1.0.8</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
+
+       <properties>
+               <turbine.site.path>fulcrum/fulcrum-groovy</turbine.site.path>
+       </properties>
+
+
 </project>

Added: turbine/fulcrum/trunk/groovy/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/src/changes/changes.xml?rev=1867085&view=auto
==============================================================================
--- turbine/fulcrum/trunk/groovy/src/changes/changes.xml (added)
+++ turbine/fulcrum/trunk/groovy/src/changes/changes.xml Wed Sep 18 02:09:47 
2019
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<document>
+  <properties>
+    <title>Fulcrum Groovy Service</title>
+    <author email="siegfried.goes...@it20one.at">Siegfried Goeschl</author>
+  </properties>
+
+  <body>
+    <release version="1.0.1-dev" date="in SVN">
+      <action dev="painter" type="update">
+        Upgrading groovy to 2.5.8
+        Fix some build errors after updating testcontainer deps
+        Removed a few FindBug and all PMD errors
+        Update changes.xml location to comply with turbine-parent build
+      </action>
+      <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>
+    <release version="1.0.0" date="in CVS">
+      <action dev="goeschsi" type="add">
+        Initial version
+      </action>
+    </release>
+  </body>
+</document>
+

Modified: 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyRunnableImpl.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyRunnableImpl.java?rev=1867085&r1=1867084&r2=1867085&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyRunnableImpl.java
 (original)
+++ 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyRunnableImpl.java
 Wed Sep 18 02:09:47 2019
@@ -28,109 +28,115 @@ import org.apache.fulcrum.groovy.GroovyS
  *
  * @author <a href="mailto:siegfried.goes...@it20one.at";>Siegfried Goeschl</a>
  */
-public class GroovyRunnableImpl implements GroovyRunnable
-{
-    /** the name of the Groovy script to execute */
-    private String scriptName;
-
-    /** the service manager to locate the GroovyService */
-    private GroovyService groovyScriptExecutor;
-
-    /** the arguments to execute the Groovy script */
-    private Object[] args;
-
-    /** the result of the execution */
-    private Object result;
-
-    /** the execption thrown by the Groovy scipt if any */
-    private Throwable throwable;
-
-    /**
-     * Constructor
-     *
-     * @param scriptName the name of the script to execute
-     * @param groovyScriptExecutor the service to execute the script
-     */
-    public GroovyRunnableImpl(
-        String scriptName,
-        GroovyService groovyScriptExecutor )
-    {
-        Validate.notEmpty( scriptName, "scriptName" );
-        Validate.notNull( groovyScriptExecutor, "groovyScriptExecutor" );
-
-        this.scriptName = scriptName;
-        this.groovyScriptExecutor = groovyScriptExecutor;
-        this.args = new Object[0];
-    }
-
-    /**
-     * @see java.lang.Runnable#run()
-     */
-    public void run()
-    {
-        try
-        {
-            this.result = null;
-            this.throwable = null;
-
-            this.result = this.groovyScriptExecutor.execute(
-                this.getScriptName(),
-                this.getArgs()
-                );
-        }
-        catch (Throwable t)
-        {
-            this.throwable = t;
-        }
-    }
-
-
-    /**
-     * @return Returns the exception.
-     */
-    public Throwable getThrowable()
-    {
-        return this.throwable;
-    }
-
-    /**
-     * @return Returns the result.
-     */
-    public Object getResult()
-    {
-        return result;
-    }
-
-    /**
-     * @return Returns the scriptName.
-     */
-    public String getScriptName()
-    {
-        return scriptName;
-    }
-
-    /**
-     * @param args The args to set.
-     */
-    public void setArgs(Object [] args)
-    {
-        Validate.notNull( args, "args" );
-        this.args = args;
-    }
-
-    /**
-     * @return Returns the args.
-     */
-    public Object [] getArgs()
-    {
-        return args;
-    }
-
-    /**
-     * @return was the execution successful?
-     */
-    public boolean getIsSuccessful()
-    {
-        return( this.getThrowable() == null ? true : false );
-    }
+public class GroovyRunnableImpl implements GroovyRunnable {
+       /** the name of the Groovy script to execute */
+       private String scriptName;
+
+       /** the service manager to locate the GroovyService */
+       private GroovyService groovyScriptExecutor;
+
+       /** the arguments to execute the Groovy script */
+       private Object[] args;
+
+       /** the result of the execution */
+       private Object result;
+
+       /** the execption thrown by the Groovy scipt if any */
+       private Throwable throwable;
+
+       /**
+        * Constructor
+        *
+        * @param scriptName           the name of the script to execute
+        * @param groovyScriptExecutor the service to execute the script
+        */
+       public GroovyRunnableImpl(String scriptName, GroovyService 
groovyScriptExecutor) 
+       {
+               Validate.notEmpty(scriptName, "scriptName");
+               Validate.notNull(groovyScriptExecutor, "groovyScriptExecutor");
+
+               this.scriptName = scriptName;
+               this.groovyScriptExecutor = groovyScriptExecutor;
+               this.args = new Object[0];
+       }
+
+       /**
+        * @see java.lang.Runnable#run()
+        */
+       public void run() 
+       {
+               try 
+               {
+                       this.result = null;
+                       this.throwable = null;
+                       this.result = 
this.groovyScriptExecutor.execute(this.getScriptName(), this.getArgs());
+               } 
+               catch (Throwable t) 
+               {
+                       this.throwable = t;
+               }
+       }
+
+       /**
+        * @return Returns the exception.
+        */
+       public Throwable getThrowable() 
+       {
+               return this.throwable;
+       }
+
+       /**
+        * @return Returns the result.
+        */
+       public Object getResult() 
+       {
+               return result;
+       }
+
+       /**
+        * @return Returns the scriptName.
+        */
+       public String getScriptName() 
+       {
+               return scriptName;
+       }
+
+       /**
+        * @param args The args to set.
+        */
+       public void setArgs(Object[] args) 
+       {
+               Validate.notNull(args, "args");
+               
+               // deep copy to avoid FindBugs
+               int size = args.length;
+               Object[] data = new Object[size];
+               for (int i = 0; i < data.length; i++) 
+               {
+                       data[i] = args[i];
+               }
+               this.args = data;
+       }
+
+       /**
+        * @return Returns the args.
+        */
+       public Object[] getArgs() 
+       {
+               int size = args.length;
+               Object[] data = new Object[size];
+               for (int i = 0; i < data.length; i++) 
+               {
+                       data[i] = args[i];
+               }
+               return data;
+       }
+
+       /**
+        * @return was the execution successful?
+        */
+       public boolean getIsSuccessful() 
+       {
+               return (this.getThrowable() == null ? true : false);
+       }
 }

Modified: 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java?rev=1867085&r1=1867084&r2=1867085&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java
 (original)
+++ 
turbine/fulcrum/trunk/groovy/src/java/org/apache/fulcrum/groovy/impl/GroovyServiceImpl.java
 Wed Sep 18 02:09:47 2019
@@ -19,10 +19,6 @@ package org.apache.fulcrum.groovy.impl;
  * under the License.
  */
 
-import groovy.lang.Binding;
-import groovy.lang.GroovyShell;
-import groovy.lang.Script;
-
 import java.io.IOException;
 
 import org.apache.avalon.framework.activity.Disposable;
@@ -42,6 +38,10 @@ import org.apache.fulcrum.groovy.GroovyS
 import org.apache.fulcrum.resourcemanager.ResourceManagerService;
 import org.codehaus.groovy.control.CompilationFailedException;
 
+import groovy.lang.Binding;
+import groovy.lang.GroovyShell;
+import groovy.lang.Script;
+
 /**
  * Base implementation of the Avalon Groovy Service. Can be subclassed to 
support
  * script repository using the file system or database.
@@ -81,7 +81,6 @@ public class GroovyServiceImpl
     public GroovyServiceImpl()
     {
         super();
-
         this.useCache = true;
         this.domain = "groovy";
     }
@@ -103,11 +102,9 @@ public class GroovyServiceImpl
         super.configure( cfg );
 
         // do we cache the Groovy scripts to improve performance ?
-
         this.useCache = cfg.getAttributeAsBoolean(CONFIG_USECACHE,true);
 
         // get the domain for the Groovy Scrips
-
         this.domain = cfg.getAttribute( CONFIG_DOMAIN, "groovy" );
     }
 
@@ -199,10 +196,8 @@ public class GroovyServiceImpl
         }
 
         // create the binding
-
         Binding binding = this.createBinding( scriptName, args );
 
-
         if( isInCache )
         {
             // take the script from the cache
@@ -215,7 +210,6 @@ public class GroovyServiceImpl
         }
 
         // dump the result for debugging
-
         if( this.getLogger().isDebugEnabled() )
         {
             this.getLogger().debug( this.dumpResult(scriptName,result) );
@@ -230,7 +224,6 @@ public class GroovyServiceImpl
     public GroovyRunnable createGroovyRunnable(String scriptName)
     {
         Validate.notEmpty( scriptName, "scriptName" );
-
         return new GroovyRunnableImpl(
             scriptName,
             this
@@ -314,7 +307,7 @@ public class GroovyServiceImpl
             scriptName
             );
 
-        result = new String( scriptContent );
+        result = new String(scriptContent);
         return result;
     }
 
@@ -344,7 +337,6 @@ public class GroovyServiceImpl
     protected GroovyAvalonContextImpl createGroovyAvalonContext( String 
scriptName )
     {
         GroovyAvalonContextImpl result = null;
-
         result = new GroovyAvalonContextImpl(
             this.getLogger().getChildLogger(scriptName),
             this.getServiceManager(),


Reply via email to