Am Montag, 11. Juni 2007 15:45 schrieb Dirk Olmes:
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > this is not 100% directly related to maven but maybe someone can help me:
> > i use eclipse 3.2, AspectJ, maven 2 and eclipse maven plugin.
> >
> > In my .settings/org.eclipse.ajdt.ui.prefs i have
> >
> > #Mon Jun 11 13:00:35 CEST 2007
> > eclipse.preferences.version=1
> > org.eclipse.ajdt.ui.aspectPath.contentKind1=BINARY
> > org.eclipse.ajdt.ui.aspectPath.entryKind1=LIBRARY
> > org.eclipse.ajdt.ui.aspectPath1=/myproject/lib/spring-aspects-2.0.5.jar
> >
> > it is need to let junit test run with aspects (i use @configurable)
> >
> > As you see i put spring-aspects-2.0.5.jar in a lib director into my
> > project. How can i refer from inside eclipse to my maven repository?
>
> I know this may not be helpful but:
>
> - why don't you include spring-aspects as test dependency?

i want to run my unittest from eclipse with "run as", so the aspectJ compiler 
must have it on its build path to weave the aspects. and i want to see these 
little icons where the code is woven.

> - why to you check in eclipse project files at all? This is known to
> cause all kinds of trouble. Keep the eclipse files out of SCM and let
> every developer generate their own.

i never thought about it. until now it was helpful to have them in scm. Is it 
best practice to have them not in SCM? But i am still not very familar with 
maven and eclipse. i got trouble with resources file, too and running junit 
tests from eclipse. My resources files are generate by maven (with 
filtering), so i needed to tell eclipse where the output directory resides:

<classpath>
        <classpathentry kind="src" path="src/main/java"/>
        <classpathentry kind="src" output="target/test-classes" 
path="src/test/java"/>
        <classpathentry excluding="**" kind="src" output="target/classes" 
path="src/main/resources"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="con" 
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
        <classpathentry kind="output" path="target/classes"/>
</classpath>

But i always have to remember to run mvn generate-resources as soon as i 
change a resource file. Otherwise junit will use the old one in 
target/classes which is awkward.

Are you running your Junit tests from inside eclipse? And if, how do you 
handle my issues?

I just discovered adding a maven "builders" and let mvn generate-resources run 
on each build (from .project):

         <buildCommand>
            <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
                        <triggers>full,incremental,</triggers>
                        <arguments>
                                <dictionary>
                                        <key>LaunchConfigHandle</key>
                                       
<value>&lt;project&gt;/.externalToolBuilders/myproject resources 
[Builder].launch</value>
                                </dictionary>
                        </arguments>
                </buildCommand>

Is it recommended? And why not put it in SCM so every developer has the same 
configuration?

kind regards,
janning


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

Reply via email to