You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dominic Sisneros <do...@sisna.com> on 2003/02/19 07:04:44 UTC

jelly:bsf tags and maven

Does anyone know how to use bsf with Maven.  Specifically, I want to use
jython

Example maven

<project
	xmlns:j="jelly:core"
	xmlns:m="jelly:maven"
	xmlns:b="jelly:bsf">

j:set var="foo.bar" value="hello"/>




<goal name="mytest">
<b:jython><![CDATA[
print "hello world"
context.setVariable("foo.bar", "worked");
</b:jython>

<echo>${foo.bar}</echo>
</goal>

------------

outputs
mytest:
<jython:jython>print "foo.bar"
	context.setVariable("foo.bar","worked");</jython:jython>  [echo] hello


Re: How to build aspectj source in maven

Posted by greenlaw110 <gr...@hotmail.com>.
I got the anwser, it is due to my typo! "public * com.chinatm..*(..)" should be "public * com.chinatmn..*(..)"

Sorry.

----- Original Message ----- 
From: "greenlaw110" <gr...@hotmail.com>
To: "Turbine Maven Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, February 19, 2003 2:55 PM
Subject: How to build aspectj source in maven


> Hi, 
> 
> I want to test aspectj by add a Trace.java code to the aspectj source directory.
> package myPackage;
> 
> public aspect Trace
> {
>  pointcut publicMethods() : execution(public * com.chinatm..*(..));
> 
>  pointcut logObjectCalls() : execution(* ILogger.*(..));
>     
>  pointcut loggableCalls() : publicMethods() && ! logObjectCalls();
> 
>  before() : loggableCalls()
>  {
>   System.out.println("Enter->" + thisJoinPoint.getSignature().toString());
>  }
> 
>  after() : loggableCalls()
>  {
>   System.out.println("Exit->" + thisJoinPoint.getSignature().toString());
>  }
> 
> }
> 
> I have added <aspectSourceDirectory>src/aspectj</aspectSourceDirectory> to the project.xml file. Then I type maven clean aspectj jar. The build process is success. However, I found no java source code is weaved by the aspectj code.
> 
> Then I move all source file from src/java to src/aspectj. The result is same. Can anyone tell me where I am wrong. Thx!
> 
> Green
> 

How to build aspectj source in maven

Posted by greenlaw110 <gr...@hotmail.com>.
Hi, 

I want to test aspectj by add a Trace.java code to the aspectj source directory.
package myPackage;

public aspect Trace
{
 pointcut publicMethods() : execution(public * com.chinatm..*(..));

 pointcut logObjectCalls() : execution(* ILogger.*(..));
    
 pointcut loggableCalls() : publicMethods() && ! logObjectCalls();

 before() : loggableCalls()
 {
  System.out.println("Enter->" + thisJoinPoint.getSignature().toString());
 }

 after() : loggableCalls()
 {
  System.out.println("Exit->" + thisJoinPoint.getSignature().toString());
 }

}

I have added <aspectSourceDirectory>src/aspectj</aspectSourceDirectory> to the project.xml file. Then I type maven clean aspectj jar. The build process is success. However, I found no java source code is weaved by the aspectj code.

Then I move all source file from src/java to src/aspectj. The result is same. Can anyone tell me where I am wrong. Thx!

Green

Re: jelly:bsf tags and maven

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Pete Kazmier" <pe...@kazmier.com>
> >>>>> Dominic Sisneros writes:
>
> Dominic> Yes, I have bsf and jython.jar as dependencies.  I am able to
> Dominic> do a script using the beanshell (jelly:beanshell) tag but
> Dominic> don't know how to do the same with jelly:bsf and jython.
>
> I tried this very same thing recently; however, it does not appear
> that the jelly bsf taglib supports fully blown scripts, but only
> single expressions (jt and I briefly looked at it).  As it wasn't
> important to me, I didn't spend much time looking into this, but I
> think its a question for the jelly folks.
>
> If you find anything, please post to the list as I'm interested.

I had a small amount of free time today so I've hacked together a <script>
tag in the BSF library which should be usable from any BSF language
(JavaScript, Jython, Jacl, PNuts etc). Its in Jelly CVS HEAD right now in
jelly/jelly-tags/bsf

Though big disclaimer - I've not had a chance to write any unit test cases
or even try it out yet! :(.
If you fancy trying it out and seeing if it works I'd be very grateful.

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: jelly:bsf tags and maven

Posted by Pete Kazmier <pe...@kazmier.com>.
>>>>> Dominic Sisneros writes:

Dominic> Yes, I have bsf and jython.jar as dependencies.  I am able to
Dominic> do a script using the beanshell (jelly:beanshell) tag but
Dominic> don't know how to do the same with jelly:bsf and jython.

I tried this very same thing recently; however, it does not appear
that the jelly bsf taglib supports fully blown scripts, but only
single expressions (jt and I briefly looked at it).  As it wasn't
important to me, I didn't spend much time looking into this, but I
think its a question for the jelly folks.  

If you find anything, please post to the list as I'm interested.

Thanks,
Pete


RE: jelly:bsf tags and maven

Posted by Dominic Sisneros <do...@sisna.com>.
Yes,
I have bsf and jython.jar as dependencies.  I am able to do a script using
the beanshell (jelly:beanshell) tag
but don't know how to do the same with jelly:bsf and jython.

thanks in advance

Dominic

-----Original Message-----
From: dion@multitask.com.au [mailto:dion@multitask.com.au]
Sent: Tuesday, February 18, 2003 11:09 PM
To: Turbine Maven Users List
Subject: Re: jelly:bsf tags and maven


Did you add BSF and it's required jar files as <dependencies> in your
project.xml?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


"Dominic Sisneros" <do...@sisna.com> wrote on 19/02/2003 05:04:44 PM:

> Does anyone know how to use bsf with Maven.  Specifically, I want to use
> jython
>
> Example maven
>
> <project
>    xmlns:j="jelly:core"
>    xmlns:m="jelly:maven"
>    xmlns:b="jelly:bsf">
>
> j:set var="foo.bar" value="hello"/>
>
>
>
>
> <goal name="mytest">
> <b:jython><![CDATA[
> print "hello world"
> context.setVariable("foo.bar", "worked");
> </b:jython>
>
> <echo>${foo.bar}</echo>
> </goal>
>
> ------------
>
> outputs
> mytest:
> <jython:jython>print "foo.bar"
>    context.setVariable("foo.bar","worked");</jython:jython>  [echo]
hello
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-maven-user-help@jakarta.apache.org
>


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



Re: jelly:bsf tags and maven

Posted by di...@multitask.com.au.
Did you add BSF and it's required jar files as <dependencies> in your 
project.xml?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


"Dominic Sisneros" <do...@sisna.com> wrote on 19/02/2003 05:04:44 PM:

> Does anyone know how to use bsf with Maven.  Specifically, I want to use
> jython
> 
> Example maven
> 
> <project
>    xmlns:j="jelly:core"
>    xmlns:m="jelly:maven"
>    xmlns:b="jelly:bsf">
> 
> j:set var="foo.bar" value="hello"/>
> 
> 
> 
> 
> <goal name="mytest">
> <b:jython><![CDATA[
> print "hello world"
> context.setVariable("foo.bar", "worked");
> </b:jython>
> 
> <echo>${foo.bar}</echo>
> </goal>
> 
> ------------
> 
> outputs
> mytest:
> <jython:jython>print "foo.bar"
>    context.setVariable("foo.bar","worked");</jython:jython>  [echo] 
hello
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
turbine-maven-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
turbine-maven-user-help@jakarta.apache.org
>