how to use maven exec plugin with modules?

2023-10-18 Thread Siddharth Jain
I am developing an application using Java modules. when i try to run it
using exec:java it seems the exec-plugin adds all dependencies to the
classpath. i verified this using the -X option. the behavior expected is
the modularized dependencies should be added to the module path. i am using
plugin version 3.1.0.

how its impacting me: I am using ServiceLoader to load some services and it
cannot find any services because the dependencies end up on classpath
instead of modulepath.

according to this post:
https://github.com/mojohaus/exec-maven-plugin/issues/90

the plugin should support modulepath but it does not seem like so.

I also tried using exec:exec with -Dexec.args="%modulepath" as described
here

but that gives exception.

also read this:
https://stackoverflow.com/questions/70250835/maven-exec-plugins-modulepath-does-not-appear-to-work

can someone explain me how to run a modularized application using the exec
plugin?

also related: https://issues.apache.org/jira/browse/MNG-7855 (this is for
the compiler plugin but mentioning fyi)


How to use Vector API with Maven Exec Plugin

2023-08-21 Thread Siddharth Jain
>
>
> Hello,


How can I use the Vector API with maven exec plugin? I compiled my project
with these settings and it worked fine:

org.apache.maven.plugins
maven-compiler-plugin

20
20

--enable-preview
--add-modules
jdk.incubator.vector


20




But when I try to run it using mvn exec:java I get this error:
java.lang.ClassNotFoundException: jdk.incubator.vector.Vector

My exec plugin configuration looks like this: I have tried many variations
but nothing seems to work. Please help!

org.codehaus.mojo
exec-maven-plugin
3.1.0



java




com.mycompany.app.App

--enable-preview 
--add-modules jdk.incubator.vector 





[ANN] Maven Exec Plugin 1.3.2 Released

2014-07-27 Thread Dan Tran
Hi,

The Mojo team is pleased to announce the release of the exec-maven-plugin
version 1.3.2.

This plugin provides 2 goals to help execute system and Java programs.

http://mojo.codehaus.org/exec-maven-plugin/
http://mojo.codehaus.org/build-helper-maven-plugin/

To get this update, simply specify the version in your project's plugin
configuration:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.3.2/version
/plugin

Release Notes
*https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11240version=20533
https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11240version=20533*

Enjoy,

The Mojo team.


[ANN] Maven Exec Plugin 1.3.1 Released

2014-06-10 Thread Dan Tran
Hi,

The Mojo team is pleased to announce the release of the exec-maven-plugin
version 1.3.1.

This plugin provides 2 goals to help execute system and Java programs.

http://mojo.codehaus.org/exec-maven-plugin/
http://mojo.codehaus.org/build-helper-maven-plugin/

To get this update, simply specify the version in your project's plugin
configuration:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.3.1/version
/plugin

Release Notes
*http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11240version=20347
http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11240version=20347*

Enjoy,

The Mojo team.


Re: maven-exec-plugin

2013-06-07 Thread Stephen Connolly
Ok, I'll bite...

Martin, I know your responses are usually, to my mind at least, slightly
off with respect to the question asked, but i can usually find some
connection.

In this case, however, i have to ask how on earth do you think this has
*any* relevance to the question about Subversion?

On Thursday, 6 June 2013, Martin Gainty wrote:

 setup a ssh repository in distribution-management
 http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html

 then you can 'pull' the necessary SSH artifacts by referencing them inside
 the build extension

 Martin Gainty
 __
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
 destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
 de ceci est interdite. Ce message sert à l'information seulement et n'aura
 pas n'importe quel effet légalement obligatoire. Étant donné que les email
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
 aucune responsabilité pour le contenu fourni.


  Date: Thu, 6 Jun 2013 15:18:12 +0530
  Subject: maven-exec-plugin
  From: 06v...@gmail.com javascript:;
  To: users@maven.apache.org javascript:;
 
  Hi,
  I am having a problem in using maven-exec-plugin. I have requirement
 that i
  need to use SVN MOVE command to rename labels. Since SCM does not support
  MOVE svn tags/labels i am using maven-exec-plugin to rename svn tags
 with
  required arguments including svn username and password. The problem i am
  facing is, this exec plugin is able to rename the labels, but in the
 build
  log, it shows the entire exec plugin command in plain text what i have
 set,
  since i am passing even password also, it also displays password in plain
  text. Is there any way i can mask some parameters which i want to aovid
  being displayed in plain text. Or is there any bettern plugin i can use
 to
  meet my requirement? Any pointers for this?
 
  THanks
  Virg




-- 
Sent from my phone


Re: maven-exec-plugin

2013-06-07 Thread Baptiste MATHUS
Well, I sometimes have doubts, but I *think* Martin is a bot, isn't it?

I seem to remember some threads about it in the past.
Or someone having fun trying to look slightly in the field of the answer
but just dragging people into things they will just lose time with?

Cheers


