Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JSR181:pom.xml中的错误_Java_Maven_Dependencies - Fatal编程技术网

Java JSR181:pom.xml中的错误

Java JSR181:pom.xml中的错误,java,maven,dependencies,Java,Maven,Dependencies,我的pom.xml中有一个奇怪的错误。Maven(我使用的是Maven 2)发出信号缺少工件javax.jws:jsr181:jar:1.0,即使我在pom.xml中得到了相应的依赖项: <dependency> <groupId>javax.jws</groupId> <artifactId>jsr181</artifactId> <version>1.0</version> </

我的pom.xml中有一个奇怪的错误。Maven(我使用的是Maven 2)发出信号
缺少工件javax.jws:jsr181:jar:1.0
,即使我在pom.xml中得到了相应的依赖项:

<dependency>
    <groupId>javax.jws</groupId>
    <artifactId>jsr181</artifactId>
    <version>1.0</version>
</dependency>

javax.jws
jsr181
1

此错误的原因可能是什么?

查看我的存储库,我认为您需要:

<dependency>
  <groupId>sun-jaxws</groupId>
  <artifactId>jsr181-api</artifactId>
  <version>1.0</version>
</dependency>

太阳jaxws
jsr181 api
1

好的,我找到了问题的解决方案。我想找到它的方法也会很有趣

当我查看时,存储库上的链接指向bea.com上的URL,该URL已不再可用。所以,我不得不像布赖恩·阿格纽所建议的那样,换成新的。当然,还要更新我的pom.xml中的一些其他依赖项,这些依赖项在它们自己的依赖项中需要过时的版本。Maven要付出代价

<!-- https://mvnrepository.com/artifact/javax.jws/jsr181-api -->
<dependency>
    <groupId>javax.jws</groupId>
    <artifactId>jsr181-api</artifactId>
    <version>1.0-MR1</version>
</dependency>
<dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.1-1</version>
    <exclusions>
        <exclusion>
            <groupId>javax.jws</groupId>
            <artifactId>jsr181</artifactId>
        </exclusion>
    </exclusions>
</dependency>   

javax.jws
jsr181 api
1.0-MR1
javax.xml.ws
JAXWSAPI
2.1-1
javax.jws
jsr181

谢谢,这真的很有帮助。我想补充一点,如果在将jsr181 jar作为父pom的依赖项(比如jaxws api)时遇到这个问题,您需要从中排除缺少的jar:
javax.jws jsr181