我在从源代码构建 Unicenta 的销售点软件时遇到了很多困难。
- 我在 Windows 上并使用 NetBeans v8.1(我已经尝试过 SE 和 EE,不知道这是否重要)
- Maven 已下载并添加到路径变量中。
- 安装 Jdk 1.8 并创建 JAVA_HOME 变量
- 下载 Unicenta oPos v3.91.3 源代码(来自 Source Forge)并在 NetBeans 中打开项目
- 在项目窗格中右键单击项目,选择“使用依赖项构建”
结果
cd C:\Users\Jakov\Documents\Java projekti\Unicenta oPos 3.91.3; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_74" cmd /c "\"\"C:\\Program Files\\NetBeans 8.1\\java\\maven\\bin\\mvn.bat\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.1\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 install\""
Scanning for projects...
Some problems were encountered while building the effective model for com.unicenta:unicentaopos:jar:3.91.3
'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 346, column 21
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
然后它继续下载各种包:
Downloading: http://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1/commons-logging-1.1.pom
Downloaded: http://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1/commons-logging-1.1.pom (7 KB at 43.1 KB/sec)
Downloading: http://s448089793.websitehome.co.uk/maven2/org/springframework/spring-core/2.0.6/spring-core-2.0.6.pom
此消息显示在几个包上:
Downloading: http://bits.netbeans.org/maven2/org/springframework/spring-core/2.0.6/spring-core-2.0.6.pom
velj 25, 2016 10:17:57 AM org.apache.maven.wagon.providers.http.httpclient.client.protocol.ResponseProcessCookies processCookies
WARNING: Cookie rejected [rememberMe="deleteMe", version:0, domain:bits.netbeans.org, path:/nexus, expiry:Thu Feb 25 10:17:57 CET 2016] Illegal path attribute "/nexus". Path of origin: "/maven2/org/springframework/spring-core/2.0.6/spring-core-2.0.6.pom"
最后:
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 3:10.127s
Finished at: Thu Feb 25 10:20:59 CET 2016
Final Memory: 10M/66M
------------------------------------------------------------------------
Failed to execute goal on project unicentaopos: Could not resolve dependencies for project com.unicenta:unicentaopos:jar:3.91.3: The following artifacts could not be resolved: com.unicenta:pos:jar:1.0, com.handpoint:headstartsimulator:jar:1.1.2, com.handpoint:heft:jar:1.1.0, com.handpoint:hal-pc:jar:1.1.2: Could not find artifact com.unicenta:pos:jar:1.0 in private-repo (http://s448089793.websitehome.co.uk/maven2/) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
<version>
为 maven-jar-plugin 添加标签后,第一个警告得到解决。但我无法弄清楚错误的解决方案。我尝试将 Apache 的 Maven 存储库添加到 POM,但没有帮助。