CAS 5.x搭建常見問題系列(3).Failure to find org.apereo.cas:cas-server-support-pm-jdbc:jar:5.1.9


錯誤內容


 

cas overlay的pom.xml增加了cas-server-support-pm-jdbc.jary依賴后,

打包(mvn package)出現如下的報錯

D:\casoverlay\cas-overlay-template>mvn package [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building cas-overlay 1.0 [INFO] ------------------------------------------------------------------------ Downloading: http://oss.sonatype.org/content/repositories/releases/org/apereo/cas/cas-server-support-pm-jdbc/5.1.9/cas-s
erver-support-pm-jdbc-5.1.9.pom Downloading: https://build.shibboleth.net/nexus/content/repositories/releases/org/apereo/cas/cas-server-support-pm-jdbc/
5.1.9/cas-server-support-pm-jdbc-5.1.9.pom Downloading: https://repo.spring.io/milestone/org/apereo/cas/cas-server-support-pm-jdbc/5.1.9/cas-server-support-pm-jdbc
-5.1.9.pom Downloading: http://maven.aliyun.com/nexus/content/repositories/central/org/apereo/cas/cas-server-support-pm-jdbc/5.1.9/
cas-server-support-pm-jdbc-5.1.9.pom [WARNING] The POM for org.apereo.cas:cas-server-support-pm-jdbc:jar:5.1.9 is missing, no dependency information availabl e [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18.015 s [INFO] Finished at: 2018-07-03T20:47:09+08:00 [INFO] Final Memory: 23M/294M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project cas-overlay: Could not resolve dependencies for project org.apereo.cas:cas-ove rlay:war:1.0: Failure to find org.apereo.cas:cas-server-support-pm-jdbc:jar:5.1.9 in http://oss.sonatype.org/content/rep
ositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced -> [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/DependencyResolutionException

 

錯誤原因


 

這個可能是cas 5.1.9的一個bug,后台服務器竟然沒有cas-server-support-pm-jdbc:jar的5.1.9版本造成的。

解決方法也很簡單,使用cas的當前最新版本,我在寫本文時最新的穩定版本是5.2.5。

修改pom.xml的版本號

    <properties>
        <cas.version>5.2.5</cas.version>
        <springboot.version>1.5.3.RELEASE</springboot.version>
        <!-- app.server could be -jetty, -undertow, -tomcat, or blank if you plan to provide appserver -->
        <app.server>-tomcat</app.server> 
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

重新打包 mvn package

就OK了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM