NutzCN Logo
问答 nutzmore 无法下载jar包(JDK1.8 u181)
发布于 2030天前 作者 qq_e25320ed 1618 次浏览 复制 上一个帖子 下一个帖子
标签:

nutz-plugins-ngrok的jar包依赖nutz-web无法下载。
jdk是最新版本

Failure to transfer org.nutz:nutz-web:1.r.67-SNAPSHOT/maven-metadata.xml from https://jfrog.nutz.cn/artifactory/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of nutzcn-snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.nutz:nutz-web:1.r.67-SNAPSHOT/maven-metadata.xml from/to nutzcn-snapshots (https://jfrog.nutz.cn/artifactory/snapshots): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
9 回复

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

1.8.0_120 + 是可以的, 你跑的肯定不是你以为的"1.8.0_181"

maven setting 指定jdk

<profile>  
	 <id>jdk-1.8</id>  
     <activation>  
       <activeByDefault>true</activeByDefault>  
          <jdk>1.8</jdk>  
      </activation>  
      <properties>  
          <maven.compiler.source>1.8</maven.compiler.source>  
          <maven.compiler.target>1.8</maven.compiler.target>  
          <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>  
      </properties>  
    </profile>	

maven 指定jdk

<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>

eclipse 指定默认jdk1.8,**系统**指定jdk都是1.8,maven update还是报这个错,很无语

把eclipse关掉, 然后把你以为正在用的那个jdk删掉(改名), 启动eclipse肯定成功

jdk8低版本是不行的

把其他jdk全部重命名,启动的时候发现eclipse也有指定,把eclipse的jdk重新指定还是不行

-vm
D:/devtools/Java/jdk1.8.0_181/jre/bin

是不是跟maven有关系?有点懵逼

指定没用的, 而且不能是jre

既然jdk都改名了, eclipse还能启动, 那就是还有个jdk存在嘛

或者你换个办法吧, 把https改成http

我是把非1.8u181的其他jdk都屏蔽了,不行。
为了验证maven到底使用哪个jdk,我把之前maven插件工程打开maven-resources-plugin,打印了jdk版本。
执行maven install 打印以下日志,确定jdk确实已经使用最新版本。

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ nutz-plugins-ngrok ---
[INFO] jdk -version: **1.8.0_181**
[INFO] org.apache.maven.plugin.resources.TestResourcesMojo.execute() beginxx =========================

再maven install,maven update,发现jar包已经下载下来,有点懵逼

总结来说应该是jdk问题:
jdk指定入口比较多:JAVA_HOME,elipse.ini,eclipse jdk指定,另外还有注册列表。
踩过坑,希望其他小伙伴注意,不清楚版本,用maven插件打印出来最明显

添加回复
请先登陆
回到顶部