|
|
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
Подскажите как правильно собрать Spring MVC Project. Делаю так: Среда разработки - Eclipse. Создаю новый проект -> Spring -> Spring Project -> Spring MVC Project. (шаблон отсюда: URL: http://dist.springsource.com/release/STS/help/org.springframework.templates.mvc-3.2.2.zip) После создания выдает такие ошибки: Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'Spring5'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 Искал в инете решение данной проблемы - нашел такое: If you want to use maven from your local installation instead of the embedded version that comes with m2e, You have to do this Windows ==> Preferences ==> Maven ==> Installations ==> Click Add (select your local maven installation directory) У меня установлен Maven Integration for Eclipse. Также скачал apache-maven-3.2.1, и указал эту директорию в (Windows ==> Preferences ==> Maven ==> Installations ==> Click Add) Это не помогло - ошибки остались те же. Чего еще не хватает проекту? Можно ли собрать так шаблон, чтоб исходники не менять (или почти не менять)? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.04.2014, 12:22 |
|
||
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
wvetal, Попробуйте так: - Создайте Dynamic Web Project - Преобразуйте в Maven Project - Остальное вручную (добавляем dependecies, конфигурируем web.xml и т.п.) ( пример ) wvetalТакже скачал apache-maven-3.2.1Правильно сделали ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.04.2014, 12:32 |
|
||
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
Usmanwvetal, Попробуйте так: - Создайте Dynamic Web Project - Преобразуйте в Maven Project - Остальное вручную (добавляем dependecies, конфигурируем web.xml и т.п.) ( пример ) wvetalТакже скачал apache-maven-3.2.1Правильно сделали Спасибо за пример. Делал по примеру, но запускал на JBoss. Практически все получилось, кроме одного: Первая страница( http://localhost:8080/SampleSpringMaven) открывается, а вторая( http://localhost:8080/SampleSpringMaven/hello.htm) - не работает, и консоль jboss пишет: WARN [org.springframework.web.servlet.PageNotFound] (http-localhost-127.0.0.1-8080-1) No mapping found for HTTP request with URI [/SampleSpringMaven/hello.htm] in DispatcherServlet with name 'mvc-dispatcher' Что нужно подправить? В какую сторону посмотреть? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.04.2014, 16:40 |
|
||
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
wvetalВ какую сторону посмотреть? В web.xml и конфиги\аннотации Spring MVC ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.04.2014, 16:42 |
|
||
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
Все заработало. Решил проблему так: Right click project –> Click properties –> Project facets –> Java then choose version 1.7 (OR whatever version of JDK configured with) –> Click OK Когда поставил версию 1.7 - все заработало. Еще раз спасибо. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.04.2014, 17:07 |
|
||
|
Spring MVC Project
|
|||
|---|---|---|---|
|
#18+
wvetalПодскажите как правильно собрать Spring MVC Project. Делаю так: Среда разработки - Eclipse. Создаю новый проект -> Spring -> Spring Project -> Spring MVC Project. (шаблон отсюда: URL: http://dist.springsource.com/release/STS/help/org.springframework.templates.mvc-3.2.2.zip) После создания выдает ошибки. Может кому-то пригодится. Расскажу в чем была проблема, и решение. Нужно было прописать настройки прокси сервера в двух местах: ..apache-maven-3.2.1/conf/settings.xml ..Documents and Settings/user/.m2/settings.xml Код: xml 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. После этого все заработало. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.04.2014, 11:24 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=38628583&tid=2127262]: |
0ms |
get settings: |
8ms |
get forum list: |
19ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
27ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
58ms |
get tp. blocked users: |
2ms |
| others: | 212ms |
| total: | 347ms |

| 0 / 0 |
