Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1017553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:43:21+00:00 2026-05-16T10:43:21+00:00

i have problem with maven. When i try to compile test classes ( mvn

  • 0

i have problem with maven. When i try to compile test classes (mvn test-compile), it fails to find the tested classes used in test classes. For example class UserTest can’t be compiled because compiler can’t find class User which is being used inside the UserTest class. The problem is most likely in the class path not including target folder during test-compile phase, which is weird because i thought maven does include it.

If anyone had any ideas how to fix this issue, i would be greatful.

The pom.xml file can be found here http://github.com/tomasherman/JBTBackup/blob/master/pom.xml, just like rest of the project.

The maven output is as follows:

[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] ------------------------------------------------------------------------

Thanks for all comments, Tomas Herman

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:43:22+00:00Added an answer on May 16, 2026 at 10:43 am

    You have to move your application classes to src/main/java/… instead of src/main/resources, cause Maven assumes (convention over configuration) that your java classes are located in src/main/java. This means they will never be compiled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problem when I try to run maven on netbeans the netbeans-console
I have a Java background so I’m used to having Maven handle all problem
I have problem developing with live555. I already build the lib-files and example projects
I have a maven project which builds OK locally (windows). When i try to
I'm using a library that uses Maven to compile and test. I was able
I have a problem with my school project. Im using hibernate,jsp and maven for
I have a Tomcat problem, i get this error everytime i try to setup
Here is my problem : i try to run a maven nexus behind an
I have a problem with maven 3 running on Windows7 64 bit. When I
I have a build problem with maven. I wrote a custom checkstyle check for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.