jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Mojo AspectJ Plugin
  • MASPECTJ-92

no weaving in phase "test-compile" after upgrade from 1.2 to 1.3

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 1.3
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    MacOS 10.6.5
  • Testcase included:
    yes

Description

After upgrading from 1.2 to 1.3 our Maven builds failed. It seems that 'mvn test-compile' fails because the aspects are not weaved to the test classes.

I stripped down the problem to a simple demo project which is attached (demo.zip). If you switch the aspectj-maven-plugin to version 1.2 you will see that 'mvn test-compile' will work. With 1.3 you will get a compiler error.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    demo.zip
    10/Jan/11 10:09 AM
    9 kB
    Oliver Boehm
    1. File
      demo/.classpath 0.7 kB
    2. File
      demo/.project 0.6 kB
    3. File
      demo/build.ajproperties 0.1 kB
    4. XML File
      demo/pom.xml 3 kB
    5. File
      demo/.../org.eclipse.jdt.core.prefs 0.4 kB
    6. File
      demo/.../org.maven.ide.eclipse.prefs 0.3 kB
    7. File
      demo/src/main/.../jmx/MBeanRegistryAspect.aj 4 kB
    8. Java Source File
      demo/src/main/.../jmx/MBeanHelper.java 4 kB
    9. Java Source File
      demo/src/main/.../jmx/MBeanRegistry.java 3 kB
    10. File
      demo/src/test/build.ajproperties 0.1 kB
    11. Java Source File
      demo/src/test/java/.../jmx/demo/Jim.java 2 kB
    12. Java Source File
      demo/src/test/.../jmx/demo/JimMBean.java 0.9 kB
    Download Zip
    Show
    Zip Archive
    demo.zip
    10/Jan/11 10:09 AM
    9 kB
    Oliver Boehm

Issue Links

relates to

Improvement - An improvement or enhancement to an existing feature or task. MASPECTJ-13 Change compile task to run after project classess compilation.

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Robert Scholte added a comment - 27/Jan/11 5:13 PM

Problem is caused by MASPECTJ-13 : rev. 10439.
By binding it to the next phase the maven-compiler-plugin:2.3.2:testCompile is executed before aspectj-maven-plugin:1.4-SNAPSHOT:test-compile which causes the problem.
But when reverting it, something else happens:
aspectj-maven-plugin:1.4-SNAPSHOT:test-compile is executed before maven-resources-plugin:2.4.3:testResources and that's not the order as expected.
So this will require some more investigation.

Show
Robert Scholte added a comment - 27/Jan/11 5:13 PM Problem is caused by MASPECTJ-13 : rev. 10439. By binding it to the next phase the maven-compiler-plugin:2.3.2:testCompile is executed before aspectj-maven-plugin:1.4-SNAPSHOT:test-compile which causes the problem. But when reverting it, something else happens: aspectj-maven-plugin:1.4-SNAPSHOT:test-compile is executed before maven-resources-plugin:2.4.3:testResources and that's not the order as expected. So this will require some more investigation.
Hide
Permalink
Oliver Boehm added a comment - 22/Dec/11 3:37 PM

As a workaround (as discussed on http://stackoverflow.com/questions/2610633/maven-compile-aspectj-project-containing-java-1-6-source) I bound the AspectJ plugin to the process-sources phase:

<execution>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>

With this workaround I succeed to use the actual aspectj-maven-plugin 1.4

Show
Oliver Boehm added a comment - 22/Dec/11 3:37 PM As a workaround (as discussed on http://stackoverflow.com/questions/2610633/maven-compile-aspectj-project-containing-java-1-6-source) I bound the AspectJ plugin to the process-sources phase: <execution> <phase>process-sources</phase> <goals> <goal>compile</goal> <goal>test-compile</goal> </goals> </execution> With this workaround I succeed to use the actual aspectj-maven-plugin 1.4

People

  • Assignee:
    Unassigned
    Reporter:
    Oliver Boehm
Vote (1)
Watch (1)

Dates

  • Created:
    10/Jan/11 10:09 AM
    Updated:
    22/Dec/11 3:37 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.