Здравствуйте.
Нарыл книженцию Хеффельфингера ("Java EE6 + glassfish3") и пытаюсь делать примеры, которые идут вместе с ней.
Скачал maven, задал переменные M2_HOME и M2, добавил в path значение переменной %M2%.
Изменил в %M2_HOME%\conf\setting.xml секцию proxies, т.к. сейчас приходится ходить в инет через прокси:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
-->
<proxy>
<id>1</id>
<active>true</active>
<protocol>http</protocol>
<username>vasyapupkin</username>
<password>vottakoyprostoyparol</password>
<host>192.168.18.109</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
<!-- -->
</proxies>
Дальше иду в каталог с pom.xml первого примера и ввожу:
1.
D:\JAVA\hefbook\ch02\simpleapp>mvn install
Получаю в итоге:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for net.ensode.glassfishbook:simpleapp:war:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 22, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building simpleapp 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.312s
[INFO] Finished at: Wed Feb 19 20:08:03 GMT+04:00 2014
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure
to find org.apache.maven.plugins:maven-resources-plugin:jar:2.6 in http://repo.maven.apache.org/maven2 was cached in the loca
l repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [H
elp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Нарыл на сайте мавена файл maven-resources-plugin-2.6.jar, положил его в %M2_HOME%\lib вместе с остальными jar'ами.
Выполнил далее mvn clean (дабы выполнить апдейт локального кеша) + mvn install - но получаю ту же самую ошибку.
ЧЯДНТ и как её победить ?
PS. На другом компе, без прокси, всё собирается ОК, только стартовое предупреждение "[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 22, column 15" остается. Но пример запустить можно.