Maven and Eclipse problem - looking for resources

后端 未结 6 951
灰色年华
灰色年华 2020-12-18 12:15

I have a problem, that maven is looking for resources inside of Eclipse installation folder.

It is saying:

This file was not found: file:/C:/eclipse/         


        
6条回答
  •  失恋的感觉
    2020-12-18 12:18

    Can we also see your web.xml? With spring, the applicationContext.xml location is defined in the web.xml with something like:

    
        contextConfigLocation
        ...
    
    

    (EDIT: I know compiling with maven won't care about the web.xml... but running jUnit tests it could - depending on how the tests are set up.)

    EDIT 2: Switching from a linux environment to a windows environment I could see problems with specifying where things live. Just because it runs under one environment doesn't mean there won't be problems when switching to another. What if your linux dev decided to tell spring the applicationContext.xml lives at /usr/local/myide/myproject/src...? Windows would just choke.

提交回复
热议问题