Re: How to use a plexus component inside a maven report ?

2014-06-01 Thread Tony Chemit
On Sat, 31 May 2014 14:22:13 +0200
Hervé BOUTEMY herve.bout...@free.fr wrote:

 Le samedi 31 mai 2014 13:55:47 Hervé BOUTEMY a écrit :
  logical, finally: why would the plugin classpath contain actual project?
  
  And since resolution happens from workspace, I imagine that the plugin can
  get classes just after compile phase, isn't it?
 s/workspace/reactor/

So for you, this is the good way to do it ?

I would not mind to create a new lookup realm for plexus container to include 
the module target/classes.

I tried this but it did not work either. I would just need a little help on 
this code.

If someone could point me where to look, ... 

I would really that the report do his internal cooking instead of adding 
configuration in the pom.xml.

thanks,

tony.

 
  
  Regards,
  
  Hervé
  
  Le samedi 31 mai 2014 12:46:34 Tony Chemit a écrit :
   On Sat, 31 May 2014 11:19:57 +0200
   
   Hervé BOUTEMY herve.bout...@free.fr wrote:
you mean you're trying to do something like plexus:components-report
[1]?
   
   Yes
   
are you sure you generated the plexus descriptor before running the mojo
injecting implementations?
   
   Yes,
   
   project/target/classes/META-INF/plexus/components.xml is there.
   
   The maven plugin is here:
   
   http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/n
   ui ton/eugene/plugin/AbstractEugeneReport.java
   http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/n
   u
   iton/eugene/plugin/TagValueReport.java
   
   I managed to use it adding this configuration in the pluginManagement
   
 plugin
 
   groupIdorg.nuiton.eugene/groupId
   artifactIdeugene-maven-plugin/artifactId
   dependencies
   
 dependency
 
   groupId${project.groupId}/groupId
   artifactId${project.artifactId}/artifactId
   version${project.version}/version
 
 /dependency
   
   /dependencies
 
 /plugin
   
   but it look a bit strange to do this, plus it won't work if the project
   was
   never built...
   
Regards,

Hervé

[1]
http://plexus.codehaus.org/plexus-maven-plugin/components-report-mojo.ht
m
l

Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
 Hi,
 
 Let me explain my problem, hopes to find here a solution about it.
 
 I am currently writing a maven report to describe some plexus
 components.
 
 The idea is to be able to describe the components declared in the very
 same
 maven module.
 
 I tried this, it found components of the same role from the
 dependencies,
 but not the one declared in the module :
 
 @org.apache.maven.plugins.annotations.Component(role =
 TagValueDefinitionProvider.class) protected MapString,
 TagValueDefinitionProvider tagValueProviders;
 
 What did I miss ?
 
 Thanks for any help.
 
 tony.

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
  
  -
  To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
  For additional commands, e-mail: dev-h...@maven.apache.org
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org
 



-- 
Tony Chemit

tél: +33 (0) 2 40 50 29 28
http://www.codelutin.com
email: che...@codelutin.com
twitter: https://twitter.com/tchemit

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-06-01 Thread Hervé BOUTEMY
plexus:components-report is not much used AFAIK, I don't even know what it 
prints :)

I don't know what you expect to write in the report.

Regarding how to do it, In plexus:components-report and plugin-tools, the 
report is not done by loading Mojos but by reading the generated descriptor 
and displaying info.

What type of information are you expecting to report that requires loading 
classes?

Notice: i'm interested, because plugin-tools could perhaps do something 
similar for complex type parameters

Regards,

Hervé

Le dimanche 1 juin 2014 09:46:20 Tony Chemit a écrit :
 On Sat, 31 May 2014 14:22:13 +0200
 
 Hervé BOUTEMY herve.bout...@free.fr wrote:
  Le samedi 31 mai 2014 13:55:47 Hervé BOUTEMY a écrit :
   logical, finally: why would the plugin classpath contain actual project?
   
   And since resolution happens from workspace, I imagine that the plugin
   can
   get classes just after compile phase, isn't it?
  
  s/workspace/reactor/
 
 So for you, this is the good way to do it ?
 
 I would not mind to create a new lookup realm for plexus container to
 include the module target/classes.
 
 I tried this but it did not work either. I would just need a little help on
 this code.
 
 If someone could point me where to look, ...
 
 I would really that the report do his internal cooking instead of adding
 configuration in the pom.xml.
 
 thanks,
 
 tony.
 
   Regards,
   
   Hervé
   
   Le samedi 31 mai 2014 12:46:34 Tony Chemit a écrit :
