0

I am using spring-data-neo4j 3.4.2, which is (optionally) using AspectJ.

My IDE is IntelliJ IDEA 16 (EAP, IU-144.3891.8). I have had the same problem using latest IntelliJ IDEA 15.

Everything works fine so far within IntelliJ, I can compile, run my Unit-Tests, deploy and run my web-application to/on Wildfly and so on.

When building my project in IntelliJ, I can see usage of the required aspects (the following warning is ok).

org.springframework.data.neo4j.aspects.support.node.Neo4jNodeBacking has not been applied [Xlint:adviceDidNotMatch] ... 

My problem: IntelliJ IDEA uses the spring-aspects/ajc correctly. But in the editor, the aspects are not resolved/used. Code-completion etc. does not work.

IntelliJ editor error message

At AspectJ-facet configuration, aspect-path is configured as suggested.

AspectJ facet configuration.

Plugins "AspectJ Support" and "Spring AOP/@AspectJ" are installed and active.

installed aspectj plugin

I would like to use the spring-(data-)aspects in my editor, any suggestions, how IntelliJ Editor can get aware of the apsects?

4 Answers 4

2

There are a lot of open AspectJ-related tickets for IDEA. They have not been resolved for a long time. I love IDEA, but when it comes to AspectJ support Eclipse is superior, probably because AspectJ is an Eclipse project. So whenever I am dealing with AspectJ, I normally use Eclipse, as much as I would like to do everything in my favourite IDE IntelliJ IDEA.

Sign up to request clarification or add additional context in comments.

1 Comment

Sad to hear this, but thanks for this information. I guess it's time for an additional bug-report.
2

I resolved this issue by adding the following maven dependency. None of solutions worked for me which were given here. Another solution is here.

Maven Dependency:

<!-- https://mvnrepository.com/artifact/org.springframework/spring-aspects --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>3.2.0.RELEASE</version> </dependency> 

Hope this fix will help other users too.

Comments

0

From pom.xml remove the <runtime> tag from the dependency of aspectjweaver and aspectjrt and compile the pom.xml file.

<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.9.7</version> </dependency> <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.9.7</version> </dependency> 

Comments

-1

Go to project structure -> Dependencies -> and then make all dependencies compile time.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.