Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: maven examples please

ok so I was on the right lines .. however I am using annotations and my compile fails as shown below:

...
[INFO] [aspectj:compile {execution: default}]
[ERROR] Syntax error, annotations are only available if source level is 5.0
[ERROR] Syntax error, annotations are only available if source level is 5.0
[ERROR] Syntax error, annotations are only available if source level is 5.0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Compiler errors :
error at @Aspect
^^^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:27:0::0 Syntax error, annotations are only available if source level is 5.0
error at @Pointcut("initialization(foo.App.new(..))")
^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:30:0::0 Syntax error, annotations are only available if source level is 5.0
error at @AfterReturning("appConstructor()")
^^^^^^^^^^
C:\aop-aspects\src\main\java\aspects\AppAspect.aj:33:0::0 Syntax error, annotations are only available if source level is 5.0
...

I have tried directing the compiler with the following:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

but still get the failure


Ramnivas Laddad wrote:
Here is a zip files from the upcoming AspectJ in Action, 2nd edition
(sorry for the inevitable plug) that contains four projects to show
various options with Maven.

As for the aspects in src/main/aspectj, I believe you can indicate to
Maven that it should be considered as the source directory.

-Ramnivas

On Thu, Jun 11, 2009 at 8:04 PM, Captain Haddock<davidg@xxxxxxxxxxxx> wrote:
Captain Haddock wrote:
I have a third party jar that I want to instrument using AOP and want to
have two maven projects:

1) compiles all the aspect code into a standalone jar
2) weaves the aspects into the third party jar

Could someone please provide some simple pom examples for both?

thx
fyi I have one aspect in src/main/aspectj

there are no tests

am using maven 2.1.0

thx

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


------------------------------------------------------------------------

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top