Thank you for response, I had not solved this issue yet.
I did not know about this "scope" attribute.
I just tested it succesfully !
THANKS A LOT !
Nico.
For info, here is my plugin.jelly :
<goal name="dao:test">
<maven:get var="maven.test.dest"
plugin="maven-test-plugin"
property="maven.test.dest"/>
<!-- copy generated test resources -->
<ant:copy toDir="${maven.test.dest}">
<fileset dir="${maven.build.src}/test" excludes="**/*.java"/>
</ant:copy>
<!-- override maven.test.compile.src.set to include generated tests -->
<ant:path id="maven.test.compile.src.set">
<j:if test="${unitTestSourcesPresent == 'true'}">
<ant:pathelement location="${pom.build.unitTestSourceDirectory}"/>
</j:if>
<ant:pathelement location="${maven.build.src}/test" />
</ant:path>
<j:set var="unitTestSourcesPresent" value="true" scope="parent"/>
<j:set var="maven.test.search.classdir" value="true" scope="parent"/>
</goal>
and maven.xml :
<preGoal name="test:test-resources">
<attainGoal name="dao:test"/>
</preGoal>
> I'm behind on my list email, so you may have already fixed this, but
> have you tried changing your j:set to:
>
> <j:set var="unitTestSourcesPresent" value="true" scope="parent"/>
>
> when used inside your plugin?
>
> Jeff
>
> On Wed, 24 Nov 2004, at 11:05:46 [GMT +0100] Nicolas De Loof wrote:
>
>
> > Hi all,
>
> > I've created a plugin that generates code for my app. It generates test
> > classes for generated classes too.
>
> > /target/src/java <- generated classes
> > /target/src/test <- generated test classes for generated classes
>
> > I've found on the web a tip to force "maven test" to run my tests :
> > (http://jroller.com/comments/dep4b/Weblog/maven_is_too_smart_for)
>
> > <preGoal name="test:compile">
> > <ant:path id="maven.test.compile.src.set">
> > <j:if test="${unitTestSourcesPresent == 'true'}">
> > <ant:pathelement location="${pom.build.unitTestSourceDirectory}"/>
> > </j:if>
> > <ant:pathelement location="${maven.build.src}/test" />
> > </ant:path>
>
> > <j:set var="unitTestSourcesPresent" value="true"/>
> > </preGoal>
>
>
> > I'd like to reduce pregoal to something like this to hide complexity :
>
> > <preGoal name="test:test">
> > <attainGoal name="myplugin:test"/>
> > </preGoal>
>
> > If I put previous code into a "myplugin:test" goal it doesn't workj any
> > more. Is they're a way to do this ? I've
tried
> > to use <maven:set> without success.
>
> --
> mailto:[EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is intended only for the person to whom
it is addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this message or
any part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]