jcabi @RetryOnFailure无法解析为某种类型

时间:2015-04-10 20:29:34

标签: java annotations jcabi

jcabi @RetryOnFailure无法解析为某种类型。

我在我的pom.xml中添加了'weaving'和jcabi依赖

   <plugin>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-maven-plugin</artifactId>
      <version>0.9.3</version>
      <executions>
        <execution>
          <goals>
            <goal>ajc</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

....

   <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-aspects</artifactId>
      <version>0.21.1</version>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjrt</artifactId>
      <version>1.6.12</version>
      <scope>runtime</scope>
    </dependency>

@RetryOnFailure无法识别。我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:1)

我在pom.xml中使用以下依赖项,它对我有用。更新两者的版本。

<dependency>
    <groupId>com.jcabi</groupId>
    <artifactId>jcabi-aspects</artifactId>
    <version>0.22</version>
    </dependency>
<dependency>
    <groupId>org.aspectj</groupId>
    <artifactId>aspectjrt</artifactId>
    <version>1.8.3</version>
</dependency>