[
http://jira.codehaus.org/browse/MOJO-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105752
]
Olivier Michallat commented on MOJO-620:
----------------------------------------
+1 for the forceCompile option ;-)
I'm testing using AspectJ to enforce development contracts at compile-time. The
idea is to have compilation fail if architectural patterns are violated (e.g
calling a method from the wrong layer, etc.).
This works fine the first time, but when building a second time in a row, the
plugin doesn't invoke the ajc compiler because neither sources nor
configuration have changed. Therefore the project can be built, in spite of
contract violation.
This is not exactly the same case as Ken, as I get the message "No
modifications found skipping aspectJ compile".
For whatever it's worth, I'm attaching a (very simple) patch to solve my
problem. I've tried to handle Ken's case as well (forcing compilation even if
no sources are found), but then the ajc compiler complains that no sources were
specified. I've not tried his exact situation though (external jar with
external aspects).
Please note that I've had problems running the tests : some fail from CLI, but
they work from Eclipse (except AjcReportMojoTest, but it also fails without my
changes).
> compilation skipped when all aspects and classes are external
> -------------------------------------------------------------
>
> Key: MOJO-620
> URL: http://jira.codehaus.org/browse/MOJO-620
> Project: Mojo
> Issue Type: Bug
> Components: aspectj
> Environment: Affects versions: 1.0-beta-2,
> 1.0-beta-4-20060921.212218-1
> Reporter: Ken Geis
>
> I am trying to weave a jar with an aspect library. There are no aspects or
> classes in the project. The plugin exits without weaving the jar. If I run
> mvn -X, I get this:
> [DEBUG] No sources found skipping aspectJ compile
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email