jcabi-aspects icon indicating copy to clipboard operation
jcabi-aspects copied to clipboard

Can You please share working Maven project with @Loggable

Open mholyk opened this issue 9 years ago • 10 comments

Hi there, i'm trying to use jcabi-aspects in my project and have spent a lot of time trying to make it work, but it doesn't. Please be so kind to share any simple Maven prject with using @Loggable. I'm interested in pom.xml .classpath etc.

Thank You in advance, Mark

mholyk avatar Jul 09 '15 14:07 mholyk

@yegor256 please pay attention to this issue

dmarkov avatar Jul 13 '15 07:07 dmarkov

@nachtighall this project, for example: https://github.com/yegor256/rultor

yegor256 avatar Jul 13 '15 17:07 yegor256

@nachtighall here is jcabi-aspects annotation: https://github.com/yegor256/rultor/blob/1.56.2/src/main/java/com/rultor/Entry.java#L125

yegor256 avatar Jul 13 '15 17:07 yegor256

@nachtighall @Loggable is not used in Rultor though. This project is using @Loggable: https://github.com/yegor256/netbout (almost each class is annotated)

yegor256 avatar Jul 13 '15 17:07 yegor256

Thank you @yegor256 , i will have a look. Hope it would help me.

mholyk avatar Jul 14 '15 09:07 mholyk

Now i get javascript java.lang.RuntimeExeption: Cannot register non aspect com$jcabi$aspects$aj$MethodLogger$class , com.jcabi.aspects.aj.MethodLogger.class.

Where should i put aop-ajc.xml? with

<aspectj>
<aspects>
<aspect name="com.jcabi.aspects.aj.MethodLogger.class"/>
</aspects>
</aspectj>

mholyk avatar Jul 14 '15 11:07 mholyk

@nachtighall you don't need this XML file anywhere. everything should work without any additional configuration. just jcabi-maven-plugin in pom.xml and that's it. see how it works in the projects I mentioned.

yegor256 avatar Jul 14 '15 22:07 yegor256

@nachtighall

You can also look at https://github.com/jcabi/jcabi-aspects/issues/159

pecko avatar Oct 11 '15 10:10 pecko

@nachtighall About these previous comments, did it solve your issue? If yes please close the issue #170.

Thanks, MC

maurcarvalho avatar Feb 17 '16 11:02 maurcarvalho

@nachtighall did you check #159 ? If so, please close this issue.

Thanks, MC

maurcarvalho avatar May 13 '16 13:05 maurcarvalho