最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

maven deploy時(shí)報(bào)錯(cuò)的解決方法

 更新時(shí)間:2020年09月07日 11:09:05   作者:趕路人兒  
這篇文章主要介紹了maven deploy時(shí)報(bào)錯(cuò)的解決方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

今天在發(fā)布maven工程的時(shí)候,很奇怪,因?yàn)樵诒镜豴ackage,install等等都沒問題,但是打包的時(shí)候就是報(bào)錯(cuò),日志如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project courier-rapi: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project courier-rapi: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
        at org.apache.maven.plugin.deploy.DeployMojo.getDeploymentRepository(DeployMojo.java:235)
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:118)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
[ERROR]

如果對(duì)于maven不太熟悉的同學(xué)會(huì)很苦惱,仔細(xì)看日志我們會(huì)發(fā)現(xiàn)如下的信息:

repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter

意思是在pom文件中缺少distributionManagement標(biāo)簽,或者缺少-DaltDeployementRepositoty,說的是缺少deploy的地址,maven不知道你想要deploy到哪里,在pom文件中增加如下信息,就發(fā)布成功了.

<distributionManagement>
    <repository>
      <id>nexus</id>
      <name>releases</name>
      <url>http://mvn2.qdingnet.com/nexus/content/repositories/releases</url>
      <uniqueVersion>true</uniqueVersion>
    </repository>
    <snapshotRepository>
      <id>nexus</id>
      <name>snapshots</name>
      <url>http://XXXXXXXXXXXXX/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

為了補(bǔ)充知識(shí),下面講解一下關(guān)于distributionManagement及其配置的信息.

用于配置分發(fā)管理,配置相應(yīng)的產(chǎn)品發(fā)布信息,主要用于發(fā)布,在執(zhí)行mvn deploy后表示要發(fā)布的位置,下面時(shí)幾種配置形式.

配置到文件系統(tǒng)

<distributionManagement>
  <repository>
    <id>proficio-repository</id>
    <name>Proficio Repository</name>
    <url>file://${basedir}/target/deploy</url>
  </repository>
</distributionManagement>

使用ssh2配置

<distributionManagement>
  <repository>
    <id>proficio-repository</id>
    <name>Proficio Repository</name>
    <url>scp://sshserver.yourcompany.com/deploy</url>
  </repository>
</distributionManagement>

使用sftp配置

<distributionManagement>
  <repository>
    <id>proficio-repository</id>
    <name>Proficio Repository</name>
    <url>sftp://ftpserver.yourcompany.com/deploy</url>
  </repository>
</distributionManagement>

使用外在的ssh配置

<distributionManagement>
  <repository>
    <id>proficio-repository</id>
    <name>Proficio Repository</name>
    <url>scpexe://sshserver.yourcompany.com/deploy</url>
  </repository>
</distributionManagement>
<build>
  <extensions>
    <extension>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-ssh-external</artifactId>
      <version>1.0-alpha-6</version>
    </extension>
  </extensions>
</build>

使用ftp配置

<distributionManagement>
  <repository>
    <id>proficio-repository</id>
    <name>Proficio Repository</name>
    <url>ftp://ftpserver.yourcompany.com/deploy</url>
  </repository>
</distributionManagement>
<build>
  <extensions>
    <extension>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-ftp</artifactId>
      <version>1.0-alpha-6</version>
    </extension>
  </extensions>
</build>

