[exo-jcr-commits] exo-jcr SVN: r2783 - jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jul 14 04:49:42 EDT 2010


Author: aparfonov
Date: 2010-07-14 04:49:41 -0400 (Wed, 14 Jul 2010)
New Revision: 2783

Modified:
   jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
Log:
EXOJCR-482

Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java	2010-07-14 08:17:47 UTC (rev 2782)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java	2010-07-14 08:49:41 UTC (rev 2783)
@@ -373,6 +373,24 @@
       // Add script from configuration files to JCR.
       addScripts();
 
+      if (addRepoPlugins != null && addRepoPlugins.size() > 0)
+      {
+         try
+         {
+            Set<URL> repos = new HashSet<URL>();
+            for (GroovyScriptAddRepoPlugin pl : addRepoPlugins)
+            {
+               repos.addAll(pl.getRepositories());
+            }
+            this.groovyPublisher.getGroovyClassLoader().setResourceLoader(
+               new JcrGroovyResourceLoader(repos.toArray(new URL[repos.size()])));
+         }
+         catch (MalformedURLException e)
+         {
+            LOG.error("Unable add groovy script repository. ", e);
+         }
+      }
+
       if (observationListenerConfiguration != null)
       {
          try
@@ -417,24 +435,6 @@
          }
       }
 
-      if (addRepoPlugins != null && addRepoPlugins.size() > 0)
-      {
-         try
-         {
-            Set<URL> repos = new HashSet<URL>();
-            for (GroovyScriptAddRepoPlugin pl : addRepoPlugins)
-            {
-               repos.addAll(pl.getRepositories());
-            }
-            this.groovyPublisher.getGroovyClassLoader().setResourceLoader(
-               new JcrGroovyResourceLoader(repos.toArray(new URL[repos.size()])));
-         }
-         catch (MalformedURLException e)
-         {
-            LOG.error("Unable add groovy script repository. ", e);
-         }
-      }
-
       // Finally bind this object as RESTful service.
       // NOTE this service does not implement ResourceContainer, as usually
       // done for this type of services. It can't be binded in common way cause



More information about the exo-jcr-commits mailing list