You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2006/03/30 23:09:47 UTC
[jira] Closed: (MPASPECTJ-14) Unable to weave only sources defined
in argument files. Error during compilation if argument file contains file
from sourceDirectory.
[ http://jira.codehaus.org/browse/MPASPECTJ-14?page=all ]
Lukas Theussl closed MPASPECTJ-14:
----------------------------------
Assign To: Lukas Theussl
Resolution: Fixed
> Unable to weave only sources defined in argument files. Error during compilation if argument file contains file from sourceDirectory.
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MPASPECTJ-14
> URL: http://jira.codehaus.org/browse/MPASPECTJ-14
> Project: maven-aspectj-plugin
> Type: Bug
> Versions: 3.2
> Reporter: Alexey Dashkevich
> Assignee: Lukas Theussl
> Fix For: 4.0
> Attachments: aspectj-patch-dash-20041130.zip, aspectj-test-case-dash-20041130.zip, aspectj.mpaspectj14.patch, patch.txt
>
>
> Some days ago I have started to use aspectj plugin for compilation
> aspects. I use aspects only for tests. I have following structure in
> project:
> -src
> |
> aspectj - aspect sources
> |
> java - application sources
> |
> test - test sources
> I have an "lst" file where defined what files should be compiled with
> aspects e.g.:
> com/toplinkmapping/UserRoleAspect.java
> ../java/com/toplinkmapping/UserRole.java
> I want compile only files that defined in "lst" file and place classes
> into test-classes folder. In project.properties I have defined
> following properties:
> maven.aspectj.source=1.4
> maven.aspectj.argfiles=src/aspectj/aspects.lst
> But when I have executed aspectj:compile I have error because this
> task try to compile files from aspects.lst file and then from src/java
> folder. And error occur because in aspects.lst defined files from java source
> folder.
> I have resolved this problem in my maven.xml by following way:
> <postGoal name="test:compile">
> <ant:path id="build.dest" location="${maven.build.dest}"/>
> <maven:addPath id="maven.dependency.classpath" refid="build.dest"/>
> <ant:path id="maven.compile.src.set"/>
> <attainGoal name="aspectj:compile"/>
> </postGoal>
> So as you can see I have overwrite "maven.compile.src.set" path that
> not so good.
> I think it will be good if will be introduced new property
> like "maven.aspectj.src.argfilesOnly" that if true then only sources that defined in argument files will be weaved. And following changes in plugin script are needed e.g.:
> from
> <ant:sourceroots>
> <ant:path refid="${sourcePathRefid}"/>
> <j:if test="${aspectSourcesPresent and weaveAspectSources}">
> <ant:pathelement location="${pom.build.aspectSourceDirectory}"/>
> </j:if>
> </ant:sourceroots>
> to
> <ant:sourceroots>
> <j:if test="${context.getVariable('maven.aspectj.src.argfilesOnly') != 'true'}">
> <ant:path refid="${sourcePathRefid}"/>
> </j:if>
> <j:if test="${aspectSourcesPresent and weaveAspectSources}">
> <ant:pathelement location="${pom.build.aspectSourceDirectory}"/>
> </j:if>
> </ant:sourceroots>
> I have attached patch and test case for it. Please, take a look at them.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira