You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Jefferson K. French" <je...@frenches.org> on 2004/12/02 00:08:43 UTC

Re: add generated tests to maven.test.compile.src.set

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:jeff@frenches.org



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


Re: add generated tests to maven.test.compile.src.set

Posted by Nicolas De Loof <ni...@capgemini.com>.
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:jeff@frenches.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


generating JBoss descriptors

Posted by Janos Mucsi <mu...@yahoo.com>.
Hi 
I have this in my maven.xml:

<preGoal name="java:compile">
        <ant:echo>pregoal java:compile
executing</ant:echo>
        <attainGoal name="xdoclet:webdoclet"/>
    </preGoal>

How do I tell the plugin to look for @jboss tags and
to generate the JBoss descriptors?

Any help will be appreciated.
Thanks.
Janos



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

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