导入maven项目后的问题

问题描述

导入了5个maven项目实际上是一个项目中的不同层,用maven编译dubbo的服务会有如下报错,找了半天没找到解决方法,求坛子里的大神相助了。Failedtoexecutegoalonprojectjtd-service-dubbo:Missing:----------1)cc.chengpai.jtd:jtd-service-api:jar:1.0-SNAPSHOTTrydownloadingthefilemanuallyfromtheprojectwebsite.Then,installitusingthecommand:mvninstall:install-file-DgroupId=cc.chengpai.jtd-DartifactId=jtd-service-api-Dversion=1.0-SNAPSHOT-Dpackaging=jar-Dfile=/path/to/fileAlternatively,ifyouhostyourownrepositoryyoucandeploythefilethere:mvndeploy:deploy-file-DgroupId=cc.chengpai.jtd-DartifactId=jtd-service-api-Dversion=1.0-SNAPSHOT-Dpackaging=jar-Dfile=/path/to/file-Durl=[url]-DrepositoryId=[id]Pathtodependency:1)cc.chengpai.jtd:jtd-service-dubbo:pom:pom:1.0-SNAPSHOT2)cc.chengpai.jtd:jtd-service-api:jar:1.0-SNAPSHOT----------1requiredartifactismissing.forartifact:cc.chengpai.jtd:jtd-service-dubbo:pom:1.0-SNAPSHOTfromthespecifiedremoterepositories:opensesame.releases(http://code.alibabatech.com/mvn/releases,releases=true,snapshots=false),central(http://repo1.maven.org/maven2,releases=true,snapshots=false)->[Help1][ERROR][ERROR]Toseethefullstacktraceoftheerrors,re-runMavenwiththe-eswitch.[ERROR]Re-runMavenusingthe-Xswitchtoenablefulldebuglogging.[ERROR][ERROR]Formoreinformationabouttheerrorsandpossiblesolutions,pleasereadthefollowingarticles:[ERROR][Help1]http://cwiki.apache.org/confluence/display/MAVEN/MultipleArtifactsNotFoundExceptionjtd-service-dubbo中pom.xml文件的内容是:<?xmlversion="1.0"?><projectxsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd"xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><modelVersion>4.0.0</modelVersion><parent><groupId>cc.chengpai.jtd</groupId><artifactId>jtd-parent</artifactId><version>1.0</version></parent><artifactId>jtd-service-dubbo</artifactId><packaging>jar</packaging><version>${modules.version}</version><name>jtd-DubboService</name><description>-</description><build><pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><executions><execution><id>copy</id><phase>package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/lib</outputDirectory></configuration></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>2.4</version><configuration><archive><manifest><addClasspath>true</addClasspath><classpathPrefix>lib/</classpathPrefix><mainClass>com.alibaba.dubbo.container.Main</mainClass></manifest></archive></configuration></plugin><plugin><groupId>org.codehaus.mojo</groupId><artifactId>exec-maven-plugin</artifactId><version>1.1.1</version><executions><execution><phase>test</phase><goals><goal>java</goal></goals><configuration><mainClass>com.alibaba.dubbo.container.Main</mainClass><arguments><argument>arg0</argument><argument>arg1</argument></arguments></configuration></execution></executions></plugin></plugins></pluginManagement><defaultGoal>compile</defaultGoal></build><dependencies><!--spring--><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-beans</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-core</artifactId><version>${spring.security.version}</version></dependency><dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-web</artifactId><version>${spring.security.version}</version></dependency><dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-config</artifactId><version>${spring.security.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-orm</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.aspectj</groupId><artifactId>aspectjweaver</artifactId><version>1.6.8</version></dependency><dependency><groupId>javax.mail</groupId><artifactId>mail</artifactId><version>1.4.7</version></dependency><dependency><groupId>org.apache.velocity</groupId><artifactId>velocity</artifactId><version>1.7</version></dependency><dependency><groupId>cc.chengpai.jtd</groupId><artifactId>jtd-service-api</artifactId><version>${project.version}</version></dependency><dependency><groupId>com.caucho</groupId><artifactId>hessian</artifactId><version>4.0.7</version></dependency><dependency><groupId>javax.servlet</groupId><artifactId>servlet-api</artifactId><version>2.5</version></dependency><dependency><groupId>org.mortbay.jetty</groupId><artifactId>jetty</artifactId><version>6.1.26</version></dependency><!--slf4j--><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.6.6</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>1.0.13</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>1.0.13</version></dependency><!--mysql--><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.10</version></dependency><dependency><groupId>c3p0</groupId><artifactId>c3p0</artifactId><version>0.9.1.2</version></dependency><dependency><groupId>cglib</groupId><artifactId>cglib</artifactId><version>2.2.2</version></dependency><dependency><groupId>commons-codec</groupId><artifactId>commons-codec</artifactId><version>1.2</version></dependency><dependency><groupId>commons-httpclient</groupId><artifactId>commons-httpclient</artifactId><version>3.1</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>dubbo</artifactId><version>${dubbo.version}</version><exclusions><exclusion><artifactId>spring</artifactId><groupId>org.springframework</groupId></exclusion></exclusions></dependency><dependency><groupId>com.github.sgroschupf</groupId><artifactId>zkclient</artifactId><version>0.1</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId><version>1.7.5</version></dependency></dependencies><repositories><repository><id>opensesame.releases</id><url>http://code.alibabatech.com/mvn/releases</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></repository></repositories></project>

解决方案

本帖最后由 qq_15247769 于 2014-12-07 14:16:14 编辑
解决方案二:
是不是只能运行其中一个工程呢?即运行单个工程是可以的,但是多个工程一起运行就报错呢?
解决方案三:
不是的。每个不同的项目有不同分工的,我只是编译其中一个就会有这样的报错,还没有到都开起来
解决方案四:
上面不是提示少依赖吗
解决方案五:
mavencleanmaveninstall
解决方案六:
maven报错?你先按照步骤来吧把以前额清空了mevanclean

时间: 2024-07-28 12:28:30

导入maven项目后的问题的相关文章

idea+maven导入web项目后,tomcat无报错,无日志输出,启动失败,求大神!

问题描述 idea+maven导入web项目后,tomcat无报错,无日志输出,启动失败,求大神! 模块之间的依赖关系可以从这个pom中看出来 把这三个子模块的编译结果都输出到platform的webappWEB-INFclasses,所依赖的jar包通过Maven也输出到webappWEB-INFlib, 然后tomcate 这样配置的 然后启动tomcate 无报错 无log 直接停止,真的太诡异了! 大神们,帮帮忙!太感谢了!!! 解决方案 用IDEA启动非maven管理的web项目 解决

eclipse导入maven项目出错,找不到原因,具体情况如下

问题描述 eclipse导入maven项目出错,找不到原因,具体情况如下 解决方案 检查一下项目用的jdk和你自己安装的jdk 解决方案二: 你的报错,是根目录,具体找不到,应该是maven下载jar后,根没有更新,重启eclipse,应该就没有了 解决方案三: 在输出控制台旁边有个Markers,在这里面看提示的什么问题.

图片-从svn向eclipse中导入maven项目

问题描述 从svn向eclipse中导入maven项目 在import ->check out maven projects from scm-> 没有svn的选项 应该怎么做呢 之后??? 解决方案 eclipse 怎么从svn 导入maven项目......答案就在这里:eclipse导入svn上的maven项目 解决方案二: http://m.blog.csdn.net/blog/eastsea/39643785

eclipse 如何从svn 导入maven项目

使用eclipse 如何从svn服务器导入maven项目呢? 步骤如下: 1,点击菜单中的"File",点击"Import",如下图所示:   2,点击"Import",弹出如下对话框,下面是错误的:   3,应该选择"Maven"下面的"Check out Maven Projects from SCM",如下图所示:  

myeclipse svn导入maven项目启动时报下面错误,求大神回答

问题描述 myeclipse svn导入maven项目启动时报下面错误,求大神回答 17:23:40 WARN [main] XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean w

java maven-eclipse导入maven项目 乱码

问题描述 eclipse导入maven项目 乱码 如题.eclipse导入maven项目.代码里的中文都乱码了.怎么破?还能改过来吗?类似于:contains("瀵嗙爜涓嶆?纭?))

eclipse-Eclipse 导入Maven 项目第一次没作为Maven项目导入,删了之后第二次就可以了

问题描述 Eclipse 导入Maven 项目第一次没作为Maven项目导入,删了之后第二次就可以了 虽然并不影响使用,但是还是想知道这是为什么? 解决方案 http://blog.csdn.net/yangshh0/article/details/8715858 解决方案二: 导入maven项目Maven项目导入EclipseMaven项目在编译及导入Eclipse时出现的错误汇总处理

eclipse导入maven项目怎么无法拷贝到工作空间

问题描述 比如一个已经存在的maven项目在D:maven-project,eclipse的工作空间在E:eclipseworkspace,我通过eclipse导入一个已经存在的maven项目(没有提供拷贝到工作空间的选中框),点击完成后,发现工作空间中没有该项目,怎么能将该工程直接导入到工作空间中呢? 解决方案 解决方案二:把整个项目先拷贝到E:eclipseworkspace,导入的时候选择这个目录解决方案三:引用1楼sj1231984的回复: 把整个项目先拷贝到E:eclipseworks

eclipse导入-maven项目导入到Eclipse中红色叹号!

问题描述 maven项目导入到Eclipse中红色叹号! 最近看一个开源CMS系统Magnolia.环境:Ubuntu14,Eclipse4.4 for j2ee,jdk1.6,tomcat6,maven2.2.1 按照文档,写了一个小项目.用maven.在命令行创建的项目结构大概: myProject----myProject-webapp----myTemplateModule下面两个是上面的module. 在命令行中已经clean install成功.但是导入到Eclipse中myProj