我在其他计算机上导入了我的工作项目,因此它开始下载依赖项.
显然在此期间我的互联网连接崩溃了.现在我得到:
为漫画构建错误; org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目漫画上执行目标测试:无法解析项目漫画的依赖项测试:漫画测试:war:0.0.1-SNAPSHOT:无法解析以下工件:org.springframework:spring- context:jar:3.0.5.RELEASE,org.hibernate:hibernate-entitymanager:jar:3.6.0.Final,org.hibernate:hibernate-core:jar:3.6.0.Final,org.hibernate:hibernate-commons-注释:jar:3.2.0.Final,org.aspectj:aspectjweaver:jar:1.6.8,commons-lang:commons-lang:jar:2.5,
mysql:mysql-connector-java:jar:5.1.13:无法传输org.springframework:来自http://repo1.maven.org/maven2的 spring-context:jar:3.0.5.RELEASE 缓存在本地存储库中,在中心的更新间隔过去或强制更新之前,不会重新尝试解析.
原始错误:无法传输工件org.springframework:spring-context:jar:3.0.5.RELEASE from central(http://repo1.maven.org/maven2):60000后没有收到回复
我不知道如何强制maven更新?
我正在尝试使用Maven(m2eclipse)设置项目,但我在Eclipse中遇到此错误:
说明资源路径位置类型无法计算构建计划:无法传输org.apache.maven.plugins:来自http://repo1.maven.org/maven2的 maven-compiler-plugin:pom:2.0.2 已缓存在本地存储库,在中心的更新间隔过去或强制更新之前,不会重新尝试解析.原始错误:无法传输工件org.apache.maven.plugins:maven-compiler-plugin:pom:2.0.2 from/to central(http://repo1.maven.org/maven2):在60000 ExampleProject之后没有收到响应未知的Maven问题
有任何想法吗?如果你能告诉我如何检查一切是否配置好会有所帮助...
我想分享我通过代理使用maven的经验.
您很可能会遇到异常和消息,例如:
repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect
要么
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean- plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5
如何配置Maven使用代理服务器?
这应该是我朋友的一个工作项目.他在我面前展示了项目,然后我复制了项目,将其作为现有的maven项目导入(我使用的是m2eclipse插件).
然后,发生此错误.每次我尝试使用maven构建内容时都可以重现此错误.
执行mvn依赖:tree,dependency:list或通常的构建包将导致相同的错误.
从eclipse运行'package'构建的错误是:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Jackpot Portal Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for javax.servlet:com.springsource.javax.servlet:jar:2.5.0 is missing, no dependency information available
[WARNING] The POM for javax.servlet:com.springsource.javax.servlet.jsp.jstl:jar:1.2.0 is missing, no dependency information available
[WARNING] The POM for javax.transaction:com.springsource.javax.transaction:jar:1.1.0 is missing, no dependency information available
[WARNING] The POM for org.slf4j:com.springsource.slf4j.log4j:jar:1.5.6 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.963s
[INFO] Finished at: Tue Jan 11 …Run Code Online (Sandbox Code Playgroud) spring-boot:run当项目的父POM由于其子项而使用打包模式POM时,是否可以使用Spring Boots Maven插件命令?
我有一个带有"主"POM的多模块maven项目,它是Spring Boot Parent模块的子项.看起来像这样:
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.0.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>com.example.module1.Application</start-class>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
这基本上是我们的"主人"POM,每个孩子都使用它作为它的父母.现在我们spring-boot:run要从这个"主"POM所在的工作目录中执行命令.问题是,这会生成一个ClassNotFoundException奇数,因为module1(此类Application所在的位置)包含在POM中并作为模块提及.
使用单个模块maven项目,<packaging>jar</packaging>这将编译并运行Application类,因此Spring-Boot不是在这里工作.
spring-boot-maven-plugin在处理多模块Maven项目时,我需要更改什么才能使其工作或者根本无法使用插件?
旁注:我的应用程序类/模块1将其他模块作为依赖项,因此在回答问题时请记住这一点.任何关于如何改进这一点的建议都非常感谢.
我在我的pom.xml的第一行中遇到错误
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.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 org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org
Run Code Online (Sandbox Code Playgroud) 我的项目有结构
pom.xml (parent)
tcp/pom.xml
spark/pom.xml
Run Code Online (Sandbox Code Playgroud)
模块 xmls 都包含此简介
<parent>
<groupId>org.myorg</groupId>
<artifactId>parent</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
Run Code Online (Sandbox Code Playgroud)
我也试着留下relativePath空白,或者../或者..甚至不包括它在所有。在所有情况下,结果是:
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]
[ERROR] The project org.myorg:tcpclient:1.0.0 (/git/MYorg/tcp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.myorg:tcpclient:1.0.0:
Failure to find org.myorg:parent:pom:1.0 in https://repository.apache.org/content/repositories/snapshots was cached in
the local repository, resolution will not be reattempted until
the update interval of Maven snapshots repository has elapsed or updates
are forced and 'parent.relativePath' …Run Code Online (Sandbox Code Playgroud) 当我尝试构建我的项目并包含Neo4j-rest-graphdb依赖项时,构建失败.我尝试了几个不同的版本,结果相同.
我在我的依赖项中包含了org.neo4j.
我真正想做的就是使用我的java代码轻松访问图形本地数据库.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphDatabaseConnector 0.1
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.neo4j:neo4j-rest-graphdb:jar:2.0.0-SNAPSHOT is missing
, no dependency information available
[WARNING] The POM for org.neo4j:neo4j:jar:2.0.0-SNAPSHOT is missing, no dependen
cy information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.375s
[INFO] Finished at: Sun Nov 24 22:56:58 CET 2013
[INFO] Final Memory: 4M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project GraphDatabaseConnector: Could not reso
lve dependencies for …Run Code Online (Sandbox Code Playgroud) 在为项目做 mvn clean package 时,我遇到以下错误并且不明白错误的原因:
[ERROR] Failed to execute goal on project dbimport: Could not resolve dependencies for project
baag.betl:dbimport:jar:1.13-SNAPSHOT: Failure to find org.codehaus.groovy:groovy-all:jar:2.5.6 was cached in the local repository,
resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
下面是我的 pom.xml 的一部分
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.5.6</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我在我的 Java 项目中使用 Intellij。