On Sat, 31 May 2014 11:19:57 +0200

Hervé BOUTEMY herve.bout...@free.fr wrote:
 you mean you're trying to do something like plexus:components-report
 [1]?

Yes

 are you sure you generated the plexus descriptor before running the
 mojo
 injecting implementations?

Yes,

project/target/classes/META-INF/plexus/components.xml is there.

The maven plugin is here:

http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/o
rg/n
ui ton/eugene/plugin/AbstractEugeneReport.java
http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/o
rg/n
u
iton/eugene/plugin/TagValueReport.java

I managed to use it adding this configuration in the pluginManagement

  plugin
  
groupIdorg.nuiton.eugene/groupId
artifactIdeugene-maven-plugin/artifactId
dependencies

  dependency
  
groupId${project.groupId}/groupId
artifactId${project.artifactId}/artifactId
version${project.version}/version
  
  /dependency

/dependencies
  
  /plugin

but it look a bit strange to do this, plus it won't work if the
project
was
never built...

 Regards,
 
 Hervé
 
 [1]
 http://plexus.codehaus.org/plexus-maven-plugin/components-report-moj
 o.ht
 m
 l
 
 Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
  Hi,
  
  Let me explain my problem, hopes to find here a solution about it.
  
  I am currently writing a maven report to describe some plexus
  components.
  
  The idea is to be able to describe the components declared in the
  very
  same
  maven module.
  
  I tried this, it found components of the same role from the
  dependencies,
  but not the one declared in the module :
  
  @org.apache.maven.plugins.annotations.Component(role =
  TagValueDefinitionProvider.class) protected MapString,
  TagValueDefinitionProvider tagValueProviders;
  
  What did I miss ?
  
  Thanks for any help.
  
  tony.
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org
   
   -
   To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
   For additional commands, e-mail: dev-h...@maven.apache.org
  
  -
  To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
  For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-06-01 Thread Tony Chemit
On Sun, 01 Jun 2014 16:54:54 +0200
Hervé BOUTEMY herve.bout...@free.fr wrote:

 plexus:components-report is not much used AFAIK, I don't even know what it 
 prints :)
 
 I don't know what you expect to write in the report.

Hum you may have misundertood me.

I just want to get some plexus components, and do my stuff on it. Plexus *was* 
just the way until recently to get components in mojo.

 
 Regarding how to do it, In plexus:components-report and plugin-tools, the 
 report is not done by loading Mojos but by reading the generated descriptor 
 and displaying info.

No not my point to show stuff about plexus component, just want any instance of 
a role.

 
 What type of information are you expecting to report that requires loading 
 classes?

Everything :) More seriously, I need to call some methods on each components 
to get what I want to report. 

The @Component on a MapString, X is exaclty what I need, but still can't find 
out how to make the mojo also take account of the components of the maven 
project. 

Perharps is there is simplier way to do this now with guice ? I thing this 
could be the solution.

 
 Notice: i'm interested, because plugin-tools could perhaps do something 
 similar for complex type parameters
 

No problem, let's find a nice solution to do this :)

tony.

-- 
Tony Chemit

tél: +33 (0) 2 40 50 29 28
http://www.codelutin.com
email: che...@codelutin.com
twitter: https://twitter.com/tchemit

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-06-01 Thread Hervé BOUTEMY
Le dimanche 1 juin 2014 18:53:12 Tony Chemit a écrit :
 On Sun, 01 Jun 2014 16:54:54 +0200
 
 Hervé BOUTEMY herve.bout...@free.fr wrote:
  plexus:components-report is not much used AFAIK, I don't even know what it
  prints :)
  
  I don't know what you expect to write in the report.
 
 Hum you may have misundertood me.
 
 I just want to get some plexus components, and do my stuff on it. Plexus
 *was* just the way until recently to get components in mojo.
ok
so adding the current project to plugin dependencies is the way to go: not 
usual, but it's really what you are requiring, ie inject current project to 
plugin's classpath for it to access Plexus components declared by current 
project

