Maven 添加了“-windows”下载快照工件时的工件名称
我已将一堆工件添加到我的本地 Nexus Maven 存储库中。
当我构建项目时,出现以下错误:
[INFO] 扫描项目...
[信息] ---------------------------------------------------------- --------------------------
[信息] 构建 pronto-web Java EE 6 Web 应用程序
[信息]任务段:[验证]
[信息] ---------------------------------------------------------- --------------------------
[信息] [资源:资源{执行:默认资源}]
[警告] 使用平台编码(实际上是 Cp1252)来复制过滤的资源,即构建依赖于平台!
[INFO] 复制 4 个资源
[信息] [编译器:编译{执行:默认编译}]
[警告] 文件编码尚未设置,使用平台编码 Cp1252,即构建依赖于平台!
[INFO] 将 1 个源文件编译到 C:\Source\Pronto\pronto\pronto-web\target\classes
[信息] [antrun:run {执行:remove-javax}]
[INFO] 执行任务
[INFO] 执行的任务
[信息] [gwt:编译 {执行:默认}]
[信息] 使用项目依赖项中的 GWT jar:20100714-SNAPSHOT
[警告] 您不应将 gwt-dev 声明为项目依赖项。这可能会引入复杂的依赖冲突
下载:http://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[信息] ---------------------------------------------------------- --------------------------
[错误] 构建错误
[信息] ---------------------------------------------------------- --------------------------
[信息] 未找到工件 - 无法在存储库中找到资源尝试从项目网站手动下载文件。
然后,使用以下命令安装它:
mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-dev -Dversion=20100714-20100715.053026-1 -Dclassifier=windows -Dpackaging=jar -Dfile=/path/to/file或者,如果您托管自己的存储库,则可以在那里部署文件:
mvn部署:部署文件-DgroupId = com.google.gwt -DartifactId = gwt-dev>-Dversion = 20100714-20100715.053026-1 -Dclassifier = windows -Dpackaging = jar -Dfile = /路径/到/文件 -Durl = [url] -DrepositoryId=[id]com.google.gwt:gwt-dev:jar:20100714-20100715.053026-1
来自指定的远程存储库:
版本 (http://mercury:8980/nexus/content/groups/public) ,
全部 (http://mercury:8980/nexus/content/groups/all) ,
快照 (http://mercury:8980/nexus/content/groups/public-snapshots< /a>)http://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[信息] ---------------------------------------------------------- --------------------------
[INFO] 有关更多信息,请使用 -e 开关运行 Maven
[信息] ---------------------------------------------------------- ----------------------------------
[INFO] 总时间:8秒
[信息] 完成时间:2010 年欧洲夏令时间 7 月 15 日星期四 08:57:29
[INFO]最终内存:50M/614M
[信息] ---------------------------------------------------------- --------------------------
有谁知道为什么 maven 认为应该在工件名称中添加“-windows”? (下载:http://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar)
如果我浏览存储库,它包含工件,但没有“-windows”后缀。
这个工件的旧版本是平台相关的,并且有“windows”或“linux”或“mac”作为分类器,但最近的版本是独立于平台的,我的 poms 中没有任何这样的分类器。
附: 我在每个 URL 的协议和冒号之间添加了一个空格,因为我还没有获得足够的声誉来发布链接。
I have added a bunch of artifacts to my local Nexus Maven repository.
When I build my project I get the following error:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building pronto-web Java EE 6 Webapp
[INFO] task-segment: [verify]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Source\Pronto\pronto\pronto-web\target\classes
[INFO] [antrun:run {execution: remove-javax}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [gwt:compile {execution: default}]
[INFO] using GWT jars from project dependencies : 20100714-SNAPSHOT
[WARNING] You should not declare gwt-dev as a project dependency. This may introduce complex dependency conflicts
Downloading: http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] artifact not found - Unable to locate resource in repositoryTry downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-dev -Dversion=20100714-20100715.053026-1 -Dclassifier=windows -Dpackaging=jar -Dfile=/path/to/fileAlternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-dev >-Dversion=20100714-20100715.053026-1 -Dclassifier=windows -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]com.google.gwt:gwt-dev:jar:20100714-20100715.053026-1
from the specified remote repositories:
releases (http://mercury:8980/nexus/content/groups/public),
all (http://mercury:8980/nexus/content/groups/all),
snapshots (http://mercury:8980/nexus/content/groups/public-snapshots)http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
[INFO] Finished at: Thu Jul 15 08:57:29 CEST 2010
[INFO] Final Memory: 50M/614M
[INFO] ------------------------------------------------------------------------
Has anyone an idea why maven thinks there should be '-windows' added to the artifact name?
(Downloading: http ://mercury:8980/nexus/content/groups/public-snapshots/com/google/gwt/gwt-dev/20100714-SNAPSHOT/gwt-dev-20100714-20100715.053026-1-windows.jar)
If I browse the repository it contains the artifact but without the '-windows' suffix.
Older versions of this artifact were platform dependent and had 'windows' or 'linux' or 'mac' as classifier but recent versions are platform independent and I don't have any such classifier in my poms.
PS:
I added a space in each URL between the protocol and the colon because I didn't yet receive enough reputation to post links.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
必须在某处声明以下依赖项,很可能作为传递依赖项:
如果工件不再依赖于平台,我怀疑这是一个错误的 pom。
您可以使用任何更新的快照吗?
The following dependency must be declared somewhere, very likely as a transitive dependency:
I suspect a bad pom if artifacts are not platform dependent anymore.
Is there any more recent snapshot you can use?