Hi,

I created a library (let's call it project-a) to provide aspects
(AspectJ is meant here) to other modules. To use that library as an
aspect library I would create a pom for some project-b as follows:

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <groupId>sandbox</groupId>
        <artifactId>project-b</artifactId>
        <packaging>jar</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>project-b</name>
        <dependencies>
                <dependency>
                        <groupId>aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>[1.5,)</version>
                </dependency>
                <dependency>
                        <groupId>sandbox</groupId>
                        <artifactId>project-a</artifactId>
                        <version>1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                </dependency>
        </dependencies>
        <build>
                <plugins>
                        <plugin>
                                <artifactId>maven-eclipse-plugin</artifactId>
                                <configuration>
                                        <additionalProjectnatures>
                                                
<projectnature>org.eclipse.ajdt.ui.ajnature</projectnature>
                                        </additionalProjectnatures>
                                        <buildcommands>
                                                
<buildcommand>org.eclipse.ajdt.core.ajbuilder</buildcommand>
                                        </buildcommands>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>aspectj-maven-plugin</artifactId>
                                <configuration>
                                        <aspectLibraries>
                                                <aspectLibrary>
                                                        
<groupId>sandbox</groupId>
                                                        
<artifactId>project-a</artifactId>
                                                </aspectLibrary>
                                        </aspectLibraries>
                                        <complianceLevel>1.5</complianceLevel>
                                </configuration>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>compile</goal>
                                                        
<goal>test-compile</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>
</project>

Then I would like to use eclipse to work on project-b. so I set it up
using the eclipse plugin. That works fine except for configuring
"project-a" as an aspect library. This causes no aspects to be woven
into classes of project-b. Did I miss something in setting up my poms?

thanks in advance for any hints!
-Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to