and it should work even if current project hasn't been installed yet, since 
reactor content can be resolved just after compilation step
you just need to take care at which phase you'll run your plugin

 
  Regarding how to do it, In plexus:components-report and plugin-tools, the
  report is not done by loading Mojos but by reading the generated
  descriptor
  and displaying info.
 
 No not my point to show stuff about plexus component, just want any instance
 of a role.
  What type of information are you expecting to report that requires loading
  classes?
 
 Everything :) More seriously, I need to call some methods on each components
 to get what I want to report.
 
 The @Component on a MapString, X is exaclty what I need, but still can't
 find out how to make the mojo also take account of the components of the
 maven project.
 
 Perharps is there is simplier way to do this now with guice ? I thing this
 could be the solution.
 
  Notice: i'm interested, because plugin-tools could perhaps do something
  similar for complex type parameters
 
 No problem, let's find a nice solution to do this :)
it seems you're not doing at all what I expected, so I doubt this can be 
reused for plugin-tools

any idea on how to dicument complex types parameters in plugin documentation 
is welcome...

Regards,

Hervé

 
 tony.


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



How to use a plexus component inside a maven report ?

2014-05-31 Thread Tony Chemit
Hi,

Let me explain my problem, hopes to find here a solution about it.

I am currently writing a maven report to describe some plexus components.

The idea is to be able to describe the components declared in the very same 
maven module.

I tried this, it found components of the same role from the dependencies, but 
not the one declared in the module :

@org.apache.maven.plugins.annotations.Component(role = 
TagValueDefinitionProvider.class)
protected MapString, TagValueDefinitionProvider tagValueProviders;

What did I miss ?

Thanks for any help.

tony.


-- 
Tony Chemit

tél: +33 (0) 2 40 50 29 28
http://www.codelutin.com
email: che...@codelutin.com
twitter: https://twitter.com/tchemit

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-05-31 Thread Hervé BOUTEMY
you mean you're trying to do something like plexus:components-report [1]?

are you sure you generated the plexus descriptor before running the mojo 
injecting implementations?

Regards,

Hervé

[1] http://plexus.codehaus.org/plexus-maven-plugin/components-report-mojo.html

Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
 Hi,
 
 Let me explain my problem, hopes to find here a solution about it.
 
 I am currently writing a maven report to describe some plexus components.
 
 The idea is to be able to describe the components declared in the very same
 maven module.
 
 I tried this, it found components of the same role from the dependencies,
 but not the one declared in the module :
 
 @org.apache.maven.plugins.annotations.Component(role =
 TagValueDefinitionProvider.class) protected MapString,
 TagValueDefinitionProvider tagValueProviders;
 
 What did I miss ?
 
 Thanks for any help.
 
 tony.


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-05-31 Thread Tony Chemit
On Sat, 31 May 2014 11:19:57 +0200
Hervé BOUTEMY herve.bout...@free.fr wrote:

 you mean you're trying to do something like plexus:components-report [1]?

Yes
 
 are you sure you generated the plexus descriptor before running the mojo 
 injecting implementations?

Yes,

project/target/classes/META-INF/plexus/components.xml is there.

The maven plugin is here:

http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/AbstractEugeneReport.java
http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/nuiton/eugene/plugin/TagValueReport.java

I managed to use it adding this configuration in the pluginManagement

  plugin
groupIdorg.nuiton.eugene/groupId
artifactIdeugene-maven-plugin/artifactId
dependencies
  dependency
groupId${project.groupId}/groupId
artifactId${project.artifactId}/artifactId
version${project.version}/version
  /dependency
/dependencies
  /plugin

but it look a bit strange to do this, plus it won't work if the project was 
never built...

 
 Regards,
 
 Hervé
 
 [1] http://plexus.codehaus.org/plexus-maven-plugin/components-report-mojo.html
 
 Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
  Hi,
  
  Let me explain my problem, hopes to find here a solution about it.
  
  I am currently writing a maven report to describe some plexus components.
  
  The idea is to be able to describe the components declared in the very same
  maven module.
  
  I tried this, it found components of the same role from the dependencies,
  but not the one declared in the module :
  
  @org.apache.maven.plugins.annotations.Component(role =
  TagValueDefinitionProvider.class) protected MapString,
  TagValueDefinitionProvider tagValueProviders;
  
  What did I miss ?
  
  Thanks for any help.
  
  tony.
 
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org
 



-- 
Tony Chemit

tél: +33 (0) 2 40 50 29 28
http://www.codelutin.com
email: che...@codelutin.com
twitter: https://twitter.com/tchemit

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-05-31 Thread Hervé BOUTEMY
logical, finally: why would the plugin classpath contain actual project?

And since resolution happens from workspace, I imagine that the plugin can get 
classes just after compile phase, isn't it?

