ok, Draft PR created 
https://github.com/dev-aspectj/aspectj-maven-plugin/pull/137 to easily 
reproduce and describe the issue

then I analyzed more in depth, as commented in the PR: it seems you found a bug 
in Plugin Tools on inherited @Component injection

we'll need to open a MPLUGIN issue and work there

Regards,

Hervé

On 2023/10/11 02:11:09 Alexander Kriegisch wrote:
> Hello Hervé.
> 
> I am sorry, if my explanations were too complicated for you. I just
> repeated everything from scratch for you, directly from my Git Bash
> console:
> 
> ------------------------------------------------------------------------
> 
> $ git clone https://github.com/dev-aspectj/aspectj-maven-plugin.git
> Cloning into 'aspectj-maven-plugin'...
> (...)
> Resolving deltas: 100% (3585/3585), done.
> 
> $ cd aspectj-maven-plugin/
> 
> $ nano src/main/java/org/codehaus/mojo/aspectj/AjcReportMojo.java
> # Comment out the makeshift 'execute()' method, save file.
> 
> $ mvn -Dinvoker.test=CreateReport verify -P integration-test
> (...)
> [INFO] --- invoker:3.6.0:run (integration-test) @ aspectj-maven-plugin ---
> [INFO] Building: CreateReport\pom.xml
> [INFO] run post-build script verify.groovy
> [INFO]   Assertion failed:
> 
> assert indexFile.exists()
> (...)
> [INFO] CreateReport\pom.xml ... FAILED (14.36 s)
> (...)
> [INFO] BUILD FAILURE
> (...)
> 
> $ less target/it/CreateReport/build.log
> # At the end of the file, there is the error.
> # Scroll up a bit to see the Maven stacktrace.
> 
> ------------------------------------------------------------------------
> 
> Hope this helps.
> -- 
> Alexander Kriegisch
> https://scrum-master.de
> 
> 
> Herve Boutemy schrieb am 11.10.2023 00:27 (GMT +07:00):
> 
> > I tried to build the project and see the failure, but could not
> > and reading explanations did not help me
> > 
> > what we need is a basic commit that works, followed by a PR upgrading Doxia 
> > and
> > that does not work with the NPE that you are saying happens
> > 
> > Regards,
> > 
> > Hervé
> > 
> > On 2023/10/10 02:44:08 Alexander Kriegisch wrote:
> >> Reverting back to my original question, also summarised in the subject
> >> of this thread: Why is 'this.siteTool' null and not injected properly?
> >> If I knew how to fix that configuratively or via coding, I would no
> >> longer need to override 'exceute()', which relies on that field being
> >> set, as you can see in my original message's stack trace extract.
> >> 
> >> Is there a bug in my project? Or is there one in Maven Reporting Tools?
> >> 
> >> Regards
> >> -- 
> >> Alexander Kriegisch
> >> https://scrum-master.de
> >> 
> >> 
> >> Alexander Kriegisch schrieb am 10.10.2023 09:28 (GMT +07:00):
> >> 
> >> > Actually, my initial message already explained the situation:
> >> > 
> >> >   1. With 1.x, I have no issues. That was my starting point.
> >> > 
> >> >   2. With 2.0, I had no desire to verride 'execute()'. It was simply
> >> >      the only thing that helped my project to function properly again.
> >> >      I would be glad to do without it, especially given that fact that
> >> >      now the method has been marked final.But I am still failing to
> >> >      understand what I should do *instead*. It is nice that you
> >> >      "expect it to work", because so do I. But in fact, it does not. I
> >> >      gave you guys a reproducer to play with and exactly specified
> >> >      which commits to check out and which integration test to run in
> >> >      order to see both my situation before and after the ugly
> >> >      workaround of overriding 'execute()'. Maybe I missed the decisive
> >> >      hint in one of your messages, but for now, I have no idea how to
> >> >      fix my plugin without that ugly workaround. Probably there is a
> >> >      bug somewhere in the implementation in code I neither wrote nor
> >> >      ever touched, which is why I was asking for help here. Feel free
> >> >      to contact me off-list,if you think the noise is too much here.
> >> > 
> >> > 
> >> > Michael Osipov schrieb am 09.10.2023 17:03 (GMT +07:00):
> >> > 
> >> >> I had these NPEs when I started to migrate reporting plugins and both
> >> >> the plugin and the super class contained the same fields which
> >> >> created conflicts. After I have removed them from the plugin and used
> >> >> the super ones all went fine. In your case I would really do what
> >> >> Hervé proposes:
> >> >> 
> >> >> * remove your execute() and retest with 1.x * in a branch try with
> >> >> 2.x
> >> >> 
> >> >> I expect it to work. You can also look at all of your reporting
> >> >> plugins in branch doxia-2.0.0 you'll see all necessary migration
> >> >> magic from me. The PR with finalizing the method is good and already
> >> >> merged.
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> >> For additional commands, e-mail: users-h...@maven.apache.org
> >> 
> >> 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to