You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jb-perso <jb...@defard.com> on 2009/03/24 14:28:58 UTC

[maven-eclipse-plugin] and .aj AspectJ files.

 

Hi,

I have a problem with eclipse plugin 1.6-SNAPSHOT. When i generate eclipse
project (eclipse : eclipse), this version add **/*.java pattern for source
dir :

<classpathentry kind="src" path="src/main/java" including="**/*.java "/>

It's fine for java projects, but for AspectJ projects, the *.aj files isn't
recognized.

When i patch manually the .classpath :

<classpathentry kind="src" path="src/main/java"
including="**/*.java|**/*.aj"/>

The problem disappear.

 

I have not found how to configure my POM to do this automatically. Is it  a
bug or a feature ?

How to configure including pattern for sources dir ?

 

Thanks for your help.

--

Jean-Baptiste Defard.

 


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
None of the project-ajdt test projects actually have source so I need
a working project to build a test against.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Thorsten Heit <th...@gmx.de>.
Hi,

> I've not used aspectj so I'm just guessing what you are trying to do.
> Can you explain why you want non-java files on the classpath?

I haven't used AspectJ for myself, but AFAIK .aj files are the sources  
for AspectJ. They must be included in the classpath so that the  
AspectJ compiler can compile them.


> Does the aspectj builder work with these files and need the *.aj on
> the classpath to work.

Yes.


Regards

Thorsten

Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Mar 24, 2009 at 11:58 PM, jb-perso <jb...@defard.com> wrote:
>
>
> Hi,
>
> I have a problem with eclipse plugin 1.6-SNAPSHOT. When i generate eclipse
> project (eclipse : eclipse), this version add **/*.java pattern for source
> dir :
>
> <classpathentry kind="src" path="src/main/java" including="**/*.java "/>
>
> It’s fine for java projects, but for AspectJ projects, the *.aj files isn’t
> recognized.
>
> When i patch manually the .classpath :
>
> <classpathentry kind="src" path="src/main/java"
> including="**/*.java|**/*.aj"/>
>
> The problem disappear.
>
>
>
> I have not found how to configure my POM to do this automatically. Is it  a
> bug or a feature ?
>
> How to configure including pattern for sources dir ?

This was a fix as per http://jira.codehaus.org/browse/MECLIPSE-443

Looking at the source for EclipseClasspathWriter it is capable of
adding includes if it is a non-resource directory.
However all creation of non-resource directories use null as the
include value and there is no way to specify it.

I've not used aspectj so I'm just guessing what you are trying to do.
Can you explain why you want non-java files on the classpath?
Does the aspectj builder work with these files and need the *.aj on
the classpath to work.

If that is the case, can you file a bug and include a working example
of the .project, .classpath etc so I can add a test case for this.

It should be a matter of changing EclipsePlugin.extractAspectDirs() to
add "*.aj" as the include string in the EclipseSourceDir()
constructor.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Mar 27, 2009 at 12:23 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Fri, Mar 27, 2009 at 12:19 PM, Barrie Treloar <ba...@gmail.com> wrote:
>> Can you confirm that
>>  src/main/aspect
>> should be
>>  including="**/*.java|**/*.aj"
>> instead of just
>>  including="**/*.aj"
>>
>> Thanks
>>
>
> Ok after googling, I can find more than one project that has java
> files in src/main/aspect.
> Will go with that.
>

http://jira.codehaus.org/browse/MECLIPSE-538 closed.

Patched on trunk.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Mar 27, 2009 at 12:19 PM, Barrie Treloar <ba...@gmail.com> wrote:
> Can you confirm that
>  src/main/aspect
> should be
>  including="**/*.java|**/*.aj"
> instead of just
>  including="**/*.aj"
>
> Thanks
>

Ok after googling, I can find more than one project that has java
files in src/main/aspect.
Will go with that.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
Can you confirm that
  src/main/aspect
should be
  including="**/*.java|**/*.aj"
instead of just
  including="**/*.aj"

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [maven-eclipse-plugin] and .aj AspectJ files.

Posted by Barrie Treloar <ba...@gmail.com>.
Added http://jira.codehaus.org/browse/MECLIPSE-538.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org