2013/6/7 Stephen Connolly stephen.alan.conno...@gmail.com

 Ok, I'll bite...

 Martin, I know your responses are usually, to my mind at least, slightly
 off with respect to the question asked, but i can usually find some
 connection.

 In this case, however, i have to ask how on earth do you think this has
 *any* relevance to the question about Subversion?

 On Thursday, 6 June 2013, Martin Gainty wrote:

  setup a ssh repository in distribution-management
 
 http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
 
  then you can 'pull' the necessary SSH artifacts by referencing them
 inside
  the build extension
 
  Martin Gainty
  __
  Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
  Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
 unbefugte
  Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
  dient lediglich dem Austausch von Informationen und entfaltet keine
  rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
  E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 
  Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
 le
  destinataire prévu, nous te demandons avec bonté que pour satisfaire
  informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
 copie
  de ceci est interdite. Ce message sert à l'information seulement et
 n'aura
  pas n'importe quel effet légalement obligatoire. Étant donné que les
 email
  peuvent facilement être sujets à la manipulation, nous ne pouvons
 accepter
  aucune responsabilité pour le contenu fourni.
 
 
   Date: Thu, 6 Jun 2013 15:18:12 +0530
   Subject: maven-exec-plugin
   From: 06v...@gmail.com javascript:;
   To: users@maven.apache.org javascript:;
  
   Hi,
   I am having a problem in using maven-exec-plugin. I have requirement
  that i
   need to use SVN MOVE command to rename labels. Since SCM does not
 support
   MOVE svn tags/labels i am using maven-exec-plugin to rename svn tags
  with
   required arguments including svn username and password. The problem i
 am
   facing is, this exec plugin is able to rename the labels, but in the
  build
   log, it shows the entire exec plugin command in plain text what i have
  set,
   since i am passing even password also, it also displays password in
 plain
   text. Is there any way i can mask some parameters which i want to aovid
   being displayed in plain text. Or is there any bettern plugin i can use
  to
   meet my requirement? Any pointers for this?
  
   THanks
   Virg
 



 --
 Sent from my phone




-- 
Baptiste Batmat MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !


maven-exec-plugin

2013-06-07 Thread Stephen Connolly
Unless you have hard evidence that Martin is in actual fact a bot, it is
quite insulting to imply that he is one... a trap I have fallen into myself.

In the interest of fostering a welcoming community, please cease and desist
from referring to Martin as a bot... we can all have our own private
suspicions one way or the other, but they should remain private.

Apache is about community over code. I would hate to think that we alienate
somebody because we find their contributions off the wall

Keep in mind that the phrase There are no stupid questions, only stupid
answers is not strictly true.

An answer that appears stupid may actually point to a critical issue on our
side where we are failing to document something or failing to make some
aspect of Maven clear... just as questions that appear stupid can highlight
the flaws in your presentation that lead to the question, answers that
appear stupid can highlight the flaws in either the triggering question or
the flaws in the presentation that lead to the triggering question.

When I see answers from Martin *and* I can see the connection to the
question asked I look for reasons why Martin might think that his was a
relevant answer, usually this points me to the lack of documentation on
maven (something I want to fix but lack the time)... in this case I am
stumped, hence why I asked.


On 7 June 2013 10:45, Baptiste MATHUS
bmat...@batmat.netjavascript:_e({}, 'cvml', 'bmat...@batmat.net');
 wrote:

 Well, I sometimes have doubts, but I *think* Martin is a bot, isn't it?

 I seem to remember some threads about it in the past.
 Or someone having fun trying to look slightly in the field of the answer
 but just dragging people into things they will just lose time with?

 Cheers


 2013/6/7 Stephen Connolly stephen.alan.conno...@gmail.comjavascript:_e({}, 
 'cvml', 'stephen.alan.conno...@gmail.com');
 

  Ok, I'll bite...
 
  Martin, I know your responses are usually, to my mind at least, slightly
  off with respect to the question asked, but i can usually find some
  connection.
 
  In this case, however, i have to ask how on earth do you think this has
  *any* relevance to the question about Subversion?
 
  On Thursday, 6 June 2013, Martin Gainty wrote:
 
   setup a ssh repository in distribution-management
  
 
 http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
  
   then you can 'pull' the necessary SSH artifacts by referencing them
  inside
   the build extension
  
   Martin Gainty
   __
   Verzicht und Vertraulichkeitanmerkung/Note de déni et de
 confidentialité
  
   Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
   Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
  unbefugte
   Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
 Nachricht
   dient lediglich dem Austausch von Informationen und entfaltet keine
   rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
   E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
  
   Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
  le
   destinataire prévu, nous te demandons avec bonté que pour satisfaire
   informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
  copie
   de ceci est interdite. Ce message sert à l'information seulement et
  n'aura
   pas n'importe quel effet légalement obligatoire. Étant donné que les
  email
   peuvent facilement être sujets à la manipulation, nous ne pouvons
  accepter
   aucune responsabilité pour le contenu fourni.
  
  
Date: Thu, 6 Jun 2013 15:18:12 +0530
Subject: maven-exec-plugin
From: 06v...@gmail.com javascript:_e({}, 'cvml',
 '06v...@gmail.com'); javascript:;
To: users@maven.apache.org javascript:_e({}, 'cvml',
 'users@maven.apache.org'); javascript:;
   
Hi,
I am having a problem in using maven-exec-plugin. I have requirement
   that i
need to use SVN MOVE command to rename labels. Since SCM does not
  support
MOVE svn tags/labels i am using maven-exec-plugin to rename svn
 tags
   with
required arguments including svn username and password. The problem i
  am
facing is, this exec plugin is able to rename the labels, but in the
   build
log, it shows the entire exec plugin command in plain text what i
 have
   set,
since i am passing even password also, it also displays password in
  plain
text. Is there any way i can mask some parameters which i want to
 aovid
being displayed in plain text. Or is there any bettern plugin i can
 use
   to
meet my requirement? Any pointers for this?
   
THanks
Virg
  
 
 
 
  --
  Sent from my phone
 



 --
 Baptiste Batmat MATHUS - http://batmat.net
 Sauvez un arbre,
 Mangez un castor !




-- 
Sent from my phone


Re: maven-exec-plugin

