Re: Can I set the classpath for a plugin?

2004-02-13 Thread David Jencks
Hi Eric,

Thanks for the suggestion.  Right now it does not seem to be applicable 
to my situation since I am running xmlbeans in the same vm as maven, so 
I think I need maven to set up the classloader for me before the plugin 
is called.  If there is no other way I may try the separate vm approach.

thanks
david jencks
On Friday, February 13, 2004, at 10:42 AM, Eric Giguere wrote:

Hi David

From your message, I'm not sure if this solution may apply but I'll 
give it a try. You can, if you can use the Ant classpath element in 
your plugin. If you need to refer to the classpath of the project 
(dependencies for instance), you still can access it and "insert" 
those entries in your new Ant classpath element using a call like :

...





...>
Instead of using the complete depencies path, you can add some smart 
jelly code to pick what you need from the complete classpath of the 
whole project.

There is a good example of using multiple dependancy path to configure 
the classpath of an ant:java call in the AspectWerkz plugin jelly 
script.

Hope it helps
Eric.


David Jencks wrote:

I'm working on a maven plugin for xmlbeans.  I need to be able to 
specify for each use of the plugin which dependencies are in the 
classloader that loads the java class used by the plugin (which is 
included in the plugin) or what is in the thread context classloader 
(I think).

Before I go off and spend hours investigating this I thought I'd ask 
if this is possible and how to do it.

Many thanks,
david jencks


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



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


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


Re: Can I set the classpath for a plugin?

2004-02-13 Thread Eric Giguere
Hi David

From your message, I'm not sure if this solution may apply but I'll 
give it a try. You can, if you can use the Ant classpath element in your 
plugin. If you need to refer to the classpath of the project 
(dependencies for instance), you still can access it and "insert" those 
entries in your new Ant classpath element using a call like :

...




...> 

Instead of using the complete depencies path, you can add some smart jelly code to pick what you need from the complete classpath of the whole project.

There is a good example of using multiple dependancy path to configure the classpath of an ant:java call in the AspectWerkz plugin jelly script.

Hope it helps
Eric.


David Jencks wrote:

I'm working on a maven plugin for xmlbeans.  I need to be able to 
specify for each use of the plugin which dependencies are in the 
classloader that loads the java class used by the plugin (which is 
included in the plugin) or what is in the thread context classloader 
(I think).

Before I go off and spend hours investigating this I thought I'd ask 
if this is possible and how to do it.

Many thanks,
david jencks


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



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


Re: Can I set the classpath for a plugin?

2004-02-13 Thread David Jencks
AFAIK this is not adequate.

Each time I use the plugin I need different stuff on the classpath.

Some background is that the xmlbeans schema compiler, each time it is 
called, makes sure everything referenced (recursively) from the schemas 
you tell it about can be processed by code.  Anything you have already 
processed needs to be available in the schema compiler classloader or 
it will generate another copy.

an example:

module A has schema A, with no references.  schema compiler compiles it 
fine.

module B has schema B which references A.  Unless the results from 
module A are available in the classloader for the schema compiler when 
compiling B, the schema compiler will generate duplicates for what id 
did for module A.

thanks
david jencks
On Friday, February 13, 2004, at 09:49 AM, [EMAIL PROTECTED] wrote:

What about using the project.xml from the plugin?  You can add 
dependencies
via the  subnode...

Is this not adequate?

-john

-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 12:52 PM
To: [EMAIL PROTECTED]
Subject: Can I set the classpath for a plugin?
I'm working on a maven plugin for xmlbeans.  I need to be able to
specify for each use of the plugin which dependencies are in the
classloader that loads the java class used by the plugin (which is
included in the plugin) or what is in the thread context classloader (I
think).
Before I go off and spend hours investigating this I thought I'd ask if
this is possible and how to do it.
Many thanks,
david jencks


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


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


RE: Can I set the classpath for a plugin?

2004-02-13 Thread CaseyJD
What about using the project.xml from the plugin?  You can add dependencies
via the  subnode...

Is this not adequate?

-john

-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 12:52 PM
To: [EMAIL PROTECTED]
Subject: Can I set the classpath for a plugin?

I'm working on a maven plugin for xmlbeans.  I need to be able to 
specify for each use of the plugin which dependencies are in the 
classloader that loads the java class used by the plugin (which is 
included in the plugin) or what is in the thread context classloader (I 
think).

Before I go off and spend hours investigating this I thought I'd ask if 
this is possible and how to do it.

Many thanks,
david jencks



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

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



Can I set the classpath for a plugin?

2004-02-13 Thread David Jencks
I'm working on a maven plugin for xmlbeans.  I need to be able to 
specify for each use of the plugin which dependencies are in the 
classloader that loads the java class used by the plugin (which is 
included in the plugin) or what is in the thread context classloader (I 
think).

Before I go off and spend hours investigating this I thought I'd ask if 
this is possible and how to do it.

Many thanks,
david jencks


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