关于maven的问题 mvn package时出现的错误

问题描述

[root@localhost storm-starter-master]# mvn -f m2-pom.xml package[INFO] Scanning for projects...Downloading: http://repo.maven.apache.org/maven2/com/theoryinpractise/clojure-maven-plugin/1.3.8/clojure-maven-plugin-1.3.8.pom[ERROR] The build could not read 1 project -> [Help 1][ERROR] [ERROR] The project storm.starter:storm-starter:0.0.1-SNAPSHOT (/home/lmy/storm-starter-master/m2-pom.xml) has 1 error[ERROR] Unresolveable build extension: Plugin com.theoryinpractise:clojure-maven-plugin:1.3.8 or one of its dependencies could not be resolved: Failed to collect dependencies for com.theoryinpractise:clojure-maven-plugin:jar:1.3.8 (): Failed to read artifact descriptor for com.theoryinpractise:clojure-maven-plugin:jar:1.3.8: Could not transfer artifact com.theoryinpractise:clojure-maven-plugin:pom:1.3.8 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [Help 2][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 问题补充:附 pom.xml文件<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>storm.starter</groupId><artifactId>storm-starter</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging><name>storm-starter</name><url>https://github.com/nathanmarz/storm-starter</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><repositories><repository><id>github-releases</id><url>http://oss.sonatype.org/content/repositories/github-releases/</url></repository><repository><id>clojars.org</id><url>http://clojars.org/repo</url></repository> <repository> <id>repo.maven.apache.org</id> <url>http://repo.maven.apache.org/maven2</url> </repository> <repository> <id>twitter4j</id> <url>http://twitter4j.org/maven2</url> </repository></repositories><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>3.8.1</version><scope>test</scope></dependency><dependency><groupId>storm</groupId><artifactId>storm</artifactId><version>0.8.1</version><!-- keep storm out of the jar-with-dependencies --><scope>provided</scope></dependency><dependency><groupId>org.twitter4j</groupId><artifactId>twitter4j-core</artifactId><version>[2.2,)</version></dependency><dependency><groupId>org.twitter4j</groupId><artifactId>twitter4j-stream</artifactId><version>[2.2,)</version></dependency><dependency><groupId>com.googlecode.json-simple</groupId><artifactId>json-simple</artifactId><version>1.1</version></dependency></dependencies><build><sourceDirectory>src/jvm</sourceDirectory><resources><resource><directory>${basedir}/multilang</directory></resource></resources><plugins> <!-- bind the maven-assembly-plugin to the package phase this will create a jar file without the storm dependencies suitable for deployment to a cluster. --><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><archive><manifest><mainClass></mainClass></manifest></archive></configuration><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin> <plugin> <groupId>com.theoryinpractise</groupId> <artifactId>clojure-maven-plugin</artifactId> <version>1.3.8</version> <extensions>true</extensions> <configuration> <sourceDirectories> <sourceDirectory>src/clj</sourceDirectory> </sourceDirectories> </configuration> <executions> <execution> <id>compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> </execution> <execution> <id>test</id> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin></plugins></build></project>

解决方案

引用由于Storm-starter使用twitter4j这个仓库来下载twitter4j-core这两个包,而twitter4j已经被伟大的长城盾了。参考:http://www.cnblogs.com/zeutrap/archive/2012/10/11/2720528.html
解决方案二:
maven clean package 或者执行时加上 -X 可以看到详细的错误信息
解决方案三:
有时候下载到一半断了就可能出现这种问题,一般都是删包重来

时间: 2024-08-29 09:20:30

关于maven的问题 mvn package时出现的错误的相关文章

maven 2-maven正确地配置了path,但是使用mvn -v时提示不是系统命令

问题描述 maven正确地配置了path,但是使用mvn -v时提示不是系统命令 M2_HOME=D:programapache-maven-3.3.3 path=...;%M2_HOME%bin; 这是为啥呢. 解决方案 还要配置jdk的环境变量

jetty maven运行时 出现503错误 打不开页面 但是后台显示jetty容器正常

问题描述 jetty maven运行时 出现503错误 打不开页面 但是后台显示jetty容器正常 jetty maven运行时 出现503错误 打不开页面 但是后台显示jetty容器正常

使用maven进行 spring mvc项目管理时出错

问题描述 使用maven进行 spring mvc项目管理时出错 初学maven和spring,昨天跟着教程自己搭建了一个javaweb,然后配置了spring和maven,在pom.xml进行spring依赖的时候,发现myeclipse报了很多错误刚开始是以为没有对spring进行配置的缘故,后来在对spirng进行配置之后刷新工程错误依然存在. log4jlog4j1.2.17compile junitjunit3.8.1test org.springframeworkspring-con

maven实践-通过mvn命令执行java

原文:http://ronghantao.blog.163.com/blog/static/18629326520119104235244/ maven实践-通过mvn命令执行java   2011-10-10 16:33:04|  分类: 持续集成 |  标签:maven学习   |字号 订阅 mvn exec命令可以执行项目中的main函数. 首先需要编译java工程:mvn compile 不存在参数的情况下:mvn exec:java -Dexec.mainClass="***.Main

pom xml-创建maven项目时pom.xml时出现如下错误 求解

问题描述 创建maven项目时pom.xml时出现如下错误 求解

db2 导入-db2导入时报SQL3319N 创建表时发生 SQL 错误 &amp;amp;quot;-286&amp;amp;quot;

问题描述 db2导入时报SQL3319N 创建表时发生 SQL 错误 "-286" E:kelanzjnsWebSitezjbank1227>db2move zjnsWeb import Application code page not determined, using ANSI codepage 1386 ***** DB2MOVE ***** Action: IMPORT Start time: Thu Aug 29 17:29:29 2013 Connecting to

使用u盘时弹出错误提示0x80070570解决方法

  使用u盘时弹出错误提示0x80070570解决方法来啦~相信很多朋友在使用U盘都遇到了错误提示0x80070570,遇到这情况该怎么解决呢?下文小编就为大家带来使用u盘时弹出错误提示0x80070570的解决方法,一起去了解下吧. 使用u盘时弹出错误提示0x80070570解决方法: 1.先检查u盘是否能够正常被电脑识别到,如果可以识别到那么再确认u盘中的文件数据是否重要,如果不重要,那么重新格式化u盘即可解决问题; 2.如果u盘中有重要文件时那么再尝试使用下面的操作解决问题: ①.将鼠标移

Win8安装软件时提示0×80004005错误怎么办

  如何解决Win8安装软件时提示0×80004005错误 我们在使用电脑过程中,有时候需要安装一些软件,不过在安装软件的过程中,有遇到出现一些问题,比如"错误代码0×80004005"的问题.刚升级到Win8系统的用户,在安装软件的时候提示"0×80004005错误"的问题.遇到这样的问题怎么解决?下面就和大家说一下如何解决Win8安装软件时提示0×80004005错误的问题. 具体方法如下: 1.依次单击"开始"."运行"

error-android 运行时出现的错误

问题描述 android 运行时出现的错误 我选择logcat里面的error,运行程序时出现以下错误,这是什么呢?看不懂呀.运行多次后出现Unable to instantiate application android.app.Application: java.lang.NullPointerException.而我在另一个文件夹下载的项目做了一样的修改,运行起来一点儿问题也么,我搞不懂了. 每次出现的问题05-16 09:40:07.532 7253-7253/? E/MtpServic