gpt4 book ai didi

java - Maven 全新安装失败 [索引路径中存在非法字符]

转载 作者:行者123 更新时间:2023-12-01 08:01:57 25 4
gpt4 key购买 nike

我在 windows 8.1 中使用 Jfrog Artifactory。我通过 Artifactory deploy 选项部署了 hibernate jars。但是当我尝试使用 maven clean install 选项时,我最终出现了以下错误。

    [ERROR] Failed to execute goal on project hibernate: Could not resolve dependencies for project com.bala.exercises.hibernate:hibernate:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), com.fasterxml:classmate:jar:1.0.0 (compile), dom4j:dom4j:jar:1.6.1 (compile), hibernate-core:hibernate-core:jar:4.3.5.Final (compile), hibernate-commons-annotations:hibernate-commons-annotations:jar:4.0.4.Final (compile), hibernate-jpa:hibernate-jpa:jar:1.0.0.Final:2.1-api (compile), org.jboss:jandex:jar:1.1.0.Final (compile), org.javassist:javassist:jar:3.18.1-GA (compile), org.jboss.logging:jboss-logging:jar:3.1.3.GA (compile), mysql-connector-java:mysql-connector-java:jar:bin:5.1.31 (compile)]: Failed to read artifact descriptor for hibernate-core:hibernate-core:jar:4.3.5.Final: Could not transfer artifact hibernate-core:hibernate-core:pom:4.3.5.Final from/to balahome server (http://localhost:8080/artifactory/ bala-libs-mandatories): Illegal character in path at index 34: http://localhost:8080/artifactory/ bala-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project hibernate: Could not resolve dependencies for project com.bala.exercises.hibernate:hibernate:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), com.fasterxml:classmate:jar:1.0.0 (compile), dom4j:dom4j:jar:1.6.1 (compile), hibernate-core:hibernate-core:jar:4.3.5.Final (compile), hibernate-commons-annotations:hibernate-commons-annotations:jar:4.0.4.Final (compile), hibernate-jpa:hibernate-jpa:jar:1.0.0.Final:2.1-api (compile), org.jboss:jandex:jar:1.1.0.Final (compile), org.javassist:javassist:jar:3.18.1-GA (compile), org.jboss.logging:jboss-logging:jar:3.1.3.GA (compile), mysql-connector-java:mysql-connector-java:jar:bin:5.1.31 (compile)]
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.bala.exercises.hibernate:hibernate:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), com.fasterxml:classmate:jar:1.0.0 (compile), dom4j:dom4j:jar:1.6.1 (compile), hibernate-core:hibernate-core:jar:4.3.5.Final (compile), hibernate-commons-annotations:hibernate-commons-annotations:jar:4.0.4.Final (compile), hibernate-jpa:hibernate-jpa:jar:1.0.0.Final:2.1-api (compile), org.jboss:jandex:jar:1.1.0.Final (compile), org.javassist:javassist:jar:3.18.1-GA (compile), org.jboss.logging:jboss-logging:jar:3.1.3.GA (compile), mysql-connector-java:mysql-connector-java:jar:bin:5.1.31 (compile)]
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:158)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
... 22 more
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), com.fasterxml:classmate:jar:1.0.0 (compile), dom4j:dom4j:jar:1.6.1 (compile), hibernate-core:hibernate-core:jar:4.3.5.Final (compile), hibernate-commons-annotations:hibernate-commons-annotations:jar:4.0.4.Final (compile), hibernate-jpa:hibernate-jpa:jar:1.0.0.Final:2.1-api (compile), org.jboss:jandex:jar:1.1.0.Final (compile), org.javassist:javassist:jar:3.18.1-GA (compile), org.jboss.logging:jboss-logging:jar:3.1.3.GA (compile), mysql-connector-java:mysql-connector-java:jar:bin:5.1.31 (compile)]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for hibernate-core:hibernate-core:jar:4.3.5.Final
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
... 25 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact hibernate-core:hibernate-core:pom:4.3.5.Final from/to balahome server (http://localhost:8080/artifactory/ bala-libs-mandatories): Illegal character in path at index 34: http://localhost:8080/artifactory/ bachan-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
... 28 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact hibernate-core:hibernate-core:pom:4.3.5.Final from/to balahome server (http://localhost:8080/artifactory/ bala-libs-mandatories): Illegal character in path at index 34: http://localhost:8080/artifactory/ bachan-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1546)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1537)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:1035)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:409)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:457)
... 31 more
Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 34: http://localhost:8080/artifactory/ bachan-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom
at java.net.URI.create(Unknown Source)
at com.ning.http.client.RequestBuilderBase.buildUrl(RequestBuilderBase.java:299)
at com.ning.http.client.RequestBuilderBase.setUrl(RequestBuilderBase.java:294)
at com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.setUrl(AsyncHttpClient.java:333)
at com.ning.http.client.AsyncHttpClient.requestBuilder(AsyncHttpClient.java:560)
at com.ning.http.client.AsyncHttpClient.prepareGet(AsyncHttpClient.java:405)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.run(AsyncRepositoryConnector.java:596)
at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:402)
... 32 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 34: http://localhost:8080/artifactory/ bachan-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
... 40 more

我下载并部署了相应的 pom 文件,但没有成功。此外,除非退出 eclipse,否则我无法清理 Windows 8.1 中的 .m2 存储库。

谢谢。

最佳答案

当您有像这样的大量嵌套堆栈跟踪时,记住原始原因位于底部会很有帮助(其余的是上下文,在某些情况下可能有用)。在本例中是

java.net.URISyntaxException: Illegal character in path at index 34: http://localhost:8080/artifactory/ bachan-libs-mandatories/hibernate-core/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final.pom

然后很容易看到路径http://localhost:8080/artifactory/bala-libs-mandatories中有一个空格。如果是拼写错误,请将其删除,否则将其编码为 %20。

关于java - Maven 全新安装失败 [索引路径中存在非法字符],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24829415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com