It appears to be an install issue, as installing maven on a new machine and
running the compile works.  Sorry for the false alarm and thanks for the quick
response!

I did notice the java compiler also attempts to recompile my aspect dir
contents, which surprised me (I'm a maven newbie and thought it'd only compile
src/main/java), and I was wondering what the "best practices" were
aspectj/java.  My goal is to have a set of aspects weaving Java classes in both
"main" and "test".  How do people normally set this up?

I was originally tempted to just replace javac with ajc and not rely on the
plugin, but since test-compile is a separate step, the aspects would not get
re-compiled along with the test classes, resulting in unadvised tests.  Does
the plugin include src/main/aspect when compiling tests?  Do people "turn off"
(and, if so, how?) the javac compiler in both the compile/test-compile phases?

Quoting Kaare Nilsen <[EMAIL PROTECTED]>:

> I cannot seem to be able to recreate this problem. Could you please
> tell me which version you are using, and if possible zip/tar the
> project and mail it to me for further investigation.
>
>
> /Kaare
> On 20/03/06, Brian Ericson <[EMAIL PROTECTED]> wrote:
> > This seems like an obvious issue, but I'm not able to figure out why
> > this isn't working.  I have aspects in src/main/aspect (the default
> > directory for aspects), but they're not being passed to the compiler.  I
> > get an error (test is the name of my project):
> >
> > [INFO] [aspectj:compile {execution: default}]
> > [INFO] Starting compiling aspects
> > [DEBUG] Running : ajc -classpath
> >
>
/home/bme/.m2/repository/aspectj/aspectjrt/1.5.0/aspectjrt-1.5.0.jar:/home/bme/java/projects/test/target/classes
> > -d /home/bme/java/projects/test/target/classes
> > [ERROR] no sources specified
> > [ERROR] AspectJ Compiler
> >
> > Any ideas?
> >
> > I've tried various pom settings, but none of them get picked up
> > (including explicitly setting the source dir) and the end result is the
> > same...  My current config, in its entirety, is:
> >
> > <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>org.curvybits.test</groupId>
> >   <artifactId>test</artifactId>
> >   <packaging>jar</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >   <name>Maven Quick Start Archetype</name>
> >   <url>http://maven.apache.org</url>
> >   <dependencies>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <scope>test</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>aspectj</groupId>
> >       <artifactId>aspectjrt</artifactId>
> >       <version>1.5.0</version>
> >     </dependency>
> >   </dependencies>
> >   <build>
> >     <plugins>
> >       <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>aspectj-maven-plugin</artifactId>
> >         <configuration>
> >           <source>1.5</source>
> >           <target>1.5</target>
> >         </configuration>
> >         <executions>
> >           <execution>
> >             <goals>
> >               <goal>compile</goal>
> >               <goal>test-compile</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >       </plugin>
> >     </plugins>
> >   </build>
> > </project>
> >
>



Reply via email to