Re: Contextualizable implemented, but not invoked

2007-06-27 Thread Jochen Wiedmann

On 6/27/07, Kenney Westerhof <[EMAIL PROTECTED]> wrote:


That must be it then, though I don't know how you get a mojo
to be run, declared as an extension..


I am simply following the section on "Specifying a New Packaging" from

  http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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



Re: Contextualizable implemented, but not invoked

2007-06-27 Thread Kenney Westerhof


That must be it then, though I don't know how you get a mojo
to be run, declared as an extension..


Btw, i hoped for the output to name the realm, but this apparently is
maven 2.0.x. if you could typecast the classloader to ClassRealm
and then call 'getId()' on it, I think you'll find it prints 'extensions' or 
similar.

So it looks like the filtering isn't applied to the extensions, only to 
plugins..

-- Kenney



Jochen Wiedmann wrote:

More info: I cannot reproduce the problem with another Mojo, which
isn't declared as an extension.



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



Re: Contextualizable implemented, but not invoked

2007-06-26 Thread Jochen Wiedmann

More info: I cannot reproduce the problem with another Mojo, which
isn't declared as an extension.

--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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



Re: Contextualizable implemented, but not invoked

2007-06-26 Thread Jochen Wiedmann

On 6/26/07, Kenney Westerhof <[EMAIL PROTECTED]> wrote:


Can you add

static { System.out.println( "XXX " + Contextualizable.class + ": " + 
Contextualizable.class.getClassLoader() ); }

to your mojo and see what it prints?


Here's the output:

   XXX interface
org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable:
   [EMAIL PROTECTED]

I've been having a second though: My Mojo is declared as an extension.
Could that be related?

Thanks,

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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



Re: Contextualizable implemented, but not invoked

2007-06-26 Thread Kenney Westerhof



Jochen Wiedmann wrote:

On 6/26/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:


It must be being pulled in by a dep in the mojo. Is this something
that I can see?


Unfortunately not yet. Shall I file a Jira issue with some sample code?



Can you add

static { System.out.println( "XXX " + Contextualizable.class + ": " + 
Contextualizable.class.getClassLoader() ); }

to your mojo and see what it prints?

-- Kenney




Thanks,

Jochen




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



Re: Contextualizable implemented, but not invoked

2007-06-26 Thread Jochen Wiedmann

On 6/26/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:


It must be being pulled in by a dep in the mojo. Is this something
that I can see?


Unfortunately not yet. Shall I file a Jira issue with some sample code?

Thanks,

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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



Re: Contextualizable implemented, but not invoked

2007-06-25 Thread Jason van Zyl


On 25 Jun 07, at 10:16 PM 25 Jun 07, Jochen Wiedmann wrote:


Hi,

from using the debugger, I now know that the Contextualizable
interface in use by the Maven core is from the maven-2.0.7 uber jar,
as suspected. From the jar files info
(META-INF/maven/.../plexus-container-default), this is version
1.0-alpha-9-stable-1, the same version I am using. Nevertheless, I
still seem to receive it via another classloader. Any ideas, what I
could change?



It must be being pulled in by a dep in the mojo. Is this something  
that I can see?


I've also added this:

http://jira.codehaus.org/browse/MNG-3071

So that the classloader contents can be dumped clearly, so that you  
don't have the trace through -X or use a debugger.



Thanks,

Jochen

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




Thanks,

Jason

--
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
--




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



Re: Contextualizable implemented, but not invoked

2007-06-25 Thread Jochen Wiedmann

Hi,

from using the debugger, I now know that the Contextualizable
interface in use by the Maven core is from the maven-2.0.7 uber jar,
as suspected. From the jar files info
(META-INF/maven/.../plexus-container-default), this is version
1.0-alpha-9-stable-1, the same version I am using. Nevertheless, I
still seem to receive it via another classloader. Any ideas, what I
could change?

Thanks,

Jochen

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



Re: Contextualizable implemented, but not invoked

2007-06-25 Thread Jason van Zyl


On 25 Jun 07, at 4:11 PM 25 Jun 07, Jochen Wiedmann wrote:


On 6/26/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:


You probably have the plexus double jar problem. We separated the API
and implementation JARs and you're pulling in an old version of
plexus which has everything and then plugin which must be pulling in
the API jar. Because they come from different classloaders the
instanceof fails and the method for the lifecycle phase is not
executed. I'm trying to fix this. Make sure you're using the
container used for 2.0.7 itself, so use -X and make sure you're not
pulling in anything newer.


Sounds reasonable. What artifactId do I have to look for?
plexus-container-default? Currently I have 1.0-alpha-9-stable-1
configured, but I can see, that 1.0-alpha-8 and 1.0-alpha-9 seem to
come into play. Which one's the right one?

Apart from that: What'll happen in the future, if Maven changes its  
version?




I can't remember and I'm about to take off but you can check the  
repository for the point it changed. I don't believe it happened  
before alpha-15. What I'm doing to correct it is to aggregrate it  
back into one JAR. I only want one plexus JAR for general  
consumption. The separate is good for development but we didn't think  
carefully enough about what the two JARs would do in practice.



Thanks,

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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




Thanks,

Jason

--
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
--




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



Re: Contextualizable implemented, but not invoked

2007-06-25 Thread Jochen Wiedmann

On 6/26/07, Jason van Zyl <[EMAIL PROTECTED]> wrote:


You probably have the plexus double jar problem. We separated the API
and implementation JARs and you're pulling in an old version of
plexus which has everything and then plugin which must be pulling in
the API jar. Because they come from different classloaders the
instanceof fails and the method for the lifecycle phase is not
executed. I'm trying to fix this. Make sure you're using the
container used for 2.0.7 itself, so use -X and make sure you're not
pulling in anything newer.


Sounds reasonable. What artifactId do I have to look for?
plexus-container-default? Currently I have 1.0-alpha-9-stable-1
configured, but I can see, that 1.0-alpha-8 and 1.0-alpha-9 seem to
come into play. Which one's the right one?

Apart from that: What'll happen in the future, if Maven changes its version?

Thanks,

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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



Re: Contextualizable implemented, but not invoked

2007-06-25 Thread Jason van Zyl


On 25 Jun 07, at 3:01 PM 25 Jun 07, Jochen Wiedmann wrote:


Hi,

I've got a Mojo, which implements the Contextualizable interface.
However, the contextualizable(Context) method is not invoked: When
running maven-2.0.7 in the debugger, I can watch that the
ContextualizePhase is executed, but the check "object instanceof
Contextualizable" fails.

Any ideas, what I am doing wrong?



You probably have the plexus double jar problem. We separated the API  
and implementation JARs and you're pulling in an old version of  
plexus which has everything and then plugin which must be pulling in  
the API jar. Because they come from different classloaders the  
instanceof fails and the method for the lifecycle phase is not  
executed. I'm trying to fix this. Make sure you're using the  
container used for 2.0.7 itself, so use -X and make sure you're not  
pulling in anything newer.



Thanks,

Jochen


--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

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




Thanks,

Jason

--
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
--




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