Your jelly code seems wrong.
You have to declare your namespace in the tag project :

<project xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:x="jelly:xml"
xmlns:ant="jelly:ant" xmlns:maven="jelly:maven"...>
 
</project>

Your class is in your project ? Thus you have to build it before to call
your goal (with the jar goal for example).
 
I think that your classes are defined in the default classloader.

Arnaud


diyfiesta wrote:
> 
> Hey Folks,
> 
> Any tips / pointers for calling Java code from Jelly / Maven's maven.xml?
> I'm having classpath issues and don't want to expose it as a plugin,
> rather just call it from maven.xml...
> 
> ta
> 
> 
> diyfiesta wrote:
>> 
>> Hi Folks,
>> 
>> I've writen a POJO to do something useful and wanted to use it as part of
>> my
>> build. So I thought I'd try and kick it off form the maven.xml.
>> 
>> So, I did something similar to this;
>> 
>>     <goal name="myGoal">
>>         <j:jelly xmlns:j="jelly:core" xmlns:define="jelly:define"
>> xmlns:my="myTag">
>>             <define:taglib uri="myTag">
>>                 <define:jellybean name="foo" className="com.foo.MyTask"
>>                     method="execute"/>
>>               </define:taglib>
>>             <my:foo x="x" outputDir="docs" />
>>         </j:jelly>
>>     </goal>
>> 
>> But I get ClassNotFoundException for com.foo.MyTask, which I guess is
>> reasonable as I havn't set the classpath. I spotted you can add a
>> Classloader attribute to the jellybean element, but I wouldn't know what
>> to
>> set this to...
>> 
>> So, can I call Java from maven.xml or do I have to create a new plugin?
>> 
>> I don't want to create a new maven plugin if I can help it (I want this
>> utility class as part of my application rather than a seperate source
>> tree).
>> 
>> Thanks in advance,
>> -- 
>> Toby
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%7Bm1%7D-running-java-from-maven.xml-tf3022149s177.html#a8446714
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to