简体   繁体   English

Maven依赖缺少神器

[英]Maven Dependency missing artifact

I am currently working on a Java project using Maven. 我目前正在使用Maven开发Java项目。 In my pom.xml I am getting this error. 在我的pom.xml我收到此错误。

Missing artifact com.bea.xml:jsr173-ri:jar:1.0

I have added this dependency 我添加了这种依赖

<dependency>
        <groupId>com.bea.xml</groupId>
        <artifactId>jsr173-ri</artifactId>
        <version>1.0</version>
</dependency>

to my pom.xml . 到我的pom.xml But still the error is same. 但是错误仍然是一样的。

Am I missing adding repository for jsr173-ri dependency? 我错过了为jsr173-ri依赖添加存储库吗? I am also not getting repository to add in my pom.xml . 我也没有在我的pom.xml添加存储库。

Can someone suggest me repository code for jsr173-ri to add in my pom.xml ? 有人可以建议我在我的pom.xml添加jsr173-ri存储库代码吗?

com.bea.xml is not available in public repositories (Download size is zero). com.bea.xml公共存储库中不可用(下载大小为零)。 Therefore you need to download the JAR file and manually install it in to your local repo. 因此,您需要下载JAR文件并手动将其安装到本地存储库中。

Some useful links: Manually install dependency 一些有用的链接: 手动安装依赖项

Are you sure this is causing the problem? 你确定这会导致问题吗? Haven't you missed anything else? 你有没有错过任何其他?

Here is the complete configuration (pom.xml) which you might need: 这是您可能需要的完整配置(pom.xml):

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.bea.xml</groupId>
  <artifactId>jsr173-ri</artifactId>
  <version>1.0</version>
  <name>JSR 173 - Streaming API for XML - Reference Implementation</name>
  <description>JSR 173 - Streaming API for XML - Reference Implementation</description>
  <url>http://dev2dev.bea.com/xml/stax.html</url>
  <distributionManagement>
    <downloadUrl>http://ftpna2.bea.com/pub/downloads/jsr173.jar</downloadUrl>
  </distributionManagement>

  <licenses>
    <license>
      <name>BEA JSR 173 RI</name>
      <url>http://www.ibiblio.org/maven2/com/bea/xml/jsr173-ri/1.0/jsr173-ri-1.0-license.txt</url>
      <distribution>manual</distribution>
    </license>
  </licenses>

  <organization>
    <name>BEA</name>
    <url>http://www.bea.com</url>
  </organization>

  <dependencies>
    <dependency>
      <groupId>javax.xml</groupId>
      <artifactId>jsr173</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>

</project>

Step1: Add that missing jar in C:\\Users\\{your name}\\.m2\\repository\\{dep jar folder}\\{version-RELEASE}\\{missing jar} 步骤1:在C:\\ Users \\ {your name} \\。m2 \\ repository \\ {dep jar folder} \\ {version-RELEASE} \\ {missing jar}中添加丢失的jar

Step2: In Eclipse, right click on pom.xml -> go to Maven ->Add Dependency Step3: Look for jar name in Enter groupId, artifactId Step4: Select it in Search Results: and click OK. 步骤2:在Eclipse中,右键单击pom.xml - >转到Maven - >添加依赖关系Step3:在输入groupId中查找jar名称,artifactId步骤4:在搜索结果中选择它:然后单击确定。

依赖是正确的....你不必改变它。你可以从http://mvnrepository.com/artifact/com.bea.xml/jsr173-ri/1.0下载jar并把它放在你的本地回购。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM