Announcement Announcement Module
Collapse
No announcement yet.
aspectj-maven-plugin compilation warnings Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • aspectj-maven-plugin compilation warnings

    Hi all,

    We are currently implementing a spring application using Spring Roo and Hibernate/Jpa to reverse-engineer code from an existing Mysql database and we are having some issues when compiling using aspectj in Maven.

    We are using spring framework 3.2.3 and Spring roo 1.2.4

    The DB classes (Hibernate/Jpa .java and .aj files) are generated using spring Roo (as described above).

    When compiling in Eclipse (STS) using the embedded aspect compiler everything is fine, but when compiling directly with maven we get the following warnings:

    Code:
    [WARNING] this affected type is not exposed to the weaver: xxx.commander.db.data [Xlint:typeNotExposedToWeaver]
    ...
    [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
    Basically all java classes in the xxx.db source package (generated by roo) give the "not exposed to the weaver" warnings, even though these are part of the source files and we get the "adviceDidNotMatch" warnings at the end of the aspect compilation.

    This is relevant part of our pom.xml file:

    Code:
    <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>aspectj-maven-plugin</artifactId>
                    <version>1.4</version>
                    <!-- NB: do not use 1.3 or 1.3.x due to MASPECTJ-90 issue  -->
                    <dependencies>
                        <!-- NB: You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
                        <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjrt</artifactId>
                            <version>${aspectj.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjtools</artifactId>
                            <version>${aspectj.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>compile</goal>
                                <goal>test-compile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <outxml>true</outxml>
                        <XnoInline>true</XnoInline>
                        <aspectLibraries>
                            <aspectLibrary>
                                <groupId>org.springframework</groupId>
                                <artifactId>spring-aspects</artifactId>
                            </aspectLibrary>
                        </aspectLibraries>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <!--
                          Aspects in src/main/java and src/main/aspects are added as default in the 
                          compile goal.
                          Aspects in src/test/java and src/test/aspects are added as default in the 
                          test-compile goal.
                          Aspects in src/main/java are added in the test-compile goal 
                          if weaveWithAspectsInMainSourceFolder is set to true
                        -->
                        <weaveWithAspectsInMainSourceFolder>false</weaveWithAspectsInMainSourceFolder>
                    </configuration>
                </plugin>
    Anybody has any idea why we get these warnings in maven and how to fix them?

    Thanks,
    /Sebastien

  • #2
    Hi,

    I have the same question, I'm curious to know if there was ever any resolution or understanding on this?

    thanks,
    Mark

    Comment


    • #3
      We are currently in the process of moving to stackoverflow.com for our forums. If you're still having this issue please consider asking it again at http://stackoverflow.com using the #spring tag. If you do post it there, please reply here with the link. Thanks!

      Comment

      Working...
      X