2013-06-07 Thread Baptiste MATHUS
You're very right. Sorry about that.
I also believe far more that people is more important than anything else in
a community like here.

Please accept my apologies Martin.

2013/6/7 Stephen Connolly stephen.alan.conno...@gmail.com

 Unless you have hard evidence that Martin is in actual fact a bot, it is
 quite insulting to imply that he is one... a trap I have fallen into
 myself.

 In the interest of fostering a welcoming community, please cease and desist
 from referring to Martin as a bot... we can all have our own private
 suspicions one way or the other, but they should remain private.

 Apache is about community over code. I would hate to think that we alienate
 somebody because we find their contributions off the wall

 Keep in mind that the phrase There are no stupid questions, only stupid
 answers is not strictly true.

 An answer that appears stupid may actually point to a critical issue on our
 side where we are failing to document something or failing to make some
 aspect of Maven clear... just as questions that appear stupid can highlight
 the flaws in your presentation that lead to the question, answers that
 appear stupid can highlight the flaws in either the triggering question or
 the flaws in the presentation that lead to the triggering question.

 When I see answers from Martin *and* I can see the connection to the
 question asked I look for reasons why Martin might think that his was a
 relevant answer, usually this points me to the lack of documentation on
 maven (something I want to fix but lack the time)... in this case I am
 stumped, hence why I asked.


 On 7 June 2013 10:45, Baptiste MATHUS
 bmat...@batmat.netjavascript:_e({}, 'cvml', 'bmat...@batmat.net');
  wrote:

  Well, I sometimes have doubts, but I *think* Martin is a bot, isn't it?
 
  I seem to remember some threads about it in the past.
  Or someone having fun trying to look slightly in the field of the answer
  but just dragging people into things they will just lose time with?
 
  Cheers
 
 
  2013/6/7 Stephen Connolly stephen.alan.conno...@gmail.comjavascript:_e({},
 'cvml', 'stephen.alan.conno...@gmail.com');
  
 
   Ok, I'll bite...
  
   Martin, I know your responses are usually, to my mind at least,
 slightly
   off with respect to the question asked, but i can usually find some
   connection.
  
   In this case, however, i have to ask how on earth do you think this has
   *any* relevance to the question about Subversion?
  
   On Thursday, 6 June 2013, Martin Gainty wrote:
  
setup a ssh repository in distribution-management
   
  
 
 http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
   
then you can 'pull' the necessary SSH artifacts by referencing them
   inside
the build extension
   
Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de
  confidentialité
   
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
   unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
  Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit
 von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
   
Ce message est confidentiel et peut être privilégié. Si vous n'êtes
 pas
   le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
   copie
de ceci est interdite. Ce message sert à l'information seulement et
   n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les
   email
peuvent facilement être sujets à la manipulation, nous ne pouvons
   accepter
aucune responsabilité pour le contenu fourni.
   
   
 Date: Thu, 6 Jun 2013 15:18:12 +0530
 Subject: maven-exec-plugin
 From: 06v...@gmail.com javascript:_e({}, 'cvml',
  '06v...@gmail.com'); javascript:;
 To: users@maven.apache.org javascript:_e({}, 'cvml',
  'users@maven.apache.org'); javascript:;

 Hi,
 I am having a problem in using maven-exec-plugin. I have
 requirement
that i
 need to use SVN MOVE command to rename labels. Since SCM does not
   support
 MOVE svn tags/labels i am using maven-exec-plugin to rename svn
  tags
with
 required arguments including svn username and password. The
 problem i
   am
 facing is, this exec plugin is able to rename the labels, but in
 the
build
 log, it shows the entire exec plugin command in plain text what i
  have
set,
 since i am passing even password also, it also displays password in
   plain
 text. Is there any way i can mask some parameters which i want to
  aovid
 being displayed in plain text. Or is there any bettern plugin i can
  use
to
 meet my requirement? Any pointers

RE: maven-exec-plugin

2013-06-07 Thread Martin Gainty
Bots are smart, intelligent, well researched auto-response daemons

in effect Baptiste stumbled into the trap of  accidentally paying me a 
compliment

Is that what you had intended Baptiste?


If your intention is to denigrate or vilify ..you'll have to do alot better 
than that!

 

Good Luck!

Martin Gainty 
__ 

  



 Date: Fri, 7 Jun 2013 11:07:10 +0100
 Subject: maven-exec-plugin
 From: stephen.alan.conno...@gmail.com
 To: users@maven.apache.org
 
 Unless you have hard evidence that Martin is in actual fact a bot, it is
 quite insulting to imply that he is one... a trap I have fallen into myself.
 
 In the interest of fostering a welcoming community, please cease and desist
 from referring to Martin as a bot... we can all have our own private
 suspicions one way or the other, but they should remain private.
 
 Apache is about community over code. I would hate to think that we alienate
 somebody because we find their contributions off the wall
 
 Keep in mind that the phrase There are no stupid questions, only stupid
 answers is not strictly true.
 
 An answer that appears stupid may actually point to a critical issue on our
 side where we are failing to document something or failing to make some
 aspect of Maven clear... just as questions that appear stupid can highlight
 the flaws in your presentation that lead to the question, answers that
 appear stupid can highlight the flaws in either the triggering question or
 the flaws in the presentation that lead to the triggering question.
 
 When I see answers from Martin *and* I can see the connection to the
 question asked I look for reasons why Martin might think that his was a
 relevant answer, usually this points me to the lack of documentation on
 maven (something I want to fix but lack the time)... in this case I am
 stumped, hence why I asked.
 
 
 On 7 June 2013 10:45, Baptiste MATHUS
 bmat...@batmat.netjavascript:_e({}, 'cvml', 'bmat...@batmat.net');
  wrote:
 
  Well, I sometimes have doubts, but I *think* Martin is a bot, isn't it?
 
  I seem to remember some threads about it in the past.
  Or someone having fun trying to look slightly in the field of the answer
  but just dragging people into things they will just lose time with?
 
  Cheers
 
 
  2013/6/7 Stephen Connolly 
  stephen.alan.conno...@gmail.comjavascript:_e({}, 'cvml', 
  'stephen.alan.conno...@gmail.com');
  
 
   Ok, I'll bite...
  
   Martin, I know your responses are usually, to my mind at least, slightly
   off with respect to the question asked, but i can usually find some
   connection.
  
   In this case, however, i have to ask how on earth do you think this has
   *any* relevance to the question about Subversion?
  
   On Thursday, 6 June 2013, Martin Gainty wrote:
  
