搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包

 

举例:将传统本地 javassit-3.17.1-GA.jar包 改成maven引用,pom中 ---Add 输入javassit 搜索

  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第1张图片

 

   这时候会搜索出超级多 Artifact Id相同 但Group Id不同  的包来(很多第三方的);【这里前提是你先建了远程仓库索引才可以搜出来】

  这个时候你就不知道哪个是你需要的了,

    慢慢查看版本,他们的命名方式都不一样,总有一个是和你版本相同的版本号,那么这个 jar就是了,这样就可以确认 Group Id了。

  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第2张图片

 

http://www.cnblogs.com/rogge7/p/7238974.html--本文有些关于索引的建议

传统javaweb 改成 Maven项目 - 海蓝steven - 博客园
http://www.cnblogs.com/rogge7/p/7300294.html

 --------------------------但是

对于上面的jar包本人找到了一个  org.javassist:javassist:bundle:3.17.1-GA 以为是相同的,最终maven项目更新的时候出错了:

 Missing artifact org.javassist:javassist:bundle:3.17.1-GA

Could not transfer artifact org.javassist:javassist:bundle:3.17.1-GA from/to mirrors.ibiblio (http://mirrors.ibiblio.org/pub/mirrors/maven2): connect timed out

org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.javassist:javassist:bundle:3.17.1-GA from/to mirrors.ibiblio (http://mirrors.ibiblio.org/pub/mirrors/maven2): connect timed out
    at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
    at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673)
    at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205)
    at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:215)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:188)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:119)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:636)
    at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:530)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:492)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager$3.call(ProjectRegistryManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:496)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:351)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:298)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:154)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:89)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
    at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at com.squareup.okhttp.internal.Platform.connectSocket(Platform.java:100)
    at com.squareup.okhttp.Connection.connectSocket(Connection.java:196)
    at com.squareup.okhttp.Connection.connect(Connection.java:172)
    at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
    at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
    at com.squareup.okhttp.Call.getResponse(Call.java:267)
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
    at com.squareup.okhttp.Call.execute(Call.java:79)
    at io.takari.aether.okhttp.OkHttpAetherClient.execute(OkHttpAetherClient.java:167)
    at io.takari.aether.okhttp.OkHttpAetherClient.get(OkHttpAetherClient.java:113)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:600)
    at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
    at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
    ... 37 more
错误提示

----所以,寻找 怎么确定原来jar包的 所有信息呢??

点开原来jar包()里面两个文件目前说明它的坐标。

  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第3张图片  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第4张图片

  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第5张图片

 得到坐标后,不用查找,直接Add 中填入 确定后,保存,项目就会自动更新jar包(或下载),最终会下载到本地仓库中 并引用。

-----

前提是这个jar包是maven创建的,如果是其它创建的,我不知道怎么确认,例如:

  搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包_第6张图片

 

你可能感兴趣的:(搜索jar包 出现很多 Artifact Id相同 但Group Id不同 的包)