title: Maven doesn't see tested classes
body: <p>i have problem with maven. When i try to compile test classes (<code>mvn test-compile</code>), it fails to find the tested classes used in test classes. For example class <code>UserTest</code> can't be compiled because compiler can't find class <code>User</code> which is being used inside the <code>UserTest</code> class. The problem is most likely in the class path not including target folder during <code>test-compile</code> phase, which is weird because i thought maven does include it.</p>
  
  <p>If anyone had any ideas how to fix this issue, i would be greatful. </p>
  
  <p>The pom.xml file can be found here <a href="http://github.com/tomasherman/JBTBackup/blob/master/pom.xml" rel="nofollow noreferrer">http://github.com/tomasherman/JBTBackup/blob/master/pom.xml</a>, just like rest of the project.</p>
  
  <p>The maven output is as follows:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO] ------------------------------------------------------------------------
  [INFO] Building JBTBackup Maven Webapp
  [INFO]    task-segment: [test-compile]
  [INFO] ------------------------------------------------------------------------
  [INFO] [resources:resources {execution: default-resources}]
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] Copying 3 resources
  [WARNING] While downloading hibernate:hibernate:3.0.5
    This artifact has been relocated to org.hibernate:hibernate:3.0.5.
  
  
  [INFO] [compiler:compile {execution: default-compile}]
  [INFO] No sources to compile
  [INFO] [resources:testResources {execution: default-testResources}]
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory /home/arg/workspace/JBTBackup/src/test/resources
  [INFO] [sql:execute {execution: add-test-data}]
  [INFO] Executing file: /tmp/pre-test-editdb.1278025605sql
  [INFO] 0 of 0 SQL statements executed successfully
  [INFO] [compiler:testCompile {execution: default-testCompile}]
  [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  [INFO] Compiling 2 source files to /home/arg/workspace/JBTBackup/target/test-classes
  [INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[26,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[27,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[28,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[23,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[25,15] cannot find symbol
  symbol  : class BTFile
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[26,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[27,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[28,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[23,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  [ERROR] /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[25,31] cannot find symbol
  symbol  : class BTFile
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  [INFO] 10 errors 
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [ERROR] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Compilation failure
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[26,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[27,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[28,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[23,15] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[25,15] cannot find symbol
  symbol  : class BTFile
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[26,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[27,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/UserTest.java:[28,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.UserTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[23,29] cannot find symbol
  symbol  : class User
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  /home/arg/workspace/JBTBackup/src/test/java/org/tomasherman/JBTBackup/Resource/Entity/BTFileTest.java:[25,31] cannot find symbol
  symbol  : class BTFile
  location: class org.tomasherman.JBTBackup.Resource.Entity.BTFileTest
  
  
  [INFO] ------------------------------------------------------------------------
  [INFO] For more information, run Maven with the -e switch
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3 seconds
  [INFO] Finished at: Thu Aug 26 12:54:37 CEST 2010
  [INFO] Final Memory: 17M/172M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>Thanks for all comments, Tomas Herman</p>