Regards,

Hervé

Le samedi 31 mai 2014 12:46:34 Tony Chemit a écrit :
 On Sat, 31 May 2014 11:19:57 +0200
 
 Hervé BOUTEMY herve.bout...@free.fr wrote:
  you mean you're trying to do something like plexus:components-report [1]?
 
 Yes
 
  are you sure you generated the plexus descriptor before running the mojo
  injecting implementations?
 
 Yes,
 
 project/target/classes/META-INF/plexus/components.xml is there.
 
 The maven plugin is here:
 
 http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/nui
 ton/eugene/plugin/AbstractEugeneReport.java
 http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/nu
 iton/eugene/plugin/TagValueReport.java
 
 I managed to use it adding this configuration in the pluginManagement
 
   plugin
 groupIdorg.nuiton.eugene/groupId
 artifactIdeugene-maven-plugin/artifactId
 dependencies
   dependency
 groupId${project.groupId}/groupId
 artifactId${project.artifactId}/artifactId
 version${project.version}/version
   /dependency
 /dependencies
   /plugin
 
 but it look a bit strange to do this, plus it won't work if the project was
 never built...
  Regards,
  
  Hervé
  
  [1]
  http://plexus.codehaus.org/plexus-maven-plugin/components-report-mojo.htm
  l 
  Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
   Hi,
   
   Let me explain my problem, hopes to find here a solution about it.
   
   I am currently writing a maven report to describe some plexus
   components.
   
   The idea is to be able to describe the components declared in the very
   same
   maven module.
   
   I tried this, it found components of the same role from the
   dependencies,
   but not the one declared in the module :
   
   @org.apache.maven.plugins.annotations.Component(role =
   TagValueDefinitionProvider.class) protected MapString,
   TagValueDefinitionProvider tagValueProviders;
   
   What did I miss ?
   
   Thanks for any help.
   
   tony.
  
  -
  To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
  For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: How to use a plexus component inside a maven report ?

2014-05-31 Thread Hervé BOUTEMY
Le samedi 31 mai 2014 13:55:47 Hervé BOUTEMY a écrit :
 logical, finally: why would the plugin classpath contain actual project?
 
 And since resolution happens from workspace, I imagine that the plugin can
 get classes just after compile phase, isn't it?
s/workspace/reactor/

 
 Regards,
 
 Hervé
 
 Le samedi 31 mai 2014 12:46:34 Tony Chemit a écrit :
  On Sat, 31 May 2014 11:19:57 +0200
  
  Hervé BOUTEMY herve.bout...@free.fr wrote:
   you mean you're trying to do something like plexus:components-report
   [1]?
  
  Yes
  
   are you sure you generated the plexus descriptor before running the mojo
   injecting implementations?
  
  Yes,
  
  project/target/classes/META-INF/plexus/components.xml is there.
  
  The maven plugin is here:
  
  http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/n
  ui ton/eugene/plugin/AbstractEugeneReport.java
  http://svn.nuiton.org/eugene/trunk/eugene-maven-plugin/src/main/java/org/n
  u
  iton/eugene/plugin/TagValueReport.java
  
  I managed to use it adding this configuration in the pluginManagement
  
plugin

  groupIdorg.nuiton.eugene/groupId
  artifactIdeugene-maven-plugin/artifactId
  dependencies
  
dependency

  groupId${project.groupId}/groupId
  artifactId${project.artifactId}/artifactId
  version${project.version}/version

/dependency
  
  /dependencies

/plugin
  
  but it look a bit strange to do this, plus it won't work if the project
  was
  never built...
  
   Regards,
   
   Hervé
   
   [1]
   http://plexus.codehaus.org/plexus-maven-plugin/components-report-mojo.ht
   m
   l
   
   Le samedi 31 mai 2014 10:05:06 Tony Chemit a écrit :
Hi,

Let me explain my problem, hopes to find here a solution about it.

I am currently writing a maven report to describe some plexus
components.

The idea is to be able to describe the components declared in the very
same
maven module.

I tried this, it found components of the same role from the
dependencies,
but not the one declared in the module :

@org.apache.maven.plugins.annotations.Component(role =
TagValueDefinitionProvider.class) protected MapString,
TagValueDefinitionProvider tagValueProviders;

What did I miss ?

Thanks for any help.

tony.
   
   -
   To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
   For additional commands, e-mail: dev-h...@maven.apache.org
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
 For additional commands, e-mail: dev-h...@maven.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org