缺少依赖项
我突然收到一条错误消息,缺少 3 个依赖项:gwt-user.jar、gwt-dev.jar 和 gxt.jar。所有 jar 都在我的本地存储库中:
dage [~/.m2/repository] $ ls -l com/google/gwt/gwt-user
insgesamt 12
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 14:55 1.5.3
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 11:10 1.6.4
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 16:10 2.0.0
dage [~/.m2/repository] $ ls -l com/google/gwt/gwt-dev/
insgesamt 12
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 14:55 1.5.3
drwxr-xr-x 3 dage Domain Users 4096 2010-01-13 11:02 1.6.4
drwxr-xr-x 2 dage Domain Users 4096 2010-01-15 09:58 2.0.0
dage [~/.m2/repository] $ ls -l com/extjs/gxt/
insgesamt 32
drwxr-xr-x 2 dage Domain Users 4096 2010-01-14 14:29 2.0.1
drwxr-xr-x 2 dage Domain Users 4096 2010-01-21 12:18 2.1.0
-rw-r--r-- 1 dage Domain Users 288 2010-01-21 12:18 maven-metadata-com.extjs.xml
-rw-r--r-- 1 dage Domain Users 40 2010-01-21 12:18 maven-metadata-com.extjs.xml.sha1
-rw-r--r-- 1 dage Domain Users 323 2010-01-21 12:01 maven-metadata-local.xml
-rw-r--r-- 1 dage Domain Users 288 2010-01-21 12:18 maven-metadata.xml
-rw-r--r-- 1 dage Domain Users 32 2010-01-21 12:18 maven-metadata.xml.md5
-rw-r--r-- 1 dage Domain Users 40 2010-01-21 12:18 maven-metadata.xml.sha1
并且 pom 条目是:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>system</scope>
<systemPath>${gwt.home}/gwt-user.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>system</scope>
<systemPath>${gwt.home}/gwt-dev.jar</systemPath>
</dependency>
<!-- Needed for ExtGWT -->
<dependency>
<groupId>com.extjs</groupId>
<artifactId>gxt</artifactId>
<version>${gxt.version}</version>
<scope>provided</scope>
</dependency>
<properties>
<gwt.version>2.0.0</gwt.version>
<gxt.version>2.1.0</gxt.version>
</properties>
我没有进行任何 Maven 更改,并且 pom 也没有更改。我刚刚添加并修改了 java/css/hml 文件。有什么想法,有什么问题吗?
编辑:确切的消息是
Missing:
----------
1) com.google.gwt:gwt-user:jar:2.0.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
.
.
.
我在命令行中构建项目。
i get suddenly an error message, that 3 dependencies are missing: gwt-user.jar, gwt-dev.jar and gxt.jar. All jars are in my local repo:
dage [~/.m2/repository] $ ls -l com/google/gwt/gwt-user
insgesamt 12
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 14:55 1.5.3
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 11:10 1.6.4
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 16:10 2.0.0
dage [~/.m2/repository] $ ls -l com/google/gwt/gwt-dev/
insgesamt 12
drwxr-xr-x 2 dage Domain Users 4096 2010-01-13 14:55 1.5.3
drwxr-xr-x 3 dage Domain Users 4096 2010-01-13 11:02 1.6.4
drwxr-xr-x 2 dage Domain Users 4096 2010-01-15 09:58 2.0.0
dage [~/.m2/repository] $ ls -l com/extjs/gxt/
insgesamt 32
drwxr-xr-x 2 dage Domain Users 4096 2010-01-14 14:29 2.0.1
drwxr-xr-x 2 dage Domain Users 4096 2010-01-21 12:18 2.1.0
-rw-r--r-- 1 dage Domain Users 288 2010-01-21 12:18 maven-metadata-com.extjs.xml
-rw-r--r-- 1 dage Domain Users 40 2010-01-21 12:18 maven-metadata-com.extjs.xml.sha1
-rw-r--r-- 1 dage Domain Users 323 2010-01-21 12:01 maven-metadata-local.xml
-rw-r--r-- 1 dage Domain Users 288 2010-01-21 12:18 maven-metadata.xml
-rw-r--r-- 1 dage Domain Users 32 2010-01-21 12:18 maven-metadata.xml.md5
-rw-r--r-- 1 dage Domain Users 40 2010-01-21 12:18 maven-metadata.xml.sha1
and the pom entry is:
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>system</scope>
<systemPath>${gwt.home}/gwt-user.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>system</scope>
<systemPath>${gwt.home}/gwt-dev.jar</systemPath>
</dependency>
<!-- Needed for ExtGWT -->
<dependency>
<groupId>com.extjs</groupId>
<artifactId>gxt</artifactId>
<version>${gxt.version}</version>
<scope>provided</scope>
</dependency>
<properties>
<gwt.version>2.0.0</gwt.version>
<gxt.version>2.1.0</gxt.version>
</properties>
I don't have made any maven changes and the pom was also not changed. I've just added and modified java/css/hml files. Any ideas, what is wrong?
edit: Exact message is
Missing:
----------
1) com.google.gwt:gwt-user:jar:2.0.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=2.0.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
.
.
.
and I build the project in command line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在哪里?在命令行上?在你的IDE中?如果您的 IDE 中发生这种情况,并且您正在使用 Eclipse 和 m2eclipse 插件,我注意到 Eclipse 有时会在 POM 更改后丢失。在这种情况下,右键单击项目,然后选择Maven >更新项目配置。对我有用。
Where? On the command line? In your IDE? If this is happening in your IDE and if you are using Eclipse and the m2eclipse plugin, I've noticed that Eclipse sometimes gets lost after POM changes. In that case, right click on the project, then select Maven > Update Project Configuration. Works for me.
我无法解释它,但重新启动后又可以工作了......
i can't explain it, but after reboot is working again...