0

嗨,我是 maven java 的新手。我想在 Eclipse Juno 中创建一个 Maven 项目,但是通过在 Eclipse 中保存更改会出现此错误:我的项目类似于:example

- Archive for required library: 'C:/Users/Iman/.m2/repository/org/geoserver/main/2.2/main-2.2.jar' in project 'hello' cannot be read or is not a valid ZIP file
- ArtifactTransferException: Failure to transfer it.geosolutions.imageio-ext:imageio-ext streams:jar:1.1.4 from http://download.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced. Original error: Could not transfer artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from/to maven2 repository.dev.java.net (http://download.java.net/maven/2): The operation was cancelled.
- ArtifactTransferException: Failure to transfer it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from http:// maven.geo-solutions.it/ was cached in the local repository, resolution will not be reattempted until the update interval of geosolutions has elapsed or updates are forced. Original error: Could not transfer artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from/to geosolutions (http://maven.geo-solutions.it/): The operation was cancelled.
- ArtifactTransferException: Failure to transfer org.jaitools:jt vectorbinarize:jar:1.2.0 from http://maven.restlet.org was cached in the local repository, resolution will not be reattempted until the update interval of maven-restlet has elapsed or updates are forced. Original error: Could not transfer artifact org.jaitools:jt-vectorbinarize:jar:1.2.0 from/to maven-restlet (http://maven.restlet.org): The operation was cancelled.
- Missing artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4
- ArtifactTransferException: Failure to transfer org.jaitools:jt-vectorbinarize:jar:1.2.0 from http://download.osgeo.org/webdav/geotools/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has  elapsed or updates are forced. Original error: Could not transfer artifact org.jaitools:jt-vectorbinarize:jar:1.2.0 from/to osgeo (http://download.osgeo.org/webdav/geotools/): The operation was cancelled.
- ArtifactTransferException: Failure to transfer org.jaitools:jt-vectorbinarize:jar:1.2.0 from http://download.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of maven2-repository.dev.java.net has elapsed or updates are forced. Original error: Could not transfer artifact org.jaitools:jt-vectorbinarize:jar:1.2.0 from/to maven2 repository.dev.java.net (http://download.java.net/maven/2): The operation was cancelled.
- ArtifactTransferException: Failure to transfer org.jaitools:jt vectorbinarize:jar:1.2.0 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.jaitools:jt-vectorbinarize:jar:1.2.0 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.
- ArtifactTransferException: Failure to transfer it.geosolutions.imageioext:imageio-ext-streams:jar:1.1.4 from http://maven.restlet.org was cached in the local repository, resolution will not be reattempted until the update interval of maven-restlet has elapsed or updates are forced. Original error: Could not transfer artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from/to maven-restlet (http://maven.restlet.org): The operation was cancelled.
- ArtifactTransferException: Failure to transfer org.jaitools:jtvectorbinarize:jar:1.2.0 from http://maven.geo-solutions.it/ was cached in the local repository, resolution will not be reattempted until the update interval of geosolutions has elapsed or updates ar forced. Original error: Could not transfer artifact org.jaitools:jt-vectorbinarize:jar:1.2.0 from/to geosolutions (http://maven.geosolutions.it/): The operation was cancelled.
- ArtifactTransferException: Failure to transfer it.geosolutions.imageioext:imageio-ext-streams:jar:1.1.4 from http://download.osgeo.org/webdav/geotools/ was cached in the local repository, resolution will not be reattempted until the update interval of osgeo has elapsed or updates are forced. Original error: Could not transfer artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from/to osgeo (http://download.osgeo.org/webdav/geotools/): The operation was cancelled.
- Missing artifact org.jaitools:jt-vectorbinarize:jar:1.2.0
- ArtifactTransferException: Failure to transfer it.geosolutions.imageioext:imageio-ext-streams:jar:1.1.4 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.4 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.
4

1 回答 1

0

m2eclipse 正在使用 .m2/settings.xml 中指定的代理,但如果重新定义原型,它会忽略 nonProxyHosts。

如果所有新工件都出现这样的连接错误:m2eclipse 默认使用嵌入式 Maven 实例,而不是您的外部 Maven 安装。内部 Maven 实例可能不会使用与外部设置相同的 Maven 设置(例如 %USERPROFILE%/.m2/settings.xml),这可能会导致内部 Maven 实例无法通过您的代理进行连接。

您可以使用 Eclipse 首选项来添加您的外部 Maven 安装,并让它用于从 Eclipse 内部运行 Maven 命令。

尝试关闭您的 m2e 插件。

于 2013-06-20T21:57:28.770 回答