Re: [m2] maven-exec-plugin:java command line launch

2006-12-27 Thread Jerome Lacoste

On 12/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -Original Message-
 From: Wayne Fay [mailto:[EMAIL PROTECTED]
====


 Your problem is that exec.arguments is a List of String
 objects, and you can only pass a single String object in from
 the command line.




FYI, the next release of the exec plugin (1.1) contains a change that allows
passing args on the command line (the command line argument is now called
exec.args).

Please try the latest 1.1-snapshot which contains the feature. You will find
it under:

http://snapshots.repository.codehaus.org

Also follow the mojo user list (user@mojo.codehaus.org) for reporting issues
with the plugin.

Cheers and Happy New Year,

Jerome


RE: [m2] maven-exec-plugin:java command line launch

2006-12-07 Thread Peter . Pilgrim
 -Original Message-
 From: Wayne Fay [mailto:[EMAIL PROTECTED] 
====

 
 Your problem is that exec.arguments is a List of String 
 objects, and you can only pass a single String object in from 
 the command line.
 
 Unless someone knows how to pass an array of Strings from the 
 CLI (I've never seen that this was possible), you can't do 
 what you're trying to do from the CLI. You'll need to set up 
 profiles or something to achieve this.
 
Thanks Wayne.

So there is a bug in the plugin/mojo. It needs an additional parameter
and logic. So setting a profile is probably the best thing to do for
now.

e.g.

profile
idregenerate-pom/id
properties
java.program
com.acme.cartoons.BugsBunnyProgram
/java.program
/properties
/profile

profile
idpilgripe/id
properties
samba.internal.repository.dir
U:\internal\maven-repository
/samba.internal.repository.dir
/properties
activation
property
nameuser.name/name
valuepilgripe/value
/property
/activation
/profile


 On 12/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  Hi
 
  I am looking at Maven Exec Plugin. I found that the command line 
  option is problematic with arguments:
 
  convertermvn exec:java
  -Dexec.mainClass=com.ubs.firc.ptsp.research.Converter
  -Dexec.arguments=C:\foo\bar
 
  [INFO] Scanning for projects...
  [INFO] Searching repository for plugin with prefix: 'exec'.
  [INFO]
  
 --
  --
  -
  ---
  [INFO] Building Maven PTSP Repository Converter Tool
  [INFO]task-segment: [exec:java]
  [INFO]
  
 --
  --
  -
  ---
  [INFO] Preparing exec:java
  [INFO] No goals needed for project - skipping ...
 
  [INFO]
  
 --
  --
  [ERROR] BUILD ERROR
  [INFO]
  
 --
  -- [INFO] Failed to configure plugin parameters for:
  org.codehaus.mojo:exec-maven-p
  lugin:1.0.2
 
  on the command line, specify: '-Dexec.arguments=VALUE'
 
  Cause: Cannot assign configuration entry 'arguments' to 'class 
  [Ljava.lang.String;' from '${exec.arguments}', which is of 
 type class 
  java.lang.String
 
  However it does work when I set a configuration inside the POM.
  How can I pass arguments to maven-exec-plugin (java goal) with the 
  command line?
 
  How can you configure multiple the POM configured executions?
 
  --
  Peter Pilgrim
  UBS Investment Bank,
  PTS Portal / IT FIRC OPS LDN,
  100 Liverpool Street, London EC2M 2RH, United Kingdom
  +44 (0) 20 75 75692
  :: Java EE / E-Commerce / Enterprise Integration / Development ::
 
  Visit our website at http://www.ubs.com
 
  This message contains confidential information and is intended only 
  for the individual named.  If you are not the named addressee you 
  should not disseminate, distribute or copy this e-mail.  
 Please notify 
  the sender immediately by e-mail if you have received this 
 e-mail by 
  mistake and delete this e-mail from your system.
 
  E-mail transmission cannot be guaranteed to be secure or 
 error-free as 
  information could be intercepted, corrupted, lost, 
 destroyed, arrive 
  late or incomplete, or contain viruses.  The sender 
 therefore does not 
  accept liability for any errors or omissions in the 
 contents of this 
  message which arise as a result of e-mail transmission.  If 
  verification is required please request a hard-copy version.  This 
  message is provided for informational purposes and should not be 
  construed as a solicitation or offer to buy or sell any 
 securities or 
  related financial instruments.
 
 
  
 -
  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]
 
 
--
Peter Pilgrim
UBS Investment Bank, 
PTS Portal / IT FIRC OPS LDN,
100 Liverpool Street, London EC2M 2RH, United Kingdom
+44 (0) 20 75 75692
:: Java EE / E-Commerce / Enterprise Integration / Development ::

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or 

Re: [m2] maven-exec-plugin:java command line launch

2006-12-06 Thread Wayne Fay

Your problem is that exec.arguments is a List of String objects, and
you can only pass a single String object in from the command line.

Unless someone knows how to pass an array of Strings from the CLI
(I've never seen that this was possible), you can't do what you're
trying to do from the CLI. You'll need to set up profiles or something
to achieve this.

Wayne

On 12/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi

I am looking at Maven Exec Plugin. I found that the command line
option is problematic with arguments:

convertermvn exec:java
-Dexec.mainClass=com.ubs.firc.ptsp.research.Converter
-Dexec.arguments=C:\foo\bar

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

-
---
[INFO] Building Maven PTSP Repository Converter Tool
[INFO]task-segment: [exec:java]
[INFO]

-
---
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
...

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to configure plugin parameters for:
org.codehaus.mojo:exec-maven-p
lugin:1.0.2

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

Cause: Cannot assign configuration entry 'arguments' to 'class
[Ljava.lang.String;' from '${exec.arguments}', which is of type class
java.lang.String

However it does work when I set a configuration inside the POM.
How can I pass arguments to maven-exec-plugin (java goal) with the
command line?

How can you configure multiple the POM configured executions?

--
Peter Pilgrim
UBS Investment Bank,
PTS Portal / IT FIRC OPS LDN,
100 Liverpool Street, London EC2M 2RH, United Kingdom
+44 (0) 20 75 75692
:: Java EE / E-Commerce / Enterprise Integration / Development ::

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


-
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]