setup a ssh repository in distribution-management
   
  
  http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html
   
then you can 'pull' the necessary SSH artifacts by referencing them
   inside
the build extension
   
Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de
  confidentialité
   
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
   unbefugte
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese
  Nachricht
dient lediglich dem Austausch von Informationen und entfaltet keine
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
   
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas
   le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
   copie
de ceci est interdite. Ce message sert à l'information seulement et
   n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les
   email
peuvent facilement être sujets à la manipulation, nous ne pouvons
   accepter
aucune responsabilité pour le contenu fourni.
   
   
 Date: Thu, 6 Jun 2013 15:18:12 +0530
 Subject: maven-exec-plugin
 From: 06v...@gmail.com javascript:_e({}, 'cvml',
  '06v...@gmail.com'); javascript:;
 To: users@maven.apache.org javascript:_e({}, 'cvml',
  'users@maven.apache.org'); javascript:;

 Hi,
 I am having a problem in using maven-exec-plugin. I have requirement
that i
 need to use SVN MOVE command to rename labels. Since SCM does not
   support
 MOVE svn tags/labels i am using maven-exec-plugin to rename svn
  tags
with
 required arguments including svn username and password. The problem i
   am
 facing is, this exec plugin is able to rename the labels, but in the
build
 log, it shows the entire exec plugin command in plain text what i
  have
set,
 since

maven-exec-plugin

2013-06-06 Thread virg g
Hi,
I am having a problem in using maven-exec-plugin. I have requirement that i
need to use SVN MOVE command to rename labels. Since SCM does not support
MOVE svn tags/labels i am using maven-exec-plugin to rename svn tags with
required arguments including svn username and password. The problem i am
facing is, this exec plugin is able to rename the labels, but in the build
log, it shows the entire exec plugin command in plain text what i have set,
since i am passing even password also, it also displays password in plain
text. Is there any way i can mask some parameters which i want to aovid
being displayed in plain text. Or is there any bettern plugin i can use to
meet my requirement? Any pointers for this?

THanks
Virg


Re: maven-exec-plugin

2013-06-06 Thread Wolf Geldmacher

On 06.06.2013 11:48, virg g wrote:

Hi,
I am having a problem in using maven-exec-plugin. I have requirement that i
need to use SVN MOVE command to rename labels. Since SCM does not support
MOVE svn tags/labels i am using maven-exec-plugin to rename svn tags with
required arguments including svn username and password. The problem i am
facing is, this exec plugin is able to rename the labels, but in the build
log, it shows the entire exec plugin command in plain text what i have set,
since i am passing even password also, it also displays password in plain
text. Is there any way i can mask some parameters which i want to aovid
being displayed in plain text.

Not that I know of.

Wrap the call in a procedure (shell/cmd batch) on your platform of 
choice and call that instead. That way the username/passwd can be hidden 
inside the
procedure. Distribute this wrapper as part of a toolset package to the 
machines you run the build on or as part of the project.


Use of the maven-exec plugin is usually non-portable between platforms 
anyway, so you're not losing too much more.

  Or is there any bettern plugin i can use to
meet my requirement? Any pointers for this?

None that I know of.

THanks
Virg

Cheers,
Wolf

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



RE: maven-exec-plugin

2013-06-06 Thread Martin Gainty
setup a ssh repository in distribution-management 
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html

then you can 'pull' the necessary SSH artifacts by referencing them inside the 
build extension

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 
 Date: Thu, 6 Jun 2013 15:18:12 +0530
 Subject: maven-exec-plugin
 From: 06v...@gmail.com
 To: users@maven.apache.org
 
 Hi,
 I am having a problem in using maven-exec-plugin. I have requirement that i
 need to use SVN MOVE command to rename labels. Since SCM does not support
 MOVE svn tags/labels i am using maven-exec-plugin to rename svn tags with
 required arguments including svn username and password. The problem i am
 facing is, this exec plugin is able to rename the labels, but in the build
 log, it shows the entire exec plugin command in plain text what i have set,
 since i am passing even password also, it also displays password in plain
 text. Is there any way i can mask some parameters which i want to aovid
 being displayed in plain text. Or is there any bettern plugin i can use to
 meet my requirement? Any pointers for this?
 
 THanks
 Virg
  

maven-exec-plugin and VM args

2012-12-05 Thread Mark Derricutt

Hey all,

Seeing some odd behaviour with maven-exec-plugin and JVM arguments that 
seem to be eluding me. I have the following config:


plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.2.1/version
configuration
executablejava/executable
classpathScopetest/classpathScope
longClasspathtrue/longClasspath
arguments
argument-Dcom.sun.management.jmxremote -Djava.awt.headless=true -Xmx1024m
-XX:MaxPermSize=256m 
-XX:+HeapDumpOnOutOfMemoryError

