Maven部署异常:on project standalone-pom: Cannot deploy artifact from the local repository解决方法

来源: 易习特达网 时间: 2016-12-01 07:30:59

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:

deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from

 the local repository: E: epositoryorghtmlparserhtmlparser2.1htmlparser-2.

1.jar -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o

rg.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on pro

ject standalone-pom: Cannot deploy artifact from the local repository: E: eposi

toryorghtmlparserhtmlparser2.1htmlparser-2.1.jar

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor

.java:212)

        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.buildProje

ct(LifecycleModuleBuilder.java:116)

        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje

ct(LifecycleModuleBuilder.java:80)

        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre

adedBuilder.build(SingleThreadedBuilder.java:51)

        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl

eStarter.java:120)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)

        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)

        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun

cher.java:289)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav

a:229)

        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La

uncher.java:415)

        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:

356)

Caused by: org.apache.maven.plugin.MojoFailureException: Cannot deploy artifact

from the local repository: E: epositoryorghtmlparserhtmlparser2.1htmlparse

r-2.1.jar

        at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.

java:283)

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default

BuildPluginManager.java:132)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor

.java:208)

        ... 19 more

Cannot deploy artifact from  the local repository

解决方法:

正如异常报错提示的那样:Cannot deploy artifact from the local repository,因为本机的local Repository正是在e: epository

所以出现这个问题。

可以修改mvn deploy:deploy-file 中的 -Dfile=其他地址而不是本地的Repository位置

 例如: -Dfile=c:htmlparser-2.1.jar

 而非 -Dfile=e: epositoryorghtmlparserhtmlparser2.1htmlparser-2.1.jar

本页地址:http://www.easytd.com/yichangjijin/d_16120107314.html

常用工具