`
bangsen
  • 浏览: 38063 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

maven Absent Code attribute in method that is not native or abstract in class...

    博客分类:
  • java
阅读更多

今天用Maven进行test , 发现这个问题:

Absent Code attribute in method that is not native or abstract in class file javax/xml/rpc/ServiceException

 

在网上找到了这个

http://maven.40175.n5.nabble.com/Test-fails-with-Maven-works-with-ant-td123184.html

于是将我的这个

 

<dependency>

<groupId>javaee</groupId>

<artifactId>javaee-api</artifactId>

<version>5</version>

<scope>provided</scope>

</dependency>

放到了最下面.

Test OK.

 

关键就是在POM中的dependency的顺序问题, 建议先compile, 然后test, 再provided.

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics