• <dd id="3gzlp"></dd>

    <li id="3gzlp"><acronym id="3gzlp"></acronym></li>

    <span id="3gzlp"></span>

    maven部署私服jar后,無法正常拉取使用

    采菇涼的小毛菇 發布于 06/11 17:02
    閱讀 233
    收藏 0

    面對海量數據,你能否從容應對?>>>

    這是一個多模塊項目,父級pom已經部署到私服,jar包也可以正常部署

    但是在正常引入該jar的pom的時候

    依賴顯示有時候顯示正常,有時候報紅

    在idea里面可以正常代碼提示

    但是一旦碼進去就會報錯

     

    加載中
    0
    采菇涼的小毛菇
    采菇涼的小毛菇

    問題解決了,因為我上傳的包依賴了 spring-boot-parent 所以打包的時候自動帶上tomcat,spring-web等等,是一個執行jar,并不是工具類.把spring-boot-parent去掉就好了

    0
    Aruforce
    Aruforce

    發setting.xml 上來看 尤其是mirrors 那段的配置 

    0
    采菇涼的小毛菇
    采菇涼的小毛菇
    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <localRepository>G:\localRepository</localRepository>
        <servers> <!--   <server>       <id>public</id>       <username>admin</username>       <password>admin123</password>
         </server> -->  <!-- <server>       <id>Ali_Respository</id>       <username>admin</username>       <password>admin123</password>     </server>  <server>       <id>central</id>       <username>admin</username>       <password>admin123</password>     </server> -->
            <server>
                <id>releases</id>
                <username>admin</username>
                <password>admin123</password>
            </server>
            <server>
                <id>snapshots</id>
                <username>admin</username>
                <password>admin123</password>
            </server>
        </servers>
        <mirrors>
            <mirror>
                <id>public</id>
                <mirrorOf>central</mirrorOf>
                <url>http://192.168.0.1:9002/nexus/content/groups/public/</url>
            </mirror>  <!-- 阿?里里云倉庫 --> <!--   <mirror>   <id>Ali_Respository</id>   <mirrorOf>central</mirrorOf>   <url>https://maven.aliyun.com/nexus/content/groups/public/</url>  </mirror> -->  <!-- 中央倉庫 --> <!--   <mirror>   <id>central</id>   <mirrorOf>central</mirrorOf>   <url>https://repo1.maven.org/maven2/</url>  </mirror> -->  <!-- 曠?日 releases 倉庫 --> <!--   <mirror>   <id>releases</id>   <mirrorOf>central</mirrorOf>
    <url>http://192.168.0.1:9002/nexus/content/repositories/releases </url>  </mirror> -->  <!-- 曠?日 snapshots 倉庫 --> <!--   <mirror>   <id>snapshots</id>   <mirrorOf>central</mirrorOf>   <url>http://192.168.0.1:9002/nexus/content/repositories/snapshots</url>  </mirror> -->
        </mirrors>
    
        <profiles>
            <profile>
                <id>kuangri</id>
                <repositories>
                    <repository>
                        <id>Ali_Respository</id>
                        <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>central</id>
                        <url>https://repo1.maven.org/maven2/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>releases</id>
                        <url>http://192.168.0.1:9002/nexus/content/repositories/releases</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                    <repository>
                        <id>snapshots</id>
                        <url>http://192.168.0.1:9002/nexus/content/repositories/snapshots</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>Ali_Respository</id>
                        <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>releases</id>
                        <url>http://192.168.0.1:9002/nexus/content/repositories/releases</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                    <pluginRepository>
                        <id>snapshots</id>
                        <url>http://192.168.0.1:9002/nexus/content/repositories/snapshots</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
    
        </profiles>
        <!--   <activeProfiles>    <activeProfile>nexus</activeProfile>  </activeProfiles> -->
    </settings>

    @ Aruforce

     

    Aruforce
    Aruforce
    回復 @Aruforce : 還有 IDEA maven setting 也用這個
    Aruforce
    Aruforce
    <activeProfiles> 這個里面 把 kuangri 這個加上
    0
    B
    Bingou211
    Idea爆紅說明是idea的問題,別把鍋摔給私服
    0
    草帽007
    草帽007

    感覺像是你那個插件沒有定義版本號

    0
    b
    bigbatcn

    這個問題我也碰到過,主要原因是jar下載不完整造成的,把jar刪除重新x'zai

    返回頂部
    頂部
    聚看影院