到此這篇關(guān)于maven deploy時(shí)報(bào)錯(cuò)的解決方法的文章就介紹到這了,更多相關(guān)maven deploy報(bào)錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Java基礎(chǔ)之容器LinkedList

    Java基礎(chǔ)之容器LinkedList

    這篇文章主要介紹了Java基礎(chǔ)之容器LinkedList,文中有非常詳細(xì)的代碼示例,對(duì)正在學(xué)習(xí)java基礎(chǔ)的小伙伴們有非常好的幫助,需要的朋友可以參考下
    2021-04-04
  • IDEA的默認(rèn)快捷鍵設(shè)置與Eclipse的常用快捷鍵的設(shè)置方法

    IDEA的默認(rèn)快捷鍵設(shè)置與Eclipse的常用快捷鍵的設(shè)置方法

    這篇文章主要介紹了IDEA的默認(rèn)快捷鍵設(shè)置與Eclipse的常用快捷鍵的設(shè)置方法,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-01-01
  • JAVA 對(duì)接騰訊云直播的實(shí)現(xiàn)

    JAVA 對(duì)接騰訊云直播的實(shí)現(xiàn)

    這篇文章主要介紹了JAVA 對(duì)接騰訊云直播的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-06-06
  • MyBatis參數(shù)處理實(shí)現(xiàn)方法匯總

    MyBatis參數(shù)處理實(shí)現(xiàn)方法匯總

    這篇文章主要介紹了MyBatis參數(shù)處理實(shí)現(xiàn)方法匯總,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-08-08
  • Spring boot配置 swagger的示例代碼

    Spring boot配置 swagger的示例代碼

    Swagger是一組開源項(xiàng)目,Spring 基于swagger規(guī)范,可以將基于SpringMVC和Spring Boot項(xiàng)目的項(xiàng)目代碼,自動(dòng)生成JSON格式的描述文件,接下來通過本文給大家介紹Spring boot配置 swagger的示例代碼,一起看看吧
    2021-09-09
  • Java SPEL表達(dá)式注入漏洞原理解析

    Java SPEL表達(dá)式注入漏洞原理解析

    SpEL簡(jiǎn)稱Spring表達(dá)式語言,在Spring 3中引入,SpEL能在運(yùn)行時(shí)構(gòu)建復(fù)雜表達(dá)式、存取對(duì)象圖屬性、對(duì)象方法調(diào)用等等,可以與基于XML和基于注解的Spring配置還有bean定義一起使用,本文給大家介紹Java SPEL表達(dá)式注入漏洞原理研究,感興趣的朋友一起看看吧
    2023-10-10
  • Spring Boot集成Druid數(shù)據(jù)庫連接池

    Spring Boot集成Druid數(shù)據(jù)庫連接池

    這篇文章主要介紹了Spring Boot集成Druid數(shù)據(jù)庫連接池,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-04-04
  • Java多線程面試題(面試官常問)

    Java多線程面試題(面試官常問)

    這篇文章主要介紹了Java多線程面試題(面試官常問),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-03-03
  • java向文件末尾添加內(nèi)容示例分享

    java向文件末尾添加內(nèi)容示例分享

    本文為大家提供一個(gè)java向文件末尾添加內(nèi)容的示例分享,大家參考使用吧
    2014-01-01
  • java批量下載將多個(gè)文件(minio中存儲(chǔ))壓縮成一個(gè)zip包代碼示例

    java批量下載將多個(gè)文件(minio中存儲(chǔ))壓縮成一個(gè)zip包代碼示例

    在Java應(yīng)用程序中有時(shí)我們需要從多個(gè)URL地址下載文件,并將這些文件打包成一個(gè)Zip文件進(jìn)行批量處理或傳輸,這篇文章主要給大家介紹了關(guān)于java批量下載將多個(gè)文件(minio中存儲(chǔ))壓縮成一個(gè)zip包的相關(guān)資料,需要的朋友可以參考下
    2023-11-11

最新評(píng)論

诏安县| 南江县| 孟州市| 酉阳| 三明市| 防城港市| 双流县| 贵港市| 伊宁县| 新丰县| 荣昌县| 盱眙县| 宣汉县| 沂南县| 义乌市| 夹江县| 滦平县| 万宁市| 西盟| 通河县| 弥渡县| 安平县| 华容县| 五寨县| 潜江市| 西平县| 区。| 肥城市| 略阳县| 舟曲县| 界首市| 类乌齐县| 呼图壁县| 南安市| 囊谦县| 榆中县| 丰都县| 普兰店市| 抚松县| 涡阳县| 丰镇市|