title: running groovy script and classes through maven
body: <p>I searched for possible cause and solution, but still don't understand what am I doing wrong
  i try to run groovy script from maven my pom.xml is:</p>
  
  <pre><code>    `&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                                                      http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;org.sonatype.mcookbook&lt;/groupId&gt;
  &lt;artifactId&gt;groovy-script-ex&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;groovy-script-ex&lt;/name&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
          &lt;artifactId&gt;maven-model&lt;/artifactId&gt;
          &lt;version&gt;2.2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
          &lt;artifactId&gt;groovy-bsf&lt;/artifactId&gt;
          &lt;version&gt;2.4.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
          &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
          &lt;!-- any version of Groovy \&gt;= 1.5.0 should work here --&gt;
          &lt;version&gt;2.4.12&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.12.3&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failIfNoTests&gt;false&lt;/failIfNoTests&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*test*.*&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.gmaven&lt;/groupId&gt;
              &lt;artifactId&gt;gmaven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.5&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                          &lt;goal&gt;testCompile&lt;/goal&gt;
                          &lt;goal&gt;execute&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;${pom.basedir}/src/Cagri_groovy/testfirst.groovy&lt;/source&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>'</p>
  
  <p>when i run build job i get</p>
  
  <pre><code>[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (default) on project groovy-script-ex: startup failed, script1511249885612.groovy: 1: expecting EOF, found 'TESTLERİ' @ line 1, column 41.
  [ERROR] 1 error
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>my groovy script is testfirst.groovy</p>
  
  <p>`</p>
  
  <pre><code>package Cagri_groovy;
      import Cagri_groovy.Application
      import Cagri_groovy.firstgclass
  
  
      def object=new firstgclass()
      object.openBrowser()
      object.setUserName("abc")
      object.setPassword("123456")
      object.Login(object.UserName,object.Password)
      object.Sayfa_Acma("test.jsf")
      Application.open_connection()
      object.Simulator()
      Application.close_connection()`
  </code></pre>
  
  <p>my build job name is groovy TESTLERİ hen i changed it to test i receive
  my build job name is groovy testleri i changed build job name to test now i receive </p>
  
  <pre><code>[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (default) on project groovy-script-ex: Execution default of goal org.codehaus.gmaven:gmaven-plugin:1.5:execute failed: An API incompatibility was encountered while executing org.codehaus.gmaven:gmaven-plugin:1.5:execute: java.lang.NoSuchMethodError: org.codehaus.groovy.ast.ModuleNode.getStarImports()Ljava/util/List;
  [ERROR] -----------------------------------------------------
  [ERROR] realm =    plugin&gt;org.codehaus.gmaven:gmaven-plugin:1.5
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/gmaven-plugin/1.5/gmaven-plugin-1.5.jar
  [ERROR] urls[1] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-api/1.5/gmaven-runtime-api-1.5.jar
  [ERROR] urls[2] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/feature/gmaven-feature-api/1.5/gmaven-feature-api-1.5.jar
  [ERROR] urls[3] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-loader/1.5/gmaven-runtime-loader-1.5.jar
  [ERROR] urls[4] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/feature/gmaven-feature-support/1.5/gmaven-feature-support-1.5.jar
  [ERROR] urls[5] = file:/var/jenkins_home/.m2/repository/org/codehaus/gmaven/runtime/gmaven-runtime-support/1.5/gmaven-runtime-support-1.5.jar
  [ERROR] urls[6] = file:/var/jenkins_home/.m2/repository/org/sonatype/gshell/gshell-io/2.4/gshell-io-2.4.jar
  [ERROR] urls[7] = file:/var/jenkins_home/.m2/repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
  [ERROR] urls[8] = file:/var/jenkins_home/.m2/repository/com/thoughtworks/qdox/qdox/1.12/qdox-1.12.jar
  [ERROR] urls[9] = file:/var/jenkins_home/.m2/repository/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.jar
  [ERROR] urls[10] = file:/var/jenkins_home/.m2/repository/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
  [ERROR] urls[11] = file:/var/jenkins_home/.m2/repository/org/apache/xbean/xbean-reflect/3.4/xbean-reflect-3.4.jar
  [ERROR] urls[12] = file:/var/jenkins_home/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar
  [ERROR] urls[13] = file:/var/jenkins_home/.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar
  [ERROR] urls[14] = file:/var/jenkins_home/.m2/repository/com/google/collections/google-collections/1.0/google-collections-1.0.jar
  [ERROR] urls[15] = file:/var/jenkins_home/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0.4.1/maven-reporting-impl-2.0.4.1.jar
  [ERROR] urls[16] = file:/var/jenkins_home/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolation-1.1.jar
  [ERROR] urls[17] = file:/var/jenkins_home/.m2/repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
  [ERROR] urls[18] = file:/var/jenkins_home/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
  [ERROR] urls[19] = file:/var/jenkins_home/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
  [ERROR] urls[20] = file:/var/jenkins_home/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
  [ERROR] urls[21] = file:/var/jenkins_home/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
  [ERROR] urls[22] = file:/var/jenkins_home/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
  [ERROR] urls[23] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-core/1.0-alpha-10/doxia-core-1.0-alpha-10.jar
  [ERROR] urls[24] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-10/doxia-sink-api-1.0-alpha-10.jar
  [ERROR] urls[25] = file:/var/jenkins_home/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.4/maven-reporting-api-2.0.4.jar
  [ERROR] urls[26] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-10/doxia-site-renderer-1.0-alpha-10.jar
  [ERROR] urls[27] = file:/var/jenkins_home/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
  [ERROR] urls[28] = file:/var/jenkins_home/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
  [ERROR] urls[29] = file:/var/jenkins_home/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
  [ERROR] urls[30] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-10/doxia-decoration-model-1.0-alpha-10.jar
  [ERROR] urls[31] = file:/var/jenkins_home/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
  [ERROR] urls[32] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.0-alpha-10/doxia-module-apt-1.0-alpha-10.jar
  [ERROR] urls[33] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.0-alpha-10/doxia-module-fml-1.0-alpha-10.jar
  [ERROR] urls[34] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.0-alpha-10/doxia-module-xdoc-1.0-alpha-10.jar
  [ERROR] urls[35] = file:/var/jenkins_home/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.0-alpha-10/doxia-module-xhtml-1.0-alpha-10.jar
  [ERROR] urls[36] = file:/var/jenkins_home/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
  [ERROR] urls[37] = file:/var/jenkins_home/.m2/repository/org/slf4j/slf4j-api/1.5.10/slf4j-api-1.5.10.jar
  [ERROR] urls[38] = file:/var/jenkins_home/.m2/repository/org/sonatype/gossip/gossip/1.2/gossip-1.2.jar
  [ERROR] Number of foreign imports: 1
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  [ERROR] 
  [ERROR] -----------------------------------------------------
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [JENKINS] Archiving /var/jenkins_home/workspace/test/pom.xml to org.sonatype.mcookbook/groovy-script-ex/1.0-SNAPSHOT/groovy-script-ex-1.0-SNAPSHOT.pom
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
  </code></pre>
  
  <p>my groovy file and pom files are in svn. 
  i try to change path in xml file but not working. it always gives error is there way to correct this problem?
  thanks for your help</p>