Gradle doesn't build changes on Aspect class

buildship

(Albert) #1

Hello,

I’ve seen that when I build and deploy to wildfly, if I only modify Aspect class (.aj) it says “UP TO DATE” and doesn’t change the deploy. I have to modify a .java class (adding a commentary or a redundant code) to force it to build and deploy the changes.

Why it is happening and how I could fix it?

I’m using eclipse with buildship.

Thanks.


(Stefan Wolf) #2

Hi Albert,

which plugin are you using to compile AspectJ? What is the Gradle version you are using? What tasks are you running and what is the output of the tasks (especially which task is UP-TO-DATE).
It seems to me that the AspectJ classes are not an input to whatever task is saying UP-TO-DATE.

Cheers,
Stefan


(Albert) #3

Hi Stefan,

I’m using the following plugins:

plugins {
id 'java'
id 'war'
id 'eclipse'
}

apply plugin: 'aspectj'

This is the gradle version:

gradleVersion = '3.3'

I only execute the WAR task to generate artifacts.

This is the output:

Kind regards,
Albert.


(Stefan Wolf) #4

Hi Albert,

I quickly had a look at the aspectj plugin from here. Is this the plugin you are using? Note that there is also this plugin which is more recent but I didn’t find documentation or source code for it.
Anyway, the problem with the aspectj plugin seems to be that the task only declares the .java files as inputs, see here. That means that any changes to .aj files go unnoticed.
So this problem would need to be fixed in the plugin. Could you open an issue there?

Cheers,
Stefan


(Albert) #5

Hello Stefan,

I’m using the github aspectJ plugin.
I’ll try to open an issue there for solve this problem.

Thanks for everything.

Kind regards,
Albert.


(Albert) #7

Hello,

The plugin is no longer supported, so this bug can’t be fixed.

What I could do?

Thanks.