title: How to run spock test from command line?
body: <p>I have checked this link:</p>
  
  <p><a href="https://gist.github.com/ysb33r/5825457" rel="nofollow noreferrer">https://gist.github.com/ysb33r/5825457</a></p>
  
  <p>It seems like that it can be run like this:</p>
  
  <pre><code>groovyc *.groovy
  
  java -cp ~/.grapes/org.spockframework/spock-core/jars/spock-core-0.7-groovy-2.0.jar:$GROOVY_HOME/embeddable/groovy-all-2.1.4.jar:$GROOVY_HOME/lib/junit-4.11.jar:$GROOVY_HOME/lib/hamcrest-core-1.3.jar:.org.junit.runner.JUnitCore ExampleSpec
  </code></pre>
  
  <p>And I have added all third part jars to CLASSPATH,so all imports from these libs found.But all my own classes can't be found,and error message like this:</p>
  
  <pre><code>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  LoginTest.groovy: 11: unable to resolve class com.vsi.icareos.client.home.HomePage
  @ line 11, column 1.
  import com.vsi.icareos.client.home.HomePage
  ^
  
  LoginTest.groovy: 22: unable to resolve class LoginByPwdPage 
  @ line 22, column 2.
  LoginByPwdPage loginPage
  ^
  
  LoginTest.groovy: 35: unable to resolve class LoginByPwdPage 
       @ line 35, column 13.
         loginPage=new LoginByPwdPage(browser,Consts.PAGE_ID)
            ^
  3 errors
  </code></pre>
  
  <p>I guess that the option like:--sourcepath is needed,but I found this command option deprecated,so How to slove this problem?</p>