You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chad Woolley <li...@thewoolleyweb.com> on 2005/02/24 23:54:54 UTC

How can I get Jelly to invoke a class in my project?

I was unable to get core:useBean and core:invoke to invoke a class that 
lives in my project's test dir.  I kept getting class not found 
exceptions.  Anyone know how to do this?  Here's my painful, ugly 
workaround using ant:exec:


     <goal name="testperformance:captioningresponse">
          <j:set var="maven.test.skip" value="true"/>	
          <attainGoal name="test:compile"/>
	     <property name="maven.dependency.classpath" 
refid="maven.dependency.classpath"/>
	
	     <property name="fullclasspath" 
value="${maven.build.dest}${path.separator}${maven.test.dest}${path.separator}${maven.dependency.classpath}"/>
	     <!--
	     <echo>!!!! fullclasspath=${fullclasspath}</echo>
	     -->

     	<!-- NOTE: this assumes you already have the war deployed and 
running at the proper place -->
     	<!--  Couldn't get useBean/invoke to work, never could find class
		<j:useBean var="testPerformanceCaptioningResponse"
		 
class="com.vms.ccgateway.test.performance.TestPerformanceCaptioningResponse" 

		           />
		<j:invoke method="performTest"
		          on="${testPerformanceCaptioningResponse}"/>
		-->
		<ant:exec executable="java.exe">
		  <arg line="-cp '${fullclasspath}' 
com.vms.ccgateway.test.performance.TestPerformanceCaptioningResponse"/>
		</ant:exec>
     </goal>



Thanks,
Chad

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


Re: How can I get Jelly to invoke a class in my project?

Posted by dan tran <da...@gmail.com>.
:-) you make maven work too hard ;-)

How about create a brand new project with your performance test code in your 
src/main (not src/test).  Then fire up the bean.  Or you can even
fireup test:single goal.

the problem you see is your goal does not see test classes in your classpath.

Good luck.

-Dan



On Thu, 24 Feb 2005 15:54:54 -0700, Chad Woolley
<li...@thewoolleyweb.com> wrote:
> I was unable to get core:useBean and core:invoke to invoke a class that
> lives in my project's test dir.  I kept getting class not found
> exceptions.  Anyone know how to do this?  Here's my painful, ugly
> workaround using ant:exec:
> 
>     <goal name="testperformance:captioningresponse">
>          <j:set var="maven.test.skip" value="true"/>
>          <attainGoal name="test:compile"/>
>             <property name="maven.dependency.classpath"
> refid="maven.dependency.classpath"/>
> 
>             <property name="fullclasspath"
> value="${maven.build.dest}${path.separator}${maven.test.dest}${path.separator}${maven.dependency.classpath}"/>
>             <!--
>             <echo>!!!! fullclasspath=${fullclasspath}</echo>
>             -->
> 
>        <!-- NOTE: this assumes you already have the war deployed and
> running at the proper place -->
>        <!--  Couldn't get useBean/invoke to work, never could find class
>                <j:useBean var="testPerformanceCaptioningResponse"
> 
> class="com.vms.ccgateway.test.performance.TestPerformanceCaptioningResponse"
> 
>                           />
>                <j:invoke method="performTest"
>                          on="${testPerformanceCaptioningResponse}"/>
>                -->
>                <ant:exec executable="java.exe">
>                  <arg line="-cp '${fullclasspath}'
> com.vms.ccgateway.test.performance.TestPerformanceCaptioningResponse"/>
>                </ant:exec>
>     </goal>
> 
> Thanks,
> Chad
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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