/argument
argument-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

/argument

/configuration
executions
execution
idintegration-tests/id
phasetest/phase
goals
goalexec/goal
/goals
/execution
/executions

and yet when I run the plugin, I see all the arguments being passed to 
the command line of the process, but the process never seems to setup 
the debug options, or suspend the server till I connect, or update the 
permgen.


Looking at the output of ps on my Mac everything looks like it should be 
ok   am I missing something blindingly obvious?


Cheers
Mark


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



Re: maven-exec-plugin and VM args

2012-12-05 Thread Anders Hammar
I think I ran into something similar the other day. You need to put each of
the arguments in a separate argument element.

argument-Dcom.sun.management.jmxremote/argument
argument-Djava.awt.headless=true/argument
argument-Xmx1024m/argument
etc.

/Anders



On Wed, Dec 5, 2012 at 10:05 PM, Mark Derricutt m...@talios.com wrote:

 Hey all,

 Seeing some odd behaviour with maven-exec-plugin and JVM arguments that
 seem to be eluding me. I have the following config:

 plugin
 groupIdorg.codehaus.mojo/**groupId
 artifactIdexec-maven-plugin**/artifactId
 version1.2.1/version
 configuration
 executablejava/executable
 classpathScopetest/**classpathScope
 longClasspathtrue/**longClasspath
 arguments
 argument-Dcom.sun.**management.jmxremote -Djava.awt.headless=true
 -Xmx1024m
 -XX:MaxPermSize=256m -XX:+**
 HeapDumpOnOutOfMemoryError
 /argument
 argument-Xdebug -Xrunjdwp:transport=dt_socket,**
 server=y,suspend=y,address=**5005
 /argument
 
 /configuration
 executions
 execution
 idintegration-tests/id
 phasetest/phase
 goals
 goalexec/goal
 /goals
 /execution
 /executions

 and yet when I run the plugin, I see all the arguments being passed to the
 command line of the process, but the process never seems to setup the debug
 options, or suspend the server till I connect, or update the permgen.

 Looking at the output of ps on my Mac everything looks like it should be
 ok   am I missing something blindingly obvious?

 Cheers
 Mark


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




Re: maven-exec-plugin and VM args

2012-12-05 Thread Mark Derricutt

Anders,

Mmm that sounds plausible altho so far I don't seem to see any 
difference in behaviour, my ps aux output shows


amrk 6040 0.0 5.7 4054184 478464 s000 S+ 10:53am 3:57.72 /usr/bin/java 
-Dcom.sun.management.jmxremote -Djava.awt.headless=true -Xmx1024m 
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled 
-XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 
-Dconcordion.output.dir=target/concordion 
-Dsmx3.config.dir=/Users/amrk/IdeaProjects/securemx/smx3/smx3-integration/integration/../../config 
-Dsmx3.database.host=localhost -Dsmx3.database.name=smx3 
-Dintermail.enabled=true -Dintermail.password= 
-Dintermail.url=ldap://localhost:1024 
-Dintermail.user=uid=admin,ou=system -jar 
/var/folders/vx/7v3qnlc53lgbm19_nn0g59_rgn/T/maven-exec36536174902264218.jar


which all looks like it should be starting a debug session and 
suspending. hrm.


Anders Hammar wrote:


I think I ran into something similar the other day. You need to put 
each of

the arguments in a separate argument element.

argument-Dcom.sun.management.jmxremote/argument
argument-Djava.awt.headless=true/argument
argument-Xmx1024m/argument




Re: Using maven-exec-plugin as a non-reusable plugin?

2011-04-01 Thread Anders Hammar
You could always put it in a separate Maven project and declare a dependency
to that artifact for the exec plugin. But then it might be better to create
a Maven plugin instead...
If it's something simple, why not just write a Groovy script and use the
gmaven-plugin to execute it? You'll then keep it separate from your Java
code, which is what you want.

/Anders

On Thu, Mar 31, 2011 at 23:53, Andrew Robinson andrew.rw.robin...@gmail.com
 wrote:

 It is sometimes very convenient to have a java class with a main method
 used
 to help build a maven project, but one that is so specific to that project
 that it is too large of an overhead to author it as a reusable maven
 plugin.

 Using maven-exec-plugin, the class can be run, but then the question
 becomes
 who will compile it? Since the class is only used by the build, it should
 not be included in the produced artifact (jar, war, etc), but the
 maven-compiler-plugin is not written to taken configured source and
 destination directories, only to use project-wide directories.

 Is there a better solution than to just filter the classes out of the built
 artifact, or another way to build code to be used like a plugin, but
 without
 the full need to support the plugin as a reusable tool?



Using maven-exec-plugin as a non-reusable plugin?

2011-03-31 Thread Andrew Robinson
It is sometimes very convenient to have a java class with a main method used
to help build a maven project, but one that is so specific to that project
that it is too large of an overhead to author it as a reusable maven plugin.

Using maven-exec-plugin, the class can be run, but then the question becomes
who will compile it? Since the class is only used by the build, it should
not be included in the produced artifact (jar, war, etc), but the
maven-compiler-plugin is not written to taken configured source and
destination directories, only to use project-wide directories.

Is there a better solution than to just filter the classes out of the built
artifact, or another way to build code to be used like a plugin, but without
the full need to support the plugin as a reusable tool?


Re: NoClassDefFoundError when running maven-exec-plugin and Cobertura

2010-11-17 Thread PaulGee

We had the same problem. Solution was to add cobertura dependency to the
instrumented component. So, just try adding 

 dependency
  groupIdnet.sourceforge.cobertura/groupId
  artifactIdcobertura/artifactId
  version1.9.4.1/version
/dependency

to your pom and try again. Make sure cobertura version is the same as the
one used by your version of cobertura plugin (in our case it was 2.4)


-- 
View this message in context: 
http://maven.40175.n5.nabble.com/NoClassDefFoundError-when-running-maven-exec-plugin-and-Cobertura-tp103455p3268700.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: executing maven-exec-plugin twice doesn't seem to work

2009-02-13 Thread Trevor Harmon

On Feb 12, 2009, at 3:42 PM, klimane wrote:

I am trying to get a maven-exec-plugin to run two different main  
programs in

a particular order within the same build.


Have you looked at this?

http://article.gmane.org/gmane.comp.java.maven-plugins.mojo.user/1307

Trevor


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



Re: executing maven-exec-plugin twice doesn't seem to work

2009-02-13 Thread klimane

Yes, I had read that before.  I guess I was hoping that something had changed
since then.  For now it looks like we can bind the first one to an earlier
phase to guarantee the order.

Also, my other question has been resolved.  The plugin was running properly
- there was some funny stuff happening that made me think that it was the
plugin causing the problem.  However, it was my own mistake (an incorrect
variable specified in the pom) that was causing the problem.

Thanks for the info.
-- 
View this message in context: 
http://www.nabble.com/executing-maven-exec-plugin-twice-doesn%27t-seem-to-work-tp21984581p22006284.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



executing maven-exec-plugin twice doesn't seem to work

2009-02-12 Thread klimane

I am trying to get a maven-exec-plugin to run two different main programs in
a particular order within the same build.  Here's what I've got in my pom:

plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  version1.1/version
  executions
execution
  idexec-1/id
  goals
goaljava/goal
  /goals
  phasetest-compile/phase
  configuration
executablejava/executable
mainClassca.foo.CreateDatabase/mainClass 
classpathScopetest/classpathScope
  /configuration  
/execution
execution
  idexec-2/id
  goals
goaljava/goal
  /goals
  phasetest-compile/phase
  configuration
executablejava/executable
mainClassca.foo.CreateStaticData/mainClass 
classpathScopetest/classpathScope
  /configuration 
/execution
  /executions
/plugin 

What tends to happen is (if they execute in the correct order), exec-1 will
look like it executes, but it really doesn't because exec-2 fails at a part
that would have worked if exec-1 had run.  Basically if you comment out
exec-2, then exec-1 runs properly, after which you can run exec-2.  However
we need this to all work together within the same build.

So I have 2 questions:  
1 - Can anyone help me out with why exec-1 doesn't seem to execute properly
if I try to also run exec-2?  Do I just have the pom configured incorrectly?
2 - Is there a way to guarantee the order in which these are run?

-- 
View this message in context: 
http://www.nabble.com/executing-maven-exec-plugin-twice-doesn%27t-seem-to-work-tp21984581p21984581.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Problem using maven-exec-plugin exec:exec command

2008-07-21 Thread seanoc
${cxf.version}/version
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http/artifactId
version${cxf.version}/version
/dependency
!-- Jetty is needed if you're using the CXFServlet --
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http-jetty/artifactId
version${cxf.version}/version
/dependency
/dependencies
/project


Haim Ashkenazi-2 wrote:
 
 On Tue, Jul 15, 2008 at 7:14 PM, seanoc [EMAIL PROTECTED] wrote:

 I'm using maven 2.0.9

 using the pom attached I run the command, mvn exec:exec -Dserver
 I'm not sure this tells maven which execution to run. I think you have
 to either connect the executions to a phase or to a profile and then
 activate the profile as needed.
 You can also discard the execution directive and then run it with
 'mvn exec:exec', but then it'll run only one of them :)
 
 

 The following error occurs:


 [INFO] One or more required plugin parameters are invalid/missing for
 'exec:exec
 '

 [0] Inside the definition for plugin 'exec-maven-plugin' specify the
 following:

 configuration
  ...
  executableVALUE/executable
 /configuration

 -OR-

 on the command line, specify: '-Dexec.executable=VALUE'

 the  http://www.nabble.com/file/p18469173/pom.xml pom.xml snippet is:

 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
 execution
 idserver/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.server.Server/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 execution
 idclient/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.client.Client/argument
 argument./wsdl/hello_world.wsdl/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 /executions
  /plugin

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

-- 
View this message in context: 
http://www.nabble.com/Problem-using-maven-exec-plugin-exec%3Aexec-command-tp18469173p18566455.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Problem using maven-exec-plugin exec:exec command

2008-07-15 Thread seanoc

I'm using maven 2.0.9

using the pom attached I run the command, mvn exec:exec -Dserver 

The following error occurs:


[INFO] One or more required plugin parameters are invalid/missing for
'exec:exec
'

[0] Inside the definition for plugin 'exec-maven-plugin' specify the
following:

configuration
  ...
  executableVALUE/executable
/configuration

-OR-

on the command line, specify: '-Dexec.executable=VALUE'

the  http://www.nabble.com/file/p18469173/pom.xml pom.xml snippet is:

plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
 execution
 idserver/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.server.Server/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 execution
 idclient/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.client.Client/argument
 argument./wsdl/hello_world.wsdl/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 /executions
  /plugin

To reproduce add the pom to CXF wsdl_first sample and set the CXF_VERSION in
the environment





-- 
View this message in context: 
http://www.nabble.com/Problem-using-maven-exec-plugin-exec%3Aexec-command-tp18469173p18469173.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Problem using maven-exec-plugin exec:exec command

2008-07-15 Thread Haim Ashkenazi
On Tue, Jul 15, 2008 at 7:14 PM, seanoc [EMAIL PROTECTED] wrote:

 I'm using maven 2.0.9

 using the pom attached I run the command, mvn exec:exec -Dserver
I'm not sure this tells maven which execution to run. I think you have
to either connect the executions to a phase or to a profile and then
activate the profile as needed.
You can also discard the execution directive and then run it with
'mvn exec:exec', but then it'll run only one of them :)



 The following error occurs:


 [INFO] One or more required plugin parameters are invalid/missing for
 'exec:exec
 '

 [0] Inside the definition for plugin 'exec-maven-plugin' specify the
 following:

 configuration
  ...
  executableVALUE/executable
 /configuration

 -OR-

 on the command line, specify: '-Dexec.executable=VALUE'

 the  http://www.nabble.com/file/p18469173/pom.xml pom.xml snippet is:

 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
 execution
 idserver/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.server.Server/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 execution
 idclient/id
 configuration
 executablejava/executable
 arguments
 argument-classpath/argument
 classpath/
 argumentdemo.hw.client.Client/argument
 argument./wsdl/hello_world.wsdl/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 /executions
  /plugin


Bye
-- 
Haim

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



Re: Problem using maven-exec-plugin exec:exec command

2008-07-15 Thread Haim Ashkenazi
On Tue, Jul 15, 2008 at 8:10 PM, Haim Ashkenazi
[EMAIL PROTECTED] wrote:
 On Tue, Jul 15, 2008 at 7:14 PM, seanoc [EMAIL PROTECTED] wrote:

 I'm using maven 2.0.9

 using the pom attached I run the command, mvn exec:exec -Dserver
 I'm not sure this tells maven which execution to run. I think you have
 to either connect the executions to a phase or to a profile and then
 activate the profile as needed.
 You can also discard the execution directive and then run it with
 'mvn exec:exec', but then it'll run only one of them :)
Correction: You either attach the execution to a phase, or skip the
executions directive and run it manually (or put it in a profile if
you have more then one execution).

Bye
-- 
Haim

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



Re: Maven exec plugin

2008-05-10 Thread Jerome Lacoste
On Fri, May 9, 2008 at 4:50 AM, avin98 [EMAIL PROTECTED] wrote:

 I'm trying to run a shell script from a maven goal.

 Here's my definition

 build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
goals
  goalexec/goal
/goals
  /execution
/executions
configuration
  executable/bin/sh/executable
  arguments
argumentrun.sh/argument
  /arguments
/configuration
  /plugin
/plugins
  /build

 When I call mvn exec:exec I get the following error

 [INFO] One or more required plugin parameters are invalid/missing for
 'exec:exec'

 [0] inside the definition for plugin: 'exec-maven-plugin'specify the
 following:

 configuration
  ...
  executableVALUE/executable
 /configuration

 -OR-

 on the command line, specify: '-Dexec.executable=VALUE'

 [INFO]
 
 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring:
 org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing parameters:
 [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
 org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at 
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.plugin.PluginParameterException: Error
 configuring: org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing
 parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
 org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
 org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:907)
at
 org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612)
at
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421)
at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
 [INFO]
 
 [INFO] Total time: 1 second
 [INFO] Finished at: Thu May 08 19:49:56 PDT 2008
 [INFO] Final Memory: 3M/6M
 [INFO]
 



I cannot reproduce the problem (see below. I used maven 2.0.8).

* exec mojo issues are reported on the mojo user list
* please create a test case that reproduces the issuer and tell us
more of your environment

[EMAIL PROTECTED]:/tmp$ cat run.sh
echo Working
[EMAIL PROTECTED]:/tmp$ cat pom.xml
project
  modelVersion4.0.0/modelVersion
  groupIdorg.cb.maven.plugins.exec/groupId
  artifactIdtest/artifactId
  version0.1/version
  packagingjar/packaging

  build
   plugins
 plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   version1.1-beta-1/version
   executions
 execution
   goals
 goalexec/goal
   /goals
 /execution
   /executions
   configuration
 executable/bin/sh/executable
 arguments
   argumentrun.sh/argument
 /arguments
   /configuration
 /plugin
   /plugins
 /build
/project
[EMAIL PROTECTED]:/tmp$ mvn exec:exec
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] 

Maven exec plugin

2008-05-08 Thread avin98

I'm trying to run a shell script from a maven goal.

Here's my definition

build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
goals
  goalexec/goal
/goals
  /execution
/executions
configuration
  executable/bin/sh/executable
  arguments
argumentrun.sh/argument
  /arguments
/configuration
  /plugin
/plugins
  /build

When I call mvn exec:exec I get the following error

[INFO] One or more required plugin parameters are invalid/missing for
'exec:exec'

[0] inside the definition for plugin: 'exec-maven-plugin'specify the
following:

configuration
  ...
  executableVALUE/executable
/configuration

-OR-

on the command line, specify: '-Dexec.executable=VALUE'

[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring:
org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing parameters:
[Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginParameterException: Error
configuring: org.codehaus.mojo:exec-maven-plugin. Reason: Invalid or missing
parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
org.codehaus.mojo:exec-maven-plugin:1.1-beta-1:exec
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:907)
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:612)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:421)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
[INFO]

[INFO] Total time: 1 second
[INFO] Finished at: Thu May 08 19:49:56 PDT 2008
[INFO] Final Memory: 3M/6M
[INFO]



-- 
View this message in context: 
http://www.nabble.com/Maven-exec-plugin-tp17140512p17140512.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



NoClassDefFoundError when running maven-exec-plugin and Cobertura

2008-03-18 Thread Thomas Larsson
Hi,

I have configured my reporting section with the cobertura plugin, version
2.0.
I also have a maven-exec-plugin defined to setup my testdatabase during the
test-compile phase as shown below:
(notice the classpath definition. If I understand this correctly, this
configuration should make all project dependencies appear on the classpath
during the maven execution, hmm, might be on to something here. anyway...)

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
!-- Test for the existence of the database --
execution
idtest-db-exists/id
phasetest-compile/phase
goals
goalexec/goal
/goals
configuration
executablejava/executable
arguments
argument-classpath/argument
classpath /
argument

blabla.blabla.blala.DatabaseAccessVerifier
/argument
/arguments
/configuration
/execution
   /executions
  /plugin


Now when I run mvn site, I get the following stacktrace (not complete
stacktrace)

[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [exec:exec {execution: test-db-exists}]
[INFO] java.lang.NoClassDefFoundError:
net/sourceforge/cobertura/coveragedata/HasBeenInstrumented
[INFO]  at java.lang.ClassLoader.defineClass1(Native Method)
[INFO]  at java.lang.ClassLoader.defineClass(Unknown Source)
[INFO]  at java.security.SecureClassLoader.defineClass(Unknown Source)
[INFO]  at java.net.URLClassLoader.defineClass(Unknown Source)
[INFO]  at java.net.URLClassLoader.access$000(Unknown Source)
[INFO]  at java.net.URLClassLoader$1.run(Unknown Source)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at java.net.URLClassLoader.findClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[INFO] Caused by: java.lang.ClassNotFoundException:
net.sourceforge.cobertura.coveragedata.HasBeenInstrumented
[INFO]  at java.net.URLClassLoader$1.run(Unknown Source)
[INFO]  at java.security.AccessController.doPrivileged(Native Method)
[INFO]  at java.net.URLClassLoader.findClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClass(Unknown Source)
[INFO]  at java.lang.ClassLoader.loadClassInternal(Unknown Source)
[INFO]  ... 12 more
[INFO] Exception in thread main
[INFO]

[ERROR] BUILD ERROR
[INFO]




Does anyone know how I can get the exec plugin to find the cobertura
classes?

Best Regards


Is there a way to redirect the output of maven-exec plugin to a file?

2007-10-24 Thread Yan Huang
Hello,

Quick question: is there a way to direct the execution log of maven-exec
plugin (on the fly) to a file rather than the console? I think all Mojo is
using log4j property for the logging. However, if I want it to dump the log
of whatever it invokes, how can i do it? It seems to me that
the exec plugin does not provide this option?

Thanks
Yan


Re: Is there a way to redirect the output of maven-exec plugin to a file?

2007-10-24 Thread Wayne Fay
If its not obvious in the docs, it probably does not exist.

Feel free to add the functionality you need and contribute it back.

Wayne

On 10/24/07, Yan Huang [EMAIL PROTECTED] wrote:
 Hello,

 Quick question: is there a way to direct the execution log of maven-exec
 plugin (on the fly) to a file rather than the console? I think all Mojo is
 using log4j property for the logging. However, if I want it to dump the log
 of whatever it invokes, how can i do it? It seems to me that
 the exec plugin does not provide this option?

 Thanks
 Yan


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



maven-exec-plugin: Launching a main class in a module?

2007-03-23 Thread jason r tibbetts
Here's another maven-exec-plugin question: how can it be made to work in 
a multi-module project? Right now, I've added the exec plugin 
configuration to the pom.xml in my 'client' subproject, but that 
requires me to do


mvn install
mvn -f client/pom.xml exec:java

every time, and the second task will run even if the first one fails.

I can't configure the exec plugin in the top-level pom.xml, because it 
doesn't include the submodules on its classpath, and thus can't find the 
main class.


Is there any way to do this without resorting to shell scripts, which 
seems to defeat the purpose?



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



[M2] Finding the Maven exec plugin

2007-02-07 Thread Siegmann Daniel, NY
I am trying to use the exec-maven-plugin, but when I run exec:exec I get
the following:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not
exist or no valid version could be found

There is no plugin there, but there is a plugin
org.codehaus.mojo:exec-maven-plugin.

Connections to the Internet must be made through our company's web proxy,
but we have an internal Maven proxy to which our project is pointed. It
already has the exec-maven-plugin (version 1.0.2), so I'm not sure why
that's not being found.

Any ideas as to what I may have misconfigured?

--
Daniel Siegmann
FJA-US, Inc.
512 Seventh Ave., New York, NY  10018
(212) 840-2618 ext. 139

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



Re: [M2] Finding the Maven exec plugin

2007-02-07 Thread Jerome Lacoste

On 2/7/07, Siegmann Daniel, NY [EMAIL PROTECTED] wrote:


I am trying to use the exec-maven-plugin, but when I run exec:exec I get
the following:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-exec-plugin' does not
exist or no valid version could be found

There is no plugin there, but there is a plugin
org.codehaus.mojo:exec-maven-plugin.




try to fully specify the plugin on the command line. That should make sure
that maven downloads the right plugin:

mvn org.codehaus.mojo:exec-maven-plugin:exec

while you're at it, feel free to test the 1.1-SNAPSHOT release of the
plugin. Report any problem to the mojo user list / Jira.

Thanks

Jerome