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:

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

Reply via email to