maven改升级了,什么版本?据说2.3以后就没这个问题了。

解决方案 »

  1.   

    版本是:apache-maven-2.2.1
    好的,先升级再试下啦,谢谢!
      

  2.   

    试试在确保Java代码和编译都没有问题的前提下,利用projec->clean->cleanAll清理,然后在尝试下。试试升级maven版本
      

  3.   

    http://maven.apache.org/download.cgi
    maven 2.2.1以上版本都是3以上的了,下了个3.1.1的,再走又报错了。[INFO] Scanning for projects...
    [WARNING] 
    [WARNING] Some problems were encountered while building the effective model for cn.com.etianan.ebusiness:online:war:0.0.2-SNAPSHOT
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:basicBizInfo:jar -> duplicate declaration of version (?) @ line 197, column 15
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:claimService:jar -> duplicate declaration of version (?) @ line 250, column 15
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:productDirectory:jar -> duplicate declaration of version (?) @ line 254, column 15
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:permission:jar -> duplicate declaration of version (?) @ line 279, column 15
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:payment:jar -> duplicate declaration of version (?) @ line 287, column 15
    [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.mortbay.jetty:maven-jetty-plugin @ line 360, column 12
    [WARNING] 
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING] 
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING] 
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building online 0.0.2-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    [INFO] Downloading: http://maven-beabuild-plugin.googlecode.com/svn/maven2/releases/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    [INFO] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:10.535s
    [INFO] Finished at: Tue Dec 31 11:21:09 GMT+08:00 2013
    [INFO] Final Memory: 2M/4M
    [INFO] ------------------------------------------------------------------------
    [ERROR] 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: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to nexus (http://localhost:8081/nexus/content/groups/public): Connection to http://localhost:8081 refused: Connection refused: connect -> [Help 1]
    [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/PluginResolutionException
      

  4.   

    groupId:artifactId:type:classifier)' must be unique 不唯一,所以操作下面的错了。
      

  5.   

    在本机搭建一个nexus库,意义不大。nexus就相当于maven的私服。在本机用没特别大的意义。不如直接下载文件到本地简单。
      

  6.   

    我本地没有搭建nexus库,代码都是迁移过来的,文件都已经下载到m2.\repository下啦,目前暂时是想在本地运行起来,之后再搭建测试服务器的。
    对maven不熟悉啊,不知道为啥还好出现
    http://localhost:8081/nexus/content/groups/public): Connection to http://localhost:8081 refused: Connection refused.
      

  7.   

    pom文件内容里有没有
    <repositories> 
           <repository> 
               <id>nexus</id> 
               <name>local private nexus</name> 
               <url>http://localhost:8081/nexus/content/groups/public</url> 
           </repository> 
         </repositories> 这些东西?
      

  8.   

    你是指什么的源代码呢?我所跑项目的、还是maven的?
      

  9.   

    eclipse搜索没有搜到,不知在哪配了呀!
    跟settings.xml有关吗?
      

  10.   

    有pox.xml,是没有搜索到“http://localhost:8081/nexus/content/groups/public”
    这个路径地址。我感觉是在pox.xml配置的,但没有搜索到。不过有<repository>
    <id>nexus</id>
    <name>Team Nexus Repository</name>
    <url>http://10.0.12.37:9081/nexus/content/groups/public</url>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    </repository>
    等配置
    但都已经注释了。
      

  11.   

    “groupId:artifactId:type:classifier”这个是什么呀?没看懂!
      

  12.   

    你是指什么的源代码呢?我所跑项目的、还是maven的?

    [ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[73,45] 找不到符号这个部分看,GeOrderAction.java这个文件的73行45字符无法识别。以前,我的项目合并了别人的代码,一部分gbk一部分utf8编码,用maven的时候就会报这个错。 <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>上面是pom里面指定源代码字符集的地方还有base64那个最好换一个实现,jdk里就用,不用sun的包的,apache-commons也有,都很简单。
      

  13.   

    你是指什么的源代码呢?我所跑项目的、还是maven的?

    [ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[73,45] 找不到符号这个部分看,GeOrderAction.java这个文件的73行45字符无法识别。以前,我的项目合并了别人的代码,一部分gbk一部分utf8编码,用maven的时候就会报这个错。 <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>上面是pom里面指定源代码字符集的地方还有base64那个最好换一个实现,jdk里就用,不用sun的包的,apache-commons也有,都很简单。好的,谢谢,现在的问题已经不是这个了,升级maven之后!