Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-15 Thread Alexander Kriegisch
Garret,

while all of this is kind of intriguing on an academical level, it is
much more than you asked in your original question:

>>>> Now … what if I want to pass a single string "foo'bar" (note just
>>>> one single quote in the string) as a single string to my `main()`
>>>> method args array?

I think that I answered that both correctly and extensively: You do not
need to escape it, it just works. I also explained how to handle this
situation on the shell level, because your CLI samples all imply that
you must be starting at some kind of shell.

As for the simple tokeniser heuristics used in
CommandLineUtils.translateCommandline, you are correct: There is no such
thing as an escape character here. It is simply:

if ((state == inQuote) || (state == inDoubleQuote))
  throw new CommandLineException(
"unbalanced quotes in " + toProcess
  );

But really, who would build an application that would need to handle
that on the CLI input level and put their users in quoting hell? That
would be bad application design. For that kind of complexity, usually
you would refer to a text file as input for complex texts.

Bottom line: You can make Maven Exec handle program arguments like
(unquoted, one line of text is one argument):

  It's OK
  She said: "It is OK"

But not:

  She said: "It's OK"

Regards
-- 
Alexander Kriegisch
https://scrum-master.de


Garret Wilson schrieb am 15.10.2023 19:49 (GMT +07:00):

> On 10/15/2023 9:24 AM, Garret Wilson wrote:
>> On 10/15/2023 1:31 AM, Alexander Kriegisch wrote:
>>> …
>>> Let us settle on only using double quotes to enclose arguments 
>>> containing spaces. Then, we do not need to escape single quotes and 
>>> can use them literally. But we do need to escape nested double quotes.
>>
>> …
>> Just for a moment, forget about Bash/PowerShell/CMD escaping rules. 
>> What are escaping the rules of the Maven Exec Plugin? What does it 
>> consider a delimiter for indicating multiple arguments?
> 
> I guess at this point it's easier just to dig into the source code. The 
> relevant plugin source code seems to be here (after a cursory glance):
> 
> https://github.com/mojohaus/exec-maven-plugin/blob/ddefecff84ebbf6427a6bb9eb6c2fdb332bfac7c/src/main/java/org/codehaus/mojo/exec/ExecMojo.java#L600
> 
> It appears to be using `CommandLineUtils.translateCommandline( argsProp 
> )` to parse the string input into an array. A little more searching 
> seems to indicate that that utility is here:
> 
> https://github.com/codehaus-plexus/plexus-utils/blob/d4f0d2de40c5d6cb5d80c8a199fa4f32a4e59879/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java#L348C85-L348C85
> 
> That code uses `StringTokenizer` constructed using `new 
> StringTokenizer(toProcess, "\"\' ", true)`. So yes, Alexander, it does 
> indeed appear to be using both single quotes and and double quotes as 
> delimiters.
> 
> So next is the question of escaping. The 
> [documentation](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/StringTokenizer.html)
> 
> for `StringTokenizer` says nothing about escaping. I glanced (extremely 
> quickly) over the source code for `StringTokenizer`, and I don't see it 
> translating any escape sequences.
> 
> Thus if escaping is happening, it would have to be in 
> `CommandLineUtils.translateCommandline( argsProp )`. And it would be 
> possible, as it uses the `StringTokenizer` option to return delimiters. 
> But glancing (again very quickly) over the `CommandLineUtils` code, I 
> don't see any escaping handling at all.
> 
> Thus my conclusion is that the Maven Exec Plugin handles either single 
> quotes or double quotes as the delimiter, but /does not handle escaping 
> in either case/. You pick one or the other, and cross your fingers that 
> the given argument does not contain that delimiter, because there's no 
> way to escape it ahead of time.
> 
> All the discussion of escaping at the Bash/PowerShell/CMD level, while 
> useful in its own context, has absolutely zero bearing on the issue I 
> was raising, which was: how to escape a quote at the Maven Exec Plugin 
> level. The answer seems to be: you can't.
> 
> (I glanced over the source code extremely fast, so I could have missed 
> something. If so please point it out to me!)
> 
> Garret
> 

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



Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-15 Thread Garret Wilson

On 10/15/2023 9:24 AM, Garret Wilson wrote:

On 10/15/2023 1:31 AM, Alexander Kriegisch wrote:

…
Let us settle on only using double quotes to enclose arguments 
containing spaces. Then, we do not need to escape single quotes and 
can use them literally. But we do need to escape nested double quotes.


…
Just for a moment, forget about Bash/PowerShell/CMD escaping rules. 
What are escaping the rules of the Maven Exec Plugin? What does it 
consider a delimiter for indicating multiple arguments?


I guess at this point it's easier just to dig into the source code. The 
relevant plugin source code seems to be here (after a cursory glance):


https://github.com/mojohaus/exec-maven-plugin/blob/ddefecff84ebbf6427a6bb9eb6c2fdb332bfac7c/src/main/java/org/codehaus/mojo/exec/ExecMojo.java#L600

It appears to be using `CommandLineUtils.translateCommandline( argsProp 
)` to parse the string input into an array. A little more searching 
seems to indicate that that utility is here:


https://github.com/codehaus-plexus/plexus-utils/blob/d4f0d2de40c5d6cb5d80c8a199fa4f32a4e59879/src/main/java/org/codehaus/plexus/util/cli/CommandLineUtils.java#L348C85-L348C85

That code uses `StringTokenizer` constructed using `new 
StringTokenizer(toProcess, "\"\' ", true)`. So yes, Alexander, it does 
indeed appear to be using both single quotes and and double quotes as 
delimiters.


So next is the question of escaping. The 
[documentation](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/StringTokenizer.html) 
for `StringTokenizer` says nothing about escaping. I glanced (extremely 
quickly) over the source code for `StringTokenizer`, and I don't see it 
translating any escape sequences.


Thus if escaping is happening, it would have to be in 
`CommandLineUtils.translateCommandline( argsProp )`. And it would be 
possible, as it uses the `StringTokenizer` option to return delimiters. 
But glancing (again very quickly) over the `CommandLineUtils` code, I 
don't see any escaping handling at all.


Thus my conclusion is that the Maven Exec Plugin handles either single 
quotes or double quotes as the delimiter, but /does not handle escaping 
in either case/. You pick one or the other, and cross your fingers that 
the given argument does not contain that delimiter, because there's no 
way to escape it ahead of time.


All the discussion of escaping at the Bash/PowerShell/CMD level, while 
useful in its own context, has absolutely zero bearing on the issue I 
was raising, which was: how to escape a quote at the Maven Exec Plugin 
level. The answer seems to be: you can't.


(I glanced over the source code extremely fast, so I could have missed 
something. If so please point it out to me!)


Garret


Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-15 Thread Garret Wilson

On 10/15/2023 1:31 AM, Alexander Kriegisch wrote:

…
Let us settle on only using double quotes to enclose arguments containing 
spaces. Then, we do not need to escape single quotes and can use them 
literally. But we do need to escape nested double quotes.


Let's make sure we don't confuse whether we're talking about escaping 
occurring at the Bash level, or at the Maven Exec Plugin level. I [made 
the 
mistake](https://stackoverflow.com/questions/77294556/bash-single-quote-elements-of-array-and-concatenate-using-space?noredirect=1#comment136265886_77294609) 
of confusing the two at first.


Just for a moment, forget about Bash/PowerShell/CMD escaping rules. What 
are escaping the rules of the Maven Exec Plugin? What does it consider a 
delimiter for indicating multiple arguments? Are you saying that Maven 
Exec Plugin will accept either single or double quote for delimiter? I'm 
not saying it doesn't (I haven't seen the code), but I wouldn't want to 
assume it does, either.


For example, let's assume I use whatever escaping rules are appropriate 
for my shell, and I do it 100% correctly, so that the Maven Exec Plugin 
sees `test "foo\" bar" 'more stuff'`. (I'm using the backtick here to 
delimit the string.) The backslash is not part of the Bash-level 
escaping—it's literally what the Maven Exec Plugin sees (i.e. I probably 
escaped it using `\\\"` or something at the Bash level). How does Maven 
Exec Plugin interpret that string? As one argument? As two? As three?


And where is the Maven Exec Plugin documentation for this? The delimiter 
rules of the Maven Exec Plugin would be completely independent of the 
shell escaping rules. (This is the same as if I passed a single quote 
using `` from XML; once it got to the Maven Exec Plugin in a Maven 
property, it would be irrelevant how it was escaped in XML.)



In UNIX-like shells like Bash, a double quote is escaped by a backslash:

   -Dexec.args="one \"it's OK\" three"


OK, so following the discussion above, the Maven Exec Plugin will see 
the string `one "it's OK" three` (again using a backtick here in this 
email as a somewhat arbitrary delimiter for the entire string). Bash is 
now out of the picture. How does the Maven Exec Plugin interpret the 
string `one "it's OK" three`, and where is that documented?


Garret

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



Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-14 Thread Alexander Kriegisch
Escape hell, part 3: Powershell. Similar to Cmd.exe, but additionally,
you need to use '--%' right after the 'mvn' command to stop PS from
parsing the parameters any further as PS commands or whatever. The full
command would be something like (my local testing example:

mvn --% -pl some-app exec:java -Dexec.mainClass=com.demo.AspectjDemoApplication 
-Dexec.args="one ""it's OK"" three" --quiet

Condensed to the important part:

mvn --% (...) -Dexec.args="one ""it's OK"" three"

-- 
Alexander Kriegisch
https://scrum-master.de


Alexander Kriegisch schrieb am 15.10.2023 11:31 (GMT +07:00):

> It seems as if today is not my day. First, I wrote a message in another thread
> with tons of typos, making it look as if I am not just bad in typing but
> actually unable to speak proper English. Now, I sent an incomplete message not
> addressing the actual question. Sorry for that to everyone.
> 
> Let us settle on only using double quotes to enclose arguments containing
> spaces. Then, we do not need to escape single quotes and can use them
> literally. But we do need to escape nested double quotes.
> 
> In UNIX-like shells like Bash, a double quote is escaped by a backslash:
> 
>   -Dexec.args="one \"it's OK\" three"
> 
> In Windows Cmd.exe, a double quote is escaped by another double quote:
> 
>   -Dexec.args="one ""it's OK"" three"
> 
> HTH
> -- 
> Alexander Kriegisch
> https://scrum-master.de
> 
> 
> Alexander Kriegisch schrieb am 15.10.2023 11:17 (GMT +07:00):
> 
>> Java CLI program arguments containing spaces are usually enclosed by
>> double quotes, so I would recommend to use:
>> 
>>   -Dexec.args="one 'number two' three"
>> 
>> This works in both UNIX-like shells (say, Git Bash on Windows) and in the
>> Cmd.exe Windows shell, while
>> 
>>   -Dexec.args='one "number two" three'
>> 
>> only works in UNIX-like shells, but *not* in Cmd.exe.
>> 
>> -- 
>> Alexander Kriegisch
>> https://scrum-master.de
>> 
>> 
>> Garret Wilson schrieb am 15.10.2023 05:31 (GMT +07:00):
>> 
>>> Here's a fun one for your weekend. As you know from (almost) the 
>>> beginning of time we could invoke a Java application using Maven using 
>>> the Maven Exec Plugin, as in the following (although Maven's `--quiet` 
>>> may be a recent addition):
>>> 
>>> ```bash
>>> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
>>> -Dexec.args="test" --quiet
>>> ```
>>> 
>>> This passes a single command-line argument to my Java `main()` method 
>>> args array: "test". If I want to pass a string with a space, I put it in 
>>> single quotes, like this:
>>> 
>>> ```bash
>>> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
>>> -Dexec.args="'foo bar'" --quiet
>>> ```
>>> 
>>> That passes a single string "foo bar" to my application `main()` method 
>>> args array.
>>> 
>>> Now … what if I want to pass a single string "foo'bar" (note just one 
>>> single quote in the string) as a single string to my `main()` method 
>>> args array? is there some way to escape the single quote? The 
>>> [documention](https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#commandlineArgs)
>>> 
>>> doesn't give any clues.
>>> 
>>> I guess I could look at the Exec Maven Plugin source code (if it's 
>>> available), but that would take half a day and I've already spent half 
>>> of today going down other rabbit holes. So I thought I'd ask here to see 
>>> if anyone knew; otherwise I'll investigate another day when I'm 
>>> refreshed (or just put a temporary note in my Bash script about this 
>>> corner case, but that's not really my style).
>>> 
>>> Garret
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 

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



Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-14 Thread Alexander Kriegisch
It seems as if today is not my day. First, I wrote a message in another thread 
with tons of typos, making it look as if I am not just bad in typing but 
actually unable to speak proper English. Now, I sent an incomplete message not 
addressing the actual question. Sorry for that to everyone.

Let us settle on only using double quotes to enclose arguments containing 
spaces. Then, we do not need to escape single quotes and can use them 
literally. But we do need to escape nested double quotes.

In UNIX-like shells like Bash, a double quote is escaped by a backslash:

  -Dexec.args="one \"it's OK\" three"

In Windows Cmd.exe, a double quote is escaped by another double quote:

  -Dexec.args="one ""it's OK"" three"

HTH
-- 
Alexander Kriegisch
https://scrum-master.de


Alexander Kriegisch schrieb am 15.10.2023 11:17 (GMT +07:00):

> Java CLI program arguments containing spaces are usually enclosed by
> double quotes, so I would recommend to use:
> 
>   -Dexec.args="one 'number two' three"
> 
> This works in both UNIX-like shells (say, Git Bash on Windows) and in the
> Cmd.exe Windows shell, while
> 
>   -Dexec.args='one "number two" three'
> 
> only works in UNIX-like shells, but *not* in Cmd.exe.
> 
> -- 
> Alexander Kriegisch
> https://scrum-master.de
> 
> 
> Garret Wilson schrieb am 15.10.2023 05:31 (GMT +07:00):
> 
>> Here's a fun one for your weekend. As you know from (almost) the 
>> beginning of time we could invoke a Java application using Maven using 
>> the Maven Exec Plugin, as in the following (although Maven's `--quiet` 
>> may be a recent addition):
>> 
>> ```bash
>> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
>> -Dexec.args="test" --quiet
>> ```
>> 
>> This passes a single command-line argument to my Java `main()` method 
>> args array: "test". If I want to pass a string with a space, I put it in 
>> single quotes, like this:
>> 
>> ```bash
>> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
>> -Dexec.args="'foo bar'" --quiet
>> ```
>> 
>> That passes a single string "foo bar" to my application `main()` method 
>> args array.
>> 
>> Now … what if I want to pass a single string "foo'bar" (note just one 
>> single quote in the string) as a single string to my `main()` method 
>> args array? is there some way to escape the single quote? The 
>> [documention](https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#commandlineArgs)
>> 
>> doesn't give any clues.
>> 
>> I guess I could look at the Exec Maven Plugin source code (if it's 
>> available), but that would take half a day and I've already spent half 
>> of today going down other rabbit holes. So I thought I'd ask here to see 
>> if anyone knew; otherwise I'll investigate another day when I'm 
>> refreshed (or just put a temporary note in my Bash script about this 
>> corner case, but that's not really my style).
>> 
>> Garret
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 

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



Re: escaping single quote for Exec Maven Plugin `exc.args`

2023-10-14 Thread Alexander Kriegisch
Java CLI program arguments containing spaces are usually enclosed by
double quotes, so I would recommend to use:

  -Dexec.args="one 'number two' three"

This works in both UNIX-like shells (say, Git Bash on Windows) and in the 
Cmd.exe Windows shell, while

  -Dexec.args='one "number two" three'

only works in UNIX-like shells, but *not* in Cmd.exe.

-- 
Alexander Kriegisch
https://scrum-master.de


Garret Wilson schrieb am 15.10.2023 05:31 (GMT +07:00):

> Here's a fun one for your weekend. As you know from (almost) the 
> beginning of time we could invoke a Java application using Maven using 
> the Maven Exec Plugin, as in the following (although Maven's `--quiet` 
> may be a recent addition):
> 
> ```bash
> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
> -Dexec.args="test" --quiet
> ```
> 
> This passes a single command-line argument to my Java `main()` method 
> args array: "test". If I want to pass a string with a space, I put it in 
> single quotes, like this:
> 
> ```bash
> mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
> -Dexec.args="'foo bar'" --quiet
> ```
> 
> That passes a single string "foo bar" to my application `main()` method 
> args array.
> 
> Now … what if I want to pass a single string "foo'bar" (note just one 
> single quote in the string) as a single string to my `main()` method 
> args array? is there some way to escape the single quote? The 
> [documention](https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#commandlineArgs)
> 
> doesn't give any clues.
> 
> I guess I could look at the Exec Maven Plugin source code (if it's 
> available), but that would take half a day and I've already spent half 
> of today going down other rabbit holes. So I thought I'd ask here to see 
> if anyone knew; otherwise I'll investigate another day when I'm 
> refreshed (or just put a temporary note in my Bash script about this 
> corner case, but that's not really my style).
> 
> Garret
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 

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



escaping single quote for Exec Maven Plugin `exc.args`

2023-10-14 Thread Garret Wilson
Here's a fun one for your weekend. As you know from (almost) the 
beginning of time we could invoke a Java application using Maven using 
the Maven Exec Plugin, as in the following (although Maven's `--quiet` 
may be a recent addition):


```bash
mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
-Dexec.args="test" --quiet

```

This passes a single command-line argument to my Java `main()` method 
args array: "test". If I want to pass a string with a space, I put it in 
single quotes, like this:


```bash
mvn exec:java -Dexec.mainClass="com.example.MyApplication" 
-Dexec.args="'foo bar'" --quiet

```

That passes a single string "foo bar" to my application `main()` method 
args array.


Now … what if I want to pass a single string "foo'bar" (note just one 
single quote in the string) as a single string to my `main()` method 
args array? is there some way to escape the single quote? The 
[documention](https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#commandlineArgs) 
doesn't give any clues.


I guess I could look at the Exec Maven Plugin source code (if it's 
available), but that would take half a day and I've already spent half 
of today going down other rabbit holes. So I thought I'd ask here to see 
if anyone knew; otherwise I'll investigate another day when I'm 
refreshed (or just put a temporary note in my Bash script about this 
corner case, but that's not really my style).


Garret


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



How to build multimodule projects with nodejs projects and java project as module susing exec-maven-plugin

2023-09-07 Thread Thai Le
Hello,
I have 90 projects (20 spring boot app and 70 libs) and 30 vuejs projects
(20 SPA and 10 shared components) that is used to build UI (SPA) for the 20
spring boot apps.

Currently I have a python script that scans the 20 vuejs project to build a
dependency tree and build them in order. Once done, the artifacts are
copied to the resource folder of the corresponding spring boot project then
i use maven to build all the 90 java projects using a single aggregator pom
that list all 90 java projects as modules.

This process is find if i need all 20 spring boot app. However, there are
times that i only need to build 1 or 2 spring boot app form the 20. The
Python script still need to build the dependencies and all vuewjs project
which waste a lot of time.

What i want is to add all the 30 vuejs projects to the aggregator pom as
module and somehow declare dependencies between them so that when i run mvn
--projects A --also-make then only the necessary projects are built.

At the moment my challenge is that when i declare a vuejs project A as
dependency of a vuejs project B, maven tries to download B which does not
exist in any maven repo.
Here is an example:
--
http://maven.apache.org/POM/4.0.0; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0
com
B
7.1.8-SNAPSHOT
war 



com
A
7.1.8-SNAPSHOT








org.codehaus.mojo
        exec-maven-plugin


npm-install

exec

generate-resources

${basedir}
npm
install --@private:registry=
http://localhost:4873 --loglevel error



npm-build

exec

generate-resources

${basedir}
npm
run build --loglevel
error




npm-publish

exec

generate-resources

${basedir}
npm
publish --@private:registry=
http://localhost:4873 --loglevel error








---

Is there a way to tell maven to not look for the dependency A when building
B but still let the reactor know that A has to be built before B

Regards
Thai Le


exec-maven-plugin Could not find or load main class

2019-01-14 Thread Liang, Yashu
I want to execute a java program during my maven build, so I have in my POM:

org.codehaus.mojo
exec-maven-plugin

java
true

-classpath

com.mycodegenerator.MyCodeGeneratorApplication
...



It was all working fine when I have used Spring Boot 1.5.3.RELEASE, but today I 
switch to Spring Boot 2.1, it does not work and the error is:
[INFO] --- exec-maven-plugin:1.6.0:exec (default) ---

Error: Could not find or load main class 
com.cnp.mycodegenerator.MyCodeGeneratorApplication
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit 
value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal 
(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute 
(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:356)
Could anyone give me a hint what can I do to solve the issue?
Thanks!


Thank you and best regards,
Yashu



Re: Problem with exec-maven-plugin

2018-05-24 Thread Alex
In the interest of providing full reference in the list, I have come up with
a workaround to achieve what I want: I list the dependencies in a profile
that is active by default, then use another profile to run generate-sources
with no dependencies active, like follows:

Added in parent-prj/gen-src-prj/pom.xml (and obviously remove existing
dependencies section)



default

true



mygrp
sub-prj
${project.version}





excludeDependency





To generate sources with above, use: mvn -PexcludeDependency
generate-sources

Also filed a bug against the plugin at:
https://github.com/mojohaus/exec-maven-plugin/issues/106




--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

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



Re: Problem with exec-maven-plugin

2018-05-20 Thread Alex
Hi Francois,

Someone on SO has explained that this is related to bug
https://issues.apache.org/jira/browse/MNG-3283

The maven-exec-plugin has "requiresDependencyResolution =
ResolutionScope.TEST"

You can see that annotation here: 
https://github.com/mojohaus/exec-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/exec/ExecJavaMojo.java

So basically, even though it runs early in the lifecycle phase, it dies
because it expects output to be ready for all dependencies. The
"includeProjectDependencies" setting (which I assumed would change this
behaviour) thus becomes irrelevant: it simply means that the resolved
dependencies will not be in the execution classpath, but Maven still expects
them to be available.

The output is simple:


"mvn compile" output:

[INFO] Scanning for projects...
[INFO]

[INFO] Reactor Build Order:
[INFO] 
[INFO] parent-prj
[pom]
[INFO] sub-prj   
[jar]
[INFO] gen-src-prj   
[jar]
[INFO] 
[INFO] --< mygrp:parent-prj
>--
[INFO] Building parent-prj 1.0.0-SNAPSHOT
[1/3]
[INFO] [ pom
]-
[INFO] 
[INFO] ---< mygrp:sub-prj
>
[INFO] Building sub-prj 1.0.0-SNAPSHOT   
[2/3]
[INFO] [ jar
]-
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
sub-prj ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory
/Users/karypid/d/wc/parent-prj/sub-prj/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ sub-prj ---
[INFO] No sources to compile
[INFO] 
[INFO] -< mygrp:gen-src-prj
>--
[INFO] Building gen-src-prj 1.0.0-SNAPSHOT   
[3/3]
[INFO] [ jar
]---------
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default) @ gen-src-prj ---
[Fatal Error] :1:1: Premature end of file.
[WARNING] 
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse
(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse
(DocumentBuilderImpl.java:339)
at javax.xml.parsers.DocumentBuilder.parse (DocumentBuilder.java:121)


ABOVE IS CORRECT BEHAVIOUR: the plugin is executed but fails because it is
missing the "Examples.xml" file which I do not have in this example. Now
contrast this to the output below which exhibits the incorrect/unexpected
behaviour:

"mvn generate-sources" output:

[INFO] Scanning for projects...
[INFO]

[INFO] Reactor Build Order:
[INFO] 
[INFO] parent-prj
[pom]
[INFO] sub-prj   
[jar]
[INFO] gen-src-prj   
[jar]
[INFO] 
[INFO] --< mygrp:parent-prj
>--
[INFO] Building parent-prj 1.0.0-SNAPSHOT
[1/3]
[INFO] [ pom
]-
[INFO] 
[INFO] ---< mygrp:sub-prj
>
[INFO] Building sub-prj 1.0.0-SNAPSHOT   
[2/3]
[INFO] [ jar
]-
[INFO] 
[INFO] -< mygrp:gen-src-prj
>--
[INFO] Building gen-src-prj 1.0.0-SNAPSHOT   
[3/3]
[INFO] [ jar
]-
[INFO]

[INFO] Reactor Summary:
[INFO] 
[INFO] parent-prj 1.0.0-SNAPSHOT .. SUCCESS [  0.004
s]
[INFO] sub-prj  SUCCESS [  0.002
s]
[INFO] gen-src-prj 1.0.0-SNAPSHOT . FAILURE [  0.090
s]
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 0.203 s
[INFO] Finished at: 2018-05-20T09:02:29+01:00
[INFO]
---

Re: Problem with exec-maven-plugin

2018-05-19 Thread Francois MAROT
Hi Alex,

maybe you could paste here the output logs of the failing execution. I'd
like them to be sure I understand the problem.
Cheers

Francois



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

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



Problem with exec-maven-plugin

2018-05-18 Thread Alex
Hello all,

I have a problem running exec-maven-plugin in a multi-module project
_without_ installing snapshots to my local repository. What happens is that
Maven seems to require that dependencies are "resolved" during the
"generate-sources" phase so if I run "mvn generate-sources" it complains
about previous modules NOT being on the classpath (even though they are not
needed for source generation). Ironically, running "mvn compile" has no
issue as it uses target/classes from previous modules. A simple project to
replicate:

parent-prj
parent-prj/sub-prj
parent-prj/gen-src-prj <-- depends on 'sub-prj', has exec-maven plugin

The POMs:




http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>

4.0.0

mygrp
parent-prj
1.0.0-SNAPSHOT

pom


sub-prj
   gen-src-prj

http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;
xmlns="http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
4.0.0


mygrp
parent-prj
1.0.0-SNAPSHOT


sub-prj




 http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>

4.0.0


mygrp
parent-prj
1.0.0-SNAPSHOT


gen-src-prj



mygrp
sub-prj
${project.version}

    


    

org.codehaus.mojo
exec-maven-plugin
1.6.0


generate-sources

java




   
false
   
true
uk.co.real_logic.sbe.SbeTool


sbe.output.dir
   
${project.build.directory}/generated-sources/java


sbe.validation.warnings.fatal
true



   
${project.build.resources[0].directory}/Examples.xml

   
${project.build.directory}/generated-sources/java



uk.co.real-logic
sbe-tool
1.7.10







Notice that I use
"false" in an
attempt to tell Maven that there is no need to actually have project
dependencies actually available. Is there a way to run "mvn
generate-sources" with this structure and have it invoke exec-maven-plugin
without compiling anything?




--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

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



Re: Exec Maven Plugin

2018-01-30 Thread Sandra Parsick
Hi,

I'd recommend you to use the fronend-maven-plugin [1] for your use case.
This plugin installs and configures npm for you, so your build is
regardless of external tools.


Best regards,

Sandra

[1]https://github.com/eirslett/frontend-maven-plugin




Am 29.01.2018 um 22:02 schrieb yossi balan:
> Hi
> 
> I tried to use the plugin and run npm install from java application
> 
> 
> org.codehaus.mojo
> exec-maven-plugin
> 1.6.0
> 
> 
> 
> npm install (initialize)
> 
> exec
> 
> initialize
> 
> npm
> ${project.basedir}/../
> 
> install
> 
> 
> 
> 
> 
> 
> when I run mvn build I got error
> 
> [INFO] --- exec-maven-plugin:1.6.0:exec (npm install mynpm) @ srv ---
> 10:37:31 PM  npm ERR! ...'
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR!
>  
> /home/vcap/app/META-INF/cache/8.9.1/.npm/_logs/2018-01-29T20_37_30_159Z-debug.log
> [ERROR] Command execution failed.
> org.apache.commons.exec.ExecuteException: Process exited with an error: 1
> (Exit value: 1)
> at
> org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
> at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
> at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
> at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> 
> I tried also to ladd .npmrc but it look like it didn't consider this file
> Could you please advise me ?
> 



signature.asc
Description: OpenPGP digital signature


RE: Exec Maven Plugin

2018-01-30 Thread Yaron Golan
From a first glance, It doesn't look like a maven nor the plugin issue.
Please try to :
1. Run the NPM command from command line
2. Run a script (sh/batch) instead the NPM command.
In the script, you can set your proxy, NPM proxy, NPM registry and etc.


Yaron Golan
CI/CD, ALM Team 
AT Network Applications Development · SD  
Tel Aviv | Tampa | Atlanta | New Jersey |Chicago
···
Office: +972 (3) 976 5938
Mobile: +972 (54) 248 4460
e-mail:  yaron.go...@att.com



Hi

I tried to use the plugin and run npm install from java application


org.codehaus.mojo
exec-maven-plugin
1.6.0

  
npm install (initialize)  exec  
initialize  npm 
${project.basedir}/../

install






when I run mvn build I got error

[INFO] --- exec-maven-plugin:1.6.0:exec (npm install mynpm) @ srv ---
10:37:31 PM  npm ERR! ...'

npm ERR! A complete log of this run can be found in:
npm ERR!
 
/home/vcap/app/META-INF/cache/8.9.1/.npm/_logs/2018-01-29T20_37_30_159Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit 
value: 1) at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

I tried also to ladd .npmrc but it look like it didn't consider this file Could 
you please advise me ?


Exec Maven Plugin

2018-01-29 Thread yossi balan
Hi

I tried to use the plugin and run npm install from java application


org.codehaus.mojo
exec-maven-plugin
1.6.0



npm install (initialize)

exec

initialize

npm
${project.basedir}/../

install






when I run mvn build I got error

[INFO] --- exec-maven-plugin:1.6.0:exec (npm install mynpm) @ srv ---
10:37:31 PM  npm ERR! ...'

npm ERR! A complete log of this run can be found in:
npm ERR!
 
/home/vcap/app/META-INF/cache/8.9.1/.npm/_logs/2018-01-29T20_37_30_159Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1
(Exit value: 1)
at
org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

I tried also to ladd .npmrc but it look like it didn't consider this file
Could you please advise me ?


[ANN] Exec Maven Plugin 1.6.0 Released

2017-03-06 Thread Robert Scholte

Hi,

The Mojo team is pleased to announce the release of the Exec Maven Plugin  
version 1.6.0.


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

http://www.mojohaus.org/exec-maven-plugin/

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



org.codehaus.mojo
exec-maven-plugin
1.6.0


Release Notes

https://github.com/mojohaus/exec-maven-plugin/milestone/3?closed=1

Enjoy,

The Mojo team.

Robert Scholte

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



[ANN] Exec Maven Plugin 1.4.0 Released

2015-03-26 Thread Dennis Lundberg
Hi,

The Mojo team is pleased to announce the release of the Exec Maven
Plugin version 1.4.0.

The plugin helps with execution of system and Java programs.

http://mojo.codehaus.org/exec-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.4.0/version
/plugin

Release Notes

** Bug
* [MEXEC-150] - Plugin warns that killAfter is now deprecated
for no obvious reason

** Improvement
* [MEXEC-143] - Rename skip property to exec.skip
* [MEXEC-147] - Update of mojo parent to version 34
* [MEXEC-148] - Upgrade plexus-utils to 3.0.20
* [MEXEC-149] - Upgrade plexus-interpolation to 1.21

** Task
* [MEXEC-127] - Remove added parameters after commons-exec is fixed
* [MEXEC-152] - Update to commons-exec:1.3

Enjoy,

The Mojo team.


-- 
Dennis Lundberg

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



[ANNOUNCE] Release Mojo's Exec Maven Plugin version 1.3

2014-04-22 Thread Karl Heinz Marbaise

Hi,

The Mojo team is pleased to announce the release of the
Exec Maven Plugin version 1.3.

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

http://mojo.codehaus.org/exec-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/version
/plugin


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

Bug

 [MEXEC-86] - outputFile support for capturing exec not functional
 [MEXEC-104] - Cannot pass empty argument to exec goal.
 [MEXEC-105] - %classpath is fragile when used with commandlineArgs
 [MEXEC-108] - NPE at EnvironmentUtils.toStrings()

Improvements:

 [MEXEC-66] - ability to add custom classpath together
  with %classpath placeholder
 [MEXEC-73] - add configuration for adding additional
  directories to project classpath
 [MEXEC-93] - Exec plugin not marked as @threadSafe
 [MEXEC-107] - Drop @execute phase=validate from ExecJavaMojo
 [MEXEC-119] - At position of argument to Misconfigured
   argument, value is null message
 [MEXEC-122] - Run integration test only by using the profile run-its
 [MEXEC-123] - use java 5 plexus annotations
 [MEXEC-125] - Upgrade Plugin Required Maven Version to 2.2.1
 [MEXEC-129] - provided scope for maven-plugin-annotation
 [MEXEC-130] - @threadSafe
 [MEXEC-131] - commons-exec upgrade to 1.2
 [MEXEC-133] - Upgrade to mojo-parent v:33

Task

 [MEXEC-101] - Migrate plugin to JDK5

Wish

 [MEXEC-126] - Bring back Maven 2.0.11 Compatibility

Enjoy,

The Mojo team.

Karl-Heinz Marbaise

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



RE: [Q] v3.0.3 exec-maven-plugin hanging

2012-08-30 Thread Hoying, Ken
Thanks, Curtis!  

I had not thought of that.  I was able to work around my issue though by using 
the maven-antrun-plugin with a java task.  It works fine when I run it this way.

Thank you!
Ken

-Original Message-
From: ctrueden.w...@gmail.com [mailto:ctrueden.w...@gmail.com] On Behalf Of 
Curtis Rueden
Sent: Wednesday, August 29, 2012 4:08 PM
To: Maven Users List
Subject: Re: [Q] v3.0.3 exec-maven-plugin hanging

Hi Ken,

 Does anyone have any ideas?

Just one: did you try hitting Ctrl+backslash (Ctrl+break on Windows) from
the console after it hangs to get a full stack trace? If might be helpful
when combined with a little digging in the Maven source code.

Regards,
-Curtis


On Wed, Aug 29, 2012 at 12:59 PM, Hoying, Ken ken_hoy...@premierinc.comwrote:

 I am hoping someone can assist me with a very strange problem that I am
 having trouble with.

 I have project with various modules that is  structure, as follows:

 |--- project
 |--- pom.xml
 |--- ear
 |--- pom.xml
 |--- services
 |--- pom.xml
 |--- web
 |--- pom.xml


 The pom file under the web directory uses exec-maven-plugin and the exec
 goal to run a java program that compiles Dojo for me.  When I install on
 this pom under the web directory, everything works perfectly.

 However when I install from the pom under the project directory, the java
 program is executed and appears to finish correctly but maven appears to
 hang or to still be waiting on it.  I do not see any issues when run under
 debug that would help me.

 Does anyone have any ideas?  I would greatly appreciate any assistance
 that you could provide.

 Thank you!





 -
 ***Note:The information contained in this message may be privileged and
 confidential and protected from disclosure. If the reader of this message
 is not the intended recipient, or an employee or agent responsible for
 delivering this message to the intended recipient, you are hereby notified
 that any dissemination, distribution or copying of this communication is
 strictly prohibited.  If you have received this communication in error,
 please notify the Sender immediately by replying to the message and
 deleting it from your computer.  Thank you.  Premier Inc.



-
***Note:The information contained in this message may be privileged and 
confidential and protected from disclosure. If the reader of this message is 
not the intended recipient, or an employee or agent responsible for delivering 
this message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify 
the Sender immediately by replying to the message and deleting it from your 
computer.  Thank you.  Premier Inc.



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



[Q] v3.0.3 exec-maven-plugin hanging

2012-08-29 Thread Hoying, Ken
I am hoping someone can assist me with a very strange problem that I am having 
trouble with.

I have project with various modules that is  structure, as follows:

|--- project
|--- pom.xml
|--- ear
|--- pom.xml
|--- services
|--- pom.xml
|--- web
|--- pom.xml


The pom file under the web directory uses exec-maven-plugin and the exec goal 
to run a java program that compiles Dojo for me.  When I install on this pom 
under the web directory, everything works perfectly.

However when I install from the pom under the project directory, the java 
program is executed and appears to finish correctly but maven appears to hang 
or to still be waiting on it.  I do not see any issues when run under debug 
that would help me.

Does anyone have any ideas?  I would greatly appreciate any assistance that you 
could provide.

Thank you!





-
***Note:The information contained in this message may be privileged and 
confidential and protected from disclosure. If the reader of this message is 
not the intended recipient, or an employee or agent responsible for delivering 
this message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify 
the Sender immediately by replying to the message and deleting it from your 
computer.  Thank you.  Premier Inc.



Re: [Q] v3.0.3 exec-maven-plugin hanging

2012-08-29 Thread Curtis Rueden
Hi Ken,

 Does anyone have any ideas?

Just one: did you try hitting Ctrl+backslash (Ctrl+break on Windows) from
the console after it hangs to get a full stack trace? If might be helpful
when combined with a little digging in the Maven source code.

Regards,
-Curtis


On Wed, Aug 29, 2012 at 12:59 PM, Hoying, Ken ken_hoy...@premierinc.comwrote:

 I am hoping someone can assist me with a very strange problem that I am
 having trouble with.

 I have project with various modules that is  structure, as follows:

 |--- project
 |--- pom.xml
 |--- ear
 |--- pom.xml
 |--- services
 |--- pom.xml
 |--- web
 |--- pom.xml


 The pom file under the web directory uses exec-maven-plugin and the exec
 goal to run a java program that compiles Dojo for me.  When I install on
 this pom under the web directory, everything works perfectly.

 However when I install from the pom under the project directory, the java
 program is executed and appears to finish correctly but maven appears to
 hang or to still be waiting on it.  I do not see any issues when run under
 debug that would help me.

 Does anyone have any ideas?  I would greatly appreciate any assistance
 that you could provide.

 Thank you!





 -
 ***Note:The information contained in this message may be privileged and
 confidential and protected from disclosure. If the reader of this message
 is not the intended recipient, or an employee or agent responsible for
 delivering this message to the intended recipient, you are hereby notified
 that any dissemination, distribution or copying of this communication is
 strictly prohibited.  If you have received this communication in error,
 please notify the Sender immediately by replying to the message and
 deleting it from your computer.  Thank you.  Premier Inc.




[ANN] Exec-Maven-Plugin 1.2.1 Released

2011-09-23 Thread Robert Scholte








Hi,

The Mojo team is pleased to announce the release of the Exec-Maven-Plugin 
version 1.2.1. 

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

http://mojo.codehaus.org/exec-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.2.1/version
/plugin

Additional information:
This will probably be the last version based on JDK1.4

Release Notes - Maven 2.x Exec Plugin - Version 1.2.1
Bug
[MEXEC-80] - exec:java squelches the first AWT exception
[MEXEC-88] - ExecMojo: SuccessCodes config seems not to be recognized 
by commons exec framework
[MEXEC-89] - Exceptions are not reported until program termination
[MEXEC-92] - The plugin behaves unexpected when a file or a directory 
exist in the top level directory that has the same name as the given executable
[MEXEC-98] - object is not an instance of declaring class error
[MEXEC-100] - Plugin breaks arguments containing quotes
Improvement
[MEXEC-99] - Use int[] instead of java.util.List for successCodes





Enjoy,

The Mojo team.
 
Robert Scholte
  

Re: exec-maven-plugin want to pass maven.dependency.classpath as a variable in my EXEC Goal

2011-08-19 Thread Daivish Shah
Hi,

I think only way for me to USE apache-maven-2.0.11 version. Which supports
Java 1.4.2 Version.

As my issue is my project is using RT.JAR and TOOLS.JAR which compiler can't
change it unless and untill i project MAVEN with JDK 1.4.2 version and this
version supports JDK 1.4.2 so i have to choose this no other option left.

Thanks,
daivish.

On Thu, Aug 18, 2011 at 3:40 PM, Daivish Shah daivish.s...@gmail.comwrote:

 Yes i tried using maven-antrun-plugin but i am not able to setup JDK 1.4.2
 version in it. I am trying to specify all possible way to apply JDK version
 1.4.2 but it's still taking tools.jar or JDK version, Which maven.bat file
 is using (jdk 1.5)

 I was using following code in MAVEN-ANTRUN-PLUGIN as below code.

 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-antrun-plugin/artifactId
 version1.6/version

 executions
 execution
 idinstall/id
 phaseinstall/phase
 goals
 goalrun/goal
 /goals
 configuration
 source${java-version}/source
 target${java-version}/target

 compilerVersion${java-version}/compilerVersion

 executable${java.1.4.2.home}/bin/javac/executable
  target

 property name=plugin_classpath
 refid=maven.plugin.classpath /
 property name=maven_dependency_classpath
 refid=maven.dependency.classpath /
 ant antfile=ant_build.xml /
  /target
   /configuration
 /execution
 /executions
 dependencies
 dependency
 groupIdsun.jdk/groupId
 artifactIdtools/artifactId
 version1.4.2/version
 scopesystem/scope

 systemPath${java.1.4.2.home}/lib/tools.jar/systemPath
 /dependency
 dependency
 groupIdcom.sun/groupId
 artifactIdrt/artifactId
 version${java-version}/version
 scopesystem/scope

 systemPath${java.1.4.2.home}/jre/lib/rt.jar/systemPath
 /dependency
 /dependencies
 /plugin



 That's why i choose exec GOAL where my SYSTEM JAVA_HOME is 1.4.2 and it's
 able to execute it if i have all dependencies which i needed.


 Please help me out.

 Thanks,
 daivish.


 On Thu, Aug 18, 2011 at 3:29 PM, Robert Scholte rfscho...@codehaus.orgwrote:


 Looks to me you're trying to use the wrong plugin. This one seems to fit
 more:http://maven.apache.org/plugins/maven-antrun-plugin/  -Robert 
 Date: Thu, 18 Aug 2011 15:21:49 -0700
  Subject: exec-maven-plugin want to pass maven.dependency.classpath as a
 variable in my EXEC Goal
  From: daivish.s...@gmail.com
  To: users@maven.apache.org
 
  Hi,
 
 
  I want to define property or want to use maven.plugin.classpath and
  maven.dependency.classpath in my build.xml.
 
  How can i do it ?
 
  Sample code is as below...
 
  property /property is not working and not able to read the values
 from
  my build.xml so please explain me how can i do it ?
 
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  version1.2/version
  executions
  execution
  idinstall/id
  phaseinstall/phase
  goals
  goalexec/goal
  /goals
  /execution
  /executions
  configuration
  property name=plugin_classpath
  refid=maven.plugin.classpath /
  property name=maven_dependency_classpath
  refid=maven.dependency.classpath /
  executableantscript.bat/executable !-- ant -f
  build.xml build --
  /configuration
  /plugin
 
 
  Thanks,
 
  daivish.






exec-maven-plugin want to pass maven.dependency.classpath as a variable in my EXEC Goal

2011-08-18 Thread Daivish Shah
Hi,


I want to define property or want to use maven.plugin.classpath and
maven.dependency.classpath in my build.xml.

How can i do it ?

Sample code is as below...

property /property is not working and not able to read the values from
my build.xml so please explain me how can i do it ?


plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.2/version
executions
execution
idinstall/id
phaseinstall/phase
goals
goalexec/goal
/goals
/execution
/executions
configuration
property name=plugin_classpath
refid=maven.plugin.classpath /
property name=maven_dependency_classpath
refid=maven.dependency.classpath /
executableantscript.bat/executable !-- ant -f
build.xml build --
/configuration
/plugin


Thanks,

daivish.


RE: exec-maven-plugin want to pass maven.dependency.classpath as a variable in my EXEC Goal

2011-08-18 Thread Robert Scholte

Looks to me you're trying to use the wrong plugin. This one seems to fit 
more:http://maven.apache.org/plugins/maven-antrun-plugin/  -Robert  Date: Thu, 
18 Aug 2011 15:21:49 -0700
 Subject: exec-maven-plugin want to pass maven.dependency.classpath as a 
 variable in my EXEC Goal
 From: daivish.s...@gmail.com
 To: users@maven.apache.org
 
 Hi,
 
 
 I want to define property or want to use maven.plugin.classpath and
 maven.dependency.classpath in my build.xml.
 
 How can i do it ?
 
 Sample code is as below...
 
 property /property is not working and not able to read the values from
 my build.xml so please explain me how can i do it ?
 
 
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 version1.2/version
 executions
 execution
 idinstall/id
 phaseinstall/phase
 goals
 goalexec/goal
 /goals
 /execution
 /executions
 configuration
 property name=plugin_classpath
 refid=maven.plugin.classpath /
 property name=maven_dependency_classpath
 refid=maven.dependency.classpath /
 executableantscript.bat/executable !-- ant -f
 build.xml build --
 /configuration
 /plugin
 
 
 Thanks,
 
 daivish.
  

Re: exec-maven-plugin want to pass maven.dependency.classpath as a variable in my EXEC Goal

2011-08-18 Thread Daivish Shah
Yes i tried using maven-antrun-plugin but i am not able to setup JDK 1.4.2
version in it. I am trying to specify all possible way to apply JDK version
1.4.2 but it's still taking tools.jar or JDK version, Which maven.bat file
is using (jdk 1.5)

I was using following code in MAVEN-ANTRUN-PLUGIN as below code.

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
version1.6/version
executions
execution
idinstall/id
phaseinstall/phase
goals
goalrun/goal
/goals
configuration
source${java-version}/source
target${java-version}/target

compilerVersion${java-version}/compilerVersion

executable${java.1.4.2.home}/bin/javac/executable
 target
property name=plugin_classpath
refid=maven.plugin.classpath /
property name=maven_dependency_classpath
refid=maven.dependency.classpath /
ant antfile=ant_build.xml /
 /target
  /configuration
/execution
/executions
dependencies
dependency
groupIdsun.jdk/groupId
artifactIdtools/artifactId
version1.4.2/version
scopesystem/scope

systemPath${java.1.4.2.home}/lib/tools.jar/systemPath
/dependency
dependency
groupIdcom.sun/groupId
artifactIdrt/artifactId
version${java-version}/version
scopesystem/scope

systemPath${java.1.4.2.home}/jre/lib/rt.jar/systemPath
/dependency
/dependencies
/plugin



That's why i choose exec GOAL where my SYSTEM JAVA_HOME is 1.4.2 and it's
able to execute it if i have all dependencies which i needed.


Please help me out.

Thanks,
daivish.

On Thu, Aug 18, 2011 at 3:29 PM, Robert Scholte rfscho...@codehaus.orgwrote:


 Looks to me you're trying to use the wrong plugin. This one seems to fit
 more:http://maven.apache.org/plugins/maven-antrun-plugin/  -Robert  Date:
 Thu, 18 Aug 2011 15:21:49 -0700
  Subject: exec-maven-plugin want to pass maven.dependency.classpath as a
 variable in my EXEC Goal
  From: daivish.s...@gmail.com
  To: users@maven.apache.org
 
  Hi,
 
 
  I want to define property or want to use maven.plugin.classpath and
  maven.dependency.classpath in my build.xml.
 
  How can i do it ?
 
  Sample code is as below...
 
  property /property is not working and not able to read the values
 from
  my build.xml so please explain me how can i do it ?
 
 
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  version1.2/version
  executions
  execution
  idinstall/id
  phaseinstall/phase
  goals
  goalexec/goal
  /goals
  /execution
  /executions
  configuration
  property name=plugin_classpath
  refid=maven.plugin.classpath /
  property name=maven_dependency_classpath
  refid=maven.dependency.classpath /
  executableantscript.bat/executable !-- ant -f
  build.xml build --
  /configuration
  /plugin
 
 
  Thanks,
 
  daivish.




Exec-maven plugin invoked twice during release process

2010-09-14 Thread C. Benson Manica
(Asking this question again in a different form, since I feel like there
*has* to be an answer...)

I have a Maven project that invokes exec-maven in the prepare-package phase,
as below, so that its work is done for package creation.  That all works
fine, deployment also works fine, but my issue is that exec-maven is invoked
both during release:prepare and release:perform.  This execution takes a
long time, so invoking it twice is really not at all desirable.  How can I
configure the release plugin so that it doesn't cause this execution to be
invoked twice during the release process?

plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1.1/version
executions
execution
idFoo/id
phaseprepare-package/phase
goals
goalexec/goal
/goals
configuration

executable${env.JAVA_HOME}/bin/java/executable
 ...
/configuration
/execution
/executions
/plugin
/plugins


-- 
C. Benson Manica
cbman...@gmail.com


Re: Exec-maven plugin invoked twice during release process

2010-09-14 Thread Prashant Bhate
Hi,

It depends if you want to run exec during prepare or during release.

If you want to run it only during prepare phase put it in a profile and pass
that profile as argument to release:prepare goal

If you want to run it during release:perform put it in release profile and
enable release profile
releaseProfilesrelease/releaseProfiles

Regards,
Prashant Bhate

On Tue, Sep 14, 2010 at 11:58 AM, C. Benson Manica cbman...@gmail.comwrote:

 (Asking this question again in a different form, since I feel like there
 *has* to be an answer...)

 I have a Maven project that invokes exec-maven in the prepare-package
 phase,
 as below, so that its work is done for package creation.  That all works
 fine, deployment also works fine, but my issue is that exec-maven is
 invoked
 both during release:prepare and release:perform.  This execution takes a
 long time, so invoking it twice is really not at all desirable.  How can I
 configure the release plugin so that it doesn't cause this execution to be
 invoked twice during the release process?

plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1.1/version
executions
execution
idFoo/id
phaseprepare-package/phase
goals
goalexec/goal
/goals
configuration

 executable${env.JAVA_HOME}/bin/java/executable
 ...
/configuration
/execution
/executions
/plugin
/plugins


 --
 C. Benson Manica
 cbman...@gmail.com



Re: Exec-maven plugin invoked twice during release process

2010-09-14 Thread Stephen Connolly
are you sure it only needs to run once?

remember that prepare runs from $(pwd) while perform runs from
$(pwd)/target/checkout so if it is doing things like generating source code,
or such, you might actually need to run it twice.

otherwise put it it a profile that is only activated for release:prepare or
release:perform as suggested by Benson

-Stephen

On 14 September 2010 11:58, C. Benson Manica cbman...@gmail.com wrote:

 (Asking this question again in a different form, since I feel like there
 *has* to be an answer...)

 I have a Maven project that invokes exec-maven in the prepare-package
 phase,
 as below, so that its work is done for package creation.  That all works
 fine, deployment also works fine, but my issue is that exec-maven is
 invoked
 both during release:prepare and release:perform.  This execution takes a
 long time, so invoking it twice is really not at all desirable.  How can I
 configure the release plugin so that it doesn't cause this execution to be
 invoked twice during the release process?

plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1.1/version
executions
execution
idFoo/id
phaseprepare-package/phase
goals
goalexec/goal
/goals
configuration

 executable${env.JAVA_HOME}/bin/java/executable
 ...
/configuration
/execution
/executions
/plugin
/plugins


 --
 C. Benson Manica
 cbman...@gmail.com



Invoke exec-maven-plugin only for package and release:perform

2010-09-01 Thread C. Benson Manica
I have a Maven project whose sole purpose is to synthesize a deployable
artifact by executing some time-consuming Java code.  I'd like it to build
this artifact on package and deploy, but I really don't want it to build it
once for release:prepare and again for release:perform.  How can I
accomplish that?

-- 
C. Benson Manica
cbman...@gmail.com


[ANN] Exec Maven Plugin 1.2 Released

2010-07-21 Thread Robert Scholte

The Mojo team is pleased to announce the release of the Exec Maven Plugin 
version 1.2.
 

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


http://mojo.codehaus.org/exec-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.2/version
/plugin


Release Notes - Maven 2.x Exec Plugin - Version 1.2 
Bug 

[MEXEC-48] - multiple execution in exec-maven-plugin 
[MEXEC-51] - classpath scope of runtime should pick up compile scope 
dependencies 
[MEXEC-64] - classpathScope runtime should include as well compile 
dependencies 
[MEXEC-68] - classpath too long problem 
[MEXEC-72] - exec:exec mojo does not correctly pass arguments with spaces 
[MEXEC-75] - Strange encoding of environment variables when using exec plugin 
[MEXEC-79] - Use File.toURI().toURL() when adding dependencies to the 
classpath. 
[MEXEC-81] - Windows paths always fail 
Improvement 

[MEXEC-37] - {exec.args} should support embedded spaces in ExecMojo 
[MEXEC-62] - The default for classPathScope should be runtime not compile 
[MEXEC-67] - Full command line should be printed in debug mode. 
[MEXEC-82] - exec:java add support for parameter 'skip' 
New Feature 

[MEXEC-25] - exec:exec mojo support interaction with user 
 

 

 

Enjoy,

The Mojo team.
 
- Robert Scholte
  
_
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop

exec-maven-plugin: Dependency in POM causes IAE

2010-01-19 Thread awolf_ccc

Hi,
  I am using the exec-maven plugin from codehaus,and it seems that there
is problem with the exec:java goal's JAR dependency resolution. Or (since
I'm a new user) I'm doing something wrong. Comments welcome!!

  Here is the scenario:

  (A) I build an application tool, packaged into a JAR file, and it has its
own project POM (TestDep);
  (B) I want to run the tool during generate-sources in another project
(TestApp);
 (1) I add these lines to the TestApp POM:

build
  plugins
 ...
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  dependencies
  ... GAV of project (TestDep)
  /dependencies
  executions
 execution
 phasegenerate-sources/phase
 goals
   goaljava/goal
 /goals
 configuration
 executableDependency
... GAV of project (TestDep)
 /executableDependency
 mainClasstestDep.TestClass/mainClass

includePluginDependenciestrue/includePluginDependencies

includeProjectDependenciesfalse/includeProjectDependencies
  /configuration
/execution
  /executions
plugin
 ...
  plugins
/build

All this works just great... until I add a dependency into the POM for the
TestDep build:

  (2)
project ...
  ...
  dependencies
dependency
  groupIdorg.apache.maven/groupId
  artifactIdmaven-ant-task/artifactId
  version2.0.10/version
  scopecompile/scope
/dependency
  /dependencies
  ...
/project

As soon as this is recorded and installed in the TestDep's POM, the
exec:java goal fails with an IAE (IllegalArgumentException) at
  sun.reflect.UnsafeObjectFieldAccessorImpl.set(...)

I did not see any other postings mentioning this kind of problem. I have the
test project's source and POM files ready to be posted to JIRA, but maybe
somebody has some words of wisdom before I do that.

Thanks!!
-- 
View this message in context: 
http://old.nabble.com/exec-maven-plugin%3A-Dependency-in-POM-causes-IAE-tp27231970p27231970.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



exec-maven-plugin java goal question

2009-09-24 Thread David Hoffer
We have an issue where sometimes the exec-maven-plugin will hang forever,
but we are not sure why...its very non-repeatable.  It only happens
sometimes with our CI builds which are Linux.  In our case we are using the
java goal, I understand this is run in the same process.  And the main
method this calls does not spawn any threads, etc all it does is generate
some files using velocity templates.

Any idea why this might hang?

-Dave


Re: exec-maven-plugin java goal question

2009-09-24 Thread David Hoffer
One more data point, this happens running the site-deploy goal.  I don't
think it has been seen with other goals.

-Dave

On Thu, Sep 24, 2009 at 8:03 AM, David Hoffer dhoff...@gmail.com wrote:

 We have an issue where sometimes the exec-maven-plugin will hang forever,
 but we are not sure why...its very non-repeatable.  It only happens
 sometimes with our CI builds which are Linux.  In our case we are using the
 java goal, I understand this is run in the same process.  And the main
 method this calls does not spawn any threads, etc all it does is generate
 some files using velocity templates.

 Any idea why this might hang?

 -Dave



How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread janszm

I have a java program which takes an input-file and output-file as
parameters. I need to run this for a set of files in a directory.

How can I best achieve this with Maven? I have looked at the Exec Maven
plugin and as per http://mojo.codehaus.org/exec-maven-plugin/usage.html I
can use this to run once. How do I use Maven to run this multiple times for
all the files in a directory?

I have googled but cant find any info on how to do this, apart from some
posts about using Jelly, but this seems to be no longer supported in the
latest Maven version.

Help appreciated.

Cheers,
Menno
-- 
View this message in context: 
http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-directory--tp23722927p23722927.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: How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread Stephen Connolly
The easiest way is to just write a plugin...

seriously, it's quite simple

start with the archetype for a maven plugin (mvn archetype:generate)

then just modify the sample Mojo that it creates.

you will want to add two parameters to your Mojo, e.g.

/**
 * @parameter expression=${basedir}/src/main/myfiles
 */
private File sourceDirectoy;

/**
 * @parameter expression=${project.build.directory}/myoutputFolder
 */
private File outputDirectory;

Then just have the execute method scan for all files in sourceDirectory and
invoke the program specifying the output folder as outputDirectory.

probably take you about 10-20 min

-Stephen

2009/5/26 janszm me...@jansz.com


 I have a java program which takes an input-file and output-file as
 parameters. I need to run this for a set of files in a directory.

 How can I best achieve this with Maven? I have looked at the Exec Maven
 plugin and as per http://mojo.codehaus.org/exec-maven-plugin/usage.html I
 can use this to run once. How do I use Maven to run this multiple times for
 all the files in a directory?

 I have googled but cant find any info on how to do this, apart from some
 posts about using Jelly, but this seems to be no longer supported in the
 latest Maven version.

 Help appreciated.

 Cheers,
 Menno
 --
 View this message in context:
 http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-directory--tp23722927p23722927.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: How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread Baptiste MATHUS
Well, it depends on what you want to do.
Maven is not designed to be used as a scripting engine for administration
tasks.

Do you want to do this as a part of your packaging/build process? If so,
then look at Stephen answer. If you want to script something moving in a
production envt, then just use shell or ant.

Cheers.

2009/5/26 janszm me...@jansz.com


 I have a java program which takes an input-file and output-file as
 parameters. I need to run this for a set of files in a directory.

 How can I best achieve this with Maven? I have looked at the Exec Maven
 plugin and as per http://mojo.codehaus.org/exec-maven-plugin/usage.html I
 can use this to run once. How do I use Maven to run this multiple times for
 all the files in a directory?

 I have googled but cant find any info on how to do this, apart from some
 posts about using Jelly, but this seems to be no longer supported in the
 latest Maven version.

 Help appreciated.

 Cheers,
 Menno
 --
 View this message in context:
 http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-directory--tp23722927p23722927.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




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


Re: How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread janszm


Baptiste MATHUS wrote:
 
 Well, it depends on what you want to do.
 Maven is not designed to be used as a scripting engine for administration
 tasks.
 
 Do you want to do this as a part of your packaging/build process? If so,
 then look at Stephen answer. If you want to script something moving in a
 production envt, then just use shell or ant.
 

Thanks (and Stephen also). I am trying to run this as part of my build
process, as the output files are then used to generate Java classes via
JAXB. 

So am I correct in thinking that the Maven approach would be to create a
plugin in this case, rather than using ant? 

I'm a bit confused to be honest after reading the latest Maven docs on
whether everything should now be done writing Java plugins (this sometimes
feels like overkill to me). And also whether in the latest version of Maven,
ant is still the preferred scripting approach, as I also see references to
beanshell.

Cheers,
Menno
-- 
View this message in context: 
http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-directory--tp23722927p23727754.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: How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread Stan Devitt
One way to attach this to (say) the process-resources phase is:

plugin
groupIdorg.codehaus.groovy.maven/groupId
artifactIdgmaven-plugin/artifactId
version1.0-rc-3/version
executions
execution

phasegenerate-sources/phase
goals

goalexecute/goal
/goals
configuration
  source
  ![CDATA[
def target = new File( target , newdata );
target.mkdirs();
def source = new File( src/main/data );
source.eachFile( )  { file -
  def process = cmd /c copy ${file} ${target}.execute();
  println result: ${process.text};
}
  ]]
  /source
/configuration
/execution
/executions
/plugin

Of course, replace the text of the process command line by the command
of your choice, an ant exec task, or just invoke the java class directly
providing that a suitable jar is in the plugin dependency list.

Stan.

-Original Message-
From: janszm [mailto:me...@jansz.com]
Sent: Tuesday, May 26, 2009 9:25 AM
To: users@maven.apache.org
Subject: How to run Exec Maven plugin for each file in a directory?


I have a java program which takes an input-file and output-file as
parameters. I need to run this for a set of files in a directory.

How can I best achieve this with Maven? I have looked at the Exec Maven
plugin and as per http://mojo.codehaus.org/exec-maven-plugin/usage.html
I
can use this to run once. How do I use Maven to run this multiple times
for
all the files in a directory?

I have googled but cant find any info on how to do this, apart from some
posts about using Jelly, but this seems to be no longer supported in the
latest Maven version.

Help appreciated.

Cheers,
Menno
--
View this message in context:
http://www.nabble.com/How-to-run-Exec-Maven-plugin-for-each-file-in-a-di
rectory--tp23722927p23722927.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


-
This transmission (including any attachments) may contain confidential 
information, privileged material (including material protected by the 
solicitor-client or other applicable privileges), or constitute non-public 
information. Any use of this information by anyone other than the intended 
recipient is prohibited. If you have received this transmission in error, 
please immediately reply to the sender and delete this information from your 
system. Use, dissemination, distribution, or reproduction of this transmission 
by unintended recipients is not authorized and may be unlawful.

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



Re: How to run Exec Maven plugin for each file in a directory?

2009-05-26 Thread Baptiste MATHUS
2009/5/26 janszm me...@jansz.com



 Baptiste MATHUS wrote:
 
  Well, it depends on what you want to do.
  Maven is not designed to be used as a scripting engine for administration
  tasks.
 
  Do you want to do this as a part of your packaging/build process? If so,
  then look at Stephen answer. If you want to script something moving in a
  production envt, then just use shell or ant.
 

 Thanks (and Stephen also). I am trying to run this as part of my build
 process, as the output files are then used to generate Java classes via
 JAXB.

 So am I correct in thinking that the Maven approach would be to create a
 plugin in this case, rather than using ant?


Yes, that's it.



 I'm a bit confused to be honest after reading the latest Maven docs on
 whether everything should now be done writing Java plugins (this sometimes


Not completely true. See below.


 feels like overkill to me). And also whether in the latest version of
 Maven,
 ant is still the preferred scripting approach, as I also see references to
 beanshell.


If you see it as overkill, you'll be happy to know that you can actually
write the plugin in many different languages. Only the plugin approach is
recommended to be able to cleanly manage what is done by what, but not the
language. I didn't experiment other language than Java myself, but see
Stan's answer to see how to use Groovy scripting, for example.

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


Re: How to add a local jar to the classpath of exec-maven-plugin

2008-12-08 Thread Jaikiran


Stephen Connolly-2 wrote:
 
 Options:
 
 1. Add xyz to your repo (seriously, this is the easiest)
 
 2. Add xyz as a dependency to the plugin using the system scope (not too
 difficult, but you'd be better off with 1 as once you start using the
 system
 scope, you'll incorrectly think it's the solution to all your problems and
 then it will bite you in the ass somewhere else)
 
Thanks for the ideas and the quick reply, Stephen. I'll add the xyz to the
repo - looks like an elegant approach.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-local-jar-to-the-classpath-of-exec-maven-plugin-tp20893674p20894581.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: How to add a local jar to the classpath of exec-maven-plugin

2008-12-08 Thread Stephen Connolly
Options:

1. Add xyz to your repo (seriously, this is the easiest)

2. Add xyz as a dependency to the plugin using the system scope (not too
difficult, but you'd be better off with 1 as once you start using the system
scope, you'll incorrectly think it's the solution to all your problems and
then it will bite you in the ass somewhere else)

2008/12/8 Jaikiran [EMAIL PROTECTED]


 I am using Maven2 and trying to run a java class from Maven using the
 exec-maven-plugin. Here's how it looks like:

 plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1-beta-1/version
executions
  execution
goals
  goalexec/goal
/goals
  /execution
/executions
configuration
  executablejava/executable
  arguments
argument-classpath/argument
classpath/
argumentorg.myapp.client.Client/argument

  /arguments
/configuration
  /plugin

 Notice the use of classpath/. The org.myapp.client.Client class also has
 a
 dependency on a local jar file xyz.jar (which is not in maven repo). I have
 the path to the jar file, but is there any way i can pass this to the
 classpath of the exec-maven-plugin?
 --
 View this message in context:
 http://www.nabble.com/How-to-add-a-local-jar-to-the-classpath-of-exec-maven-plugin-tp20893674p20893674.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]




How to add a local jar to the classpath of exec-maven-plugin

2008-12-08 Thread Jaikiran

I am using Maven2 and trying to run a java class from Maven using the
exec-maven-plugin. Here's how it looks like:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.1-beta-1/version
executions
  execution
goals
  goalexec/goal
/goals
  /execution
/executions
configuration
  executablejava/executable
  arguments
argument-classpath/argument
classpath/
argumentorg.myapp.client.Client/argument

  /arguments
/configuration
  /plugin

Notice the use of classpath/. The org.myapp.client.Client class also has a
dependency on a local jar file xyz.jar (which is not in maven repo). I have
the path to the jar file, but is there any way i can pass this to the
classpath of the exec-maven-plugin? 
-- 
View this message in context: 
http://www.nabble.com/How-to-add-a-local-jar-to-the-classpath-of-exec-maven-plugin-tp20893674p20893674.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: Ignore errors from exec-maven-plugin

2008-11-27 Thread Eric Rotick
It's quite simple really.

You create a shell script which always returns an exit status of zero and
then call the binary application within that.

On Wed, Nov 26, 2008 at 10:49 AM, Eric Rotick [EMAIL PROTECTED] wrote:

 Hi All,

 I'm having a problem getting the exec-maven-plugin to support my
 requirements and I hoped the list might be able to help.

 I need to run a binary application to tickle some hardware into life before
 I run a test. This application exits with various status codes to indicate
 certain aspects of the hardware. Unfortunately, as they are not always zero,
 they are getting interpreted by the exec:exec plugin as an error which stops
 the run.

 Is there a way to tell the plugin to ignore errors in a similar way to the
 onError directive of the sql plugin?

 Thanks.






Re: Ignore errors from exec-maven-plugin

2008-11-27 Thread Dan Tran
it seems to reasonable to support ignoreOnError. Pleaes file an Jira
with a patch which will get approve quicker if there are interests

On Thu, Nov 27, 2008 at 3:07 AM, Eric Rotick [EMAIL PROTECTED] wrote:
 It's quite simple really.

 You create a shell script which always returns an exit status of zero and
 then call the binary application within that.

 On Wed, Nov 26, 2008 at 10:49 AM, Eric Rotick [EMAIL PROTECTED] wrote:

 Hi All,

 I'm having a problem getting the exec-maven-plugin to support my
 requirements and I hoped the list might be able to help.

 I need to run a binary application to tickle some hardware into life before
 I run a test. This application exits with various status codes to indicate
 certain aspects of the hardware. Unfortunately, as they are not always zero,
 they are getting interpreted by the exec:exec plugin as an error which stops
 the run.

 Is there a way to tell the plugin to ignore errors in a similar way to the
 onError directive of the sql plugin?

 Thanks.






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



Ignore errors from exec-maven-plugin

2008-11-26 Thread Eric Rotick
Hi All,

I'm having a problem getting the exec-maven-plugin to support my
requirements and I hoped the list might be able to help.

I need to run a binary application to tickle some hardware into life before
I run a test. This application exits with various status codes to indicate
certain aspects of the hardware. Unfortunately, as they are not always zero,
they are getting interpreted by the exec:exec plugin as an error which stops
the run.

Is there a way to tell the plugin to ignore errors in a similar way to the
onError directive of the sql plugin?

Thanks.


exec-maven-plugin exit Code Issue

2008-10-31 Thread Petr V.
Okay as advised by Stephen  Connolly, from my maven pom file , I am trying to 
call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do when
my called program or script via exec-maven-plugin fails



  plugin

    groupIdorg.codehaus.mojo/groupId

    artifactIdexec-maven-plugin/artifactId

    version1.1/version

    executions

  execution

    iddowithant/id

    configuration

  executableant/executable

    /configuration

              phasecompile/phase

    goals

  goalexec/goal

    /goals

  /execution 

    /executions

 /plugin



It calls my ant script which fails but it goes on with my maven build :-(.



Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED] wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component in main 
project build ?
To: Maven Users List users@maven.apache.org, [EMAIL PROTECTED]
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. [EMAIL PROTECTED]

 Yeah we have looked into nMaven but these are the existing projects and we
 do not want to put effort to convert them to nMaven _now_.

 Is there any way possible to call nant script from maven ?

 Thanks,

 Petr





 --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
 From: Wayne Fay [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in main
 project build ?
 To: Maven Users List users@maven.apache.org
 Date: Thursday, October 30, 2008, 11:47 PM

 On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]
wrote:
  I have a project that has many components. Some are written in dot
net
 and
 some are in java.We are moving our build environment to maven.

 I'd encourage you to look at NMaven:
 http://incubator.apache.org/nmaven/

 I don't use it myself, but I know others are using it successfully
 with their dot-net projects.

 Wayne

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









  

Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Petr V.
Okay here is some more update. I called the simple bat file returning 0 and 1 
via exec-maven-plugin and then maven build failed/passed accordingly.

So it means that ant script is not returning proper error code to 
exec-maven-plugin So next question arises that can we force ant to return error 
code when ant script fails :-)

Thanks,

Petr

--- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Friday, October 31, 2008, 10:58 PM

Okay as advised by Stephen  Connolly, from my maven pom file , I am trying to
call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do when
my called program or script via exec-maven-plugin fails



  plugin

    groupIdorg.codehaus.mojo/groupId

    artifactIdexec-maven-plugin/artifactId

    version1.1/version

    executions

  execution

    iddowithant/id

    configuration

  executableant/executable

    /configuration

              phasecompile/phase

    goals

  goalexec/goal

    /goals

  /execution 

    /executions

 /plugin



It calls my ant script which fails but it goes on with my maven build :-(.



Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED]
wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component in main
project build ?
To: Maven Users List users@maven.apache.org,
[EMAIL PROTECTED]
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. [EMAIL PROTECTED]

 Yeah we have looked into nMaven but these are the existing projects and we
 do not want to put effort to convert them to nMaven _now_.

 Is there any way possible to call nant script from maven ?

 Thanks,

 Petr





 --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
 From: Wayne Fay [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in main
 project build ?
 To: Maven Users List users@maven.apache.org
 Date: Thursday, October 30, 2008, 11:47 PM

 On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]
wrote:
  I have a project that has many components. Some are written in dot
net
 and
 some are in java.We are moving our build environment to maven.

 I'd encourage you to look at NMaven:
 http://incubator.apache.org/nmaven/

 I don't use it myself, but I know others are using it successfully
 with their dot-net projects.

 Wayne

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









  


  

Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Stephen Connolly
if you're running ant you'd be better off with maven-antrun-plugin

I thought you were running nant

2008/10/31 Petr V. [EMAIL PROTECTED]

 Okay here is some more update. I called the simple bat file returning 0 and
 1 via exec-maven-plugin and then maven build failed/passed accordingly.

 So it means that ant script is not returning proper error code to
 exec-maven-plugin So next question arises that can we force ant to return
 error code when ant script fails :-)

 Thanks,

 Petr

 --- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
 From: Petr V. [EMAIL PROTECTED]
 Subject: exec-maven-plugin exit Code Issue
 To: Maven Users List users@maven.apache.org
 Date: Friday, October 31, 2008, 10:58 PM

 Okay as advised by Stephen  Connolly, from my maven pom file , I am trying
 to
 call some other script(let's
 assume it is an ant script for sake of discussion) which fails but my
 maven build process goes on. I want my maven build to fail if it calls
 some external script which fails. I looked at documentation of plugin
 but I don't see any option that would help me setting up what to do when
 my called program or script via exec-maven-plugin fails



   plugin

 groupIdorg.codehaus.mojo/groupId

 artifactIdexec-maven-plugin/artifactId

 version1.1/version

 executions

   execution

 iddowithant/id

 configuration

   executableant/executable

 /configuration

   phasecompile/phase

 goals

   goalexec/goal

 /goals

   /execution

 /executions

  /plugin



 It calls my ant script which fails but it goes on with my maven build :-(.



 Is there any way I can catch the failure of external script ?



 Thanks,



 Petr


 --- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED]
 wrote:
 From: Stephen Connolly [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in main
 project build ?
 To: Maven Users List users@maven.apache.org,
 [EMAIL PROTECTED]
 Date: Friday, October 31, 2008, 2:13 AM

 have a look at the exec-maven-plugin

 2008/10/30 Petr V. [EMAIL PROTECTED]

  Yeah we have looked into nMaven but these are the existing projects and
 we
  do not want to put effort to convert them to nMaven _now_.
 
  Is there any way possible to call nant script from maven ?
 
  Thanks,
 
  Petr
 
 
 
 
 
  --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
  From: Wayne Fay [EMAIL PROTECTED]
  Subject: Re: Nant Plugin for Maven to integrate dot net component in main
  project build ?
  To: Maven Users List users@maven.apache.org
  Date: Thursday, October 30, 2008, 11:47 PM
 
  On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]
 wrote:
   I have a project that has many components. Some are written in dot
 net
  and
  some are in java.We are moving our build environment to maven.
 
  I'd encourage you to look at NMaven:
  http://incubator.apache.org/nmaven/
 
  I don't use it myself, but I know others are using it successfully
  with their dot-net projects.
 
  Wayne
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 










Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Petr V.
I am able to call my nant buid via exec-maven-plugin but my nnat script is keep 
callin agian and again and build process never ends.

I put the following in my top pom file of project. I guess phase mean when we 
need to call the nant script iof folliwng snippet but what does 
goalexec/goal mean ? 

plugin
    groupIdorg.codehaus.mojo/groupId
    artifactIdexec-maven-plugin/artifactId
    version1.1/version
    executions
  execution
    idnantbuild/id
    configuration
  executablenant/executable
   workingDirectoryF:\shared/workingDirectory
    /configuration
  phasecompile/phase
    goals
  goalexec/goal
    /goals
  /execution 
    /executions
/plugin   

Thanks,

Petr

--- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Friday, October 31, 2008, 10:58 PM

Okay as advised by Stephen  Connolly, from my maven pom file , I am trying to
call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do when
my called program or script via exec-maven-plugin fails



  plugin

    groupIdorg.codehaus.mojo/groupId

    artifactIdexec-maven-plugin/artifactId

    version1.1/version

    executions

  execution

    iddowithant/id

    configuration

  executableant/executable

    /configuration

              phasecompile/phase

    goals

  goalexec/goal

    /goals

  /execution 

    /executions

 /plugin



It calls my ant script which fails but it goes on with my maven build :-(.



Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED]
wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component in main
project build ?
To: Maven Users List users@maven.apache.org,
[EMAIL PROTECTED]
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. [EMAIL PROTECTED]

 Yeah we have looked into nMaven but these are the existing projects and we
 do not want to put effort to convert them to nMaven _now_.

 Is there any way possible to call nant script from maven ?

 Thanks,

 Petr





 --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
 From: Wayne Fay [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in main
 project build ?
 To: Maven Users List users@maven.apache.org
 Date: Thursday, October 30, 2008, 11:47 PM

 On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]
wrote:
  I have a project that has many components. Some are written in dot
net
 and
 some are in java.We are moving our build environment to maven.

 I'd encourage you to look at NMaven:
 http://incubator.apache.org/nmaven/

 I don't use it myself, but I know others are using it successfully
 with their dot-net projects.

 Wayne

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









  


  

Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Petr V.
It's going to be a fun week end :-(

Okay so here is some more update . The nant script is call as many times as pom 
files I have in whole project ... I added the exec plugin definition in top pom 
file but it is executed for each sub module  How could I stop it from doing 
it ?

Any help will make my Halloween evening cool  :-)

Thanks,

Petr 

--- On Sat, 11/1/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: Re: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Saturday, November 1, 2008, 3:51 AM

I am able to call my nant buid via exec-maven-plugin but my nnat script is keep
callin agian and again and build process never ends.

I put the following in my top pom file of project. I guess phase mean when we
need to call the nant script iof folliwng snippet but what does
goalexec/goal mean ? 

plugin
   
groupIdorg.codehaus.mojo/groupId
   
artifactIdexec-maven-plugin/artifactId
    version1.1/version
    executions
  execution
    idnantbuild/id
    configuration
 
executablenant/executable
  
workingDirectoryF:\shared/workingDirectory
    /configuration
 
phasecompile/phase
    goals
 
goalexec/goal
    /goals
  /execution 
    /executions
/plugin   

Thanks,

Petr

--- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Friday, October 31, 2008, 10:58 PM

Okay as advised by Stephen  Connolly, from my maven pom file , I am trying to
call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do when
my called program or script via exec-maven-plugin fails



  plugin

    groupIdorg.codehaus.mojo/groupId

    artifactIdexec-maven-plugin/artifactId

    version1.1/version

    executions

  execution

    iddowithant/id

    configuration

  executableant/executable

    /configuration

              phasecompile/phase

    goals

  goalexec/goal

    /goals

  /execution 

    /executions

 /plugin



It calls my ant script which fails but it goes on with my maven build :-(.



Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED]
wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component in main
project build ?
To: Maven Users List users@maven.apache.org,
[EMAIL PROTECTED]
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. [EMAIL PROTECTED]

 Yeah we have looked into nMaven but these are the existing projects and we
 do not want to put effort to convert them to nMaven _now_.

 Is there any way possible to call nant script from maven ?

 Thanks,

 Petr





 --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
 From: Wayne Fay [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in main
 project build ?
 To: Maven Users List users@maven.apache.org
 Date: Thursday, October 30, 2008, 11:47 PM

 On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]
wrote:
  I have a project that has many components. Some are written in dot
net
 and
 some are in java.We are moving our build environment to maven.

 I'd encourage you to look at NMaven:
 http://incubator.apache.org/nmaven/

 I don't use it myself, but I know others are using it successfully
 with their dot-net projects.

 Wayne

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









  


  


  

Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Stephen Connolly

add inherited false to the plugin section

Sent from my iPod

On 31 Oct 2008, at 23:10, Petr V. [EMAIL PROTECTED] wrote:


It's going to be a fun week end :-(

Okay so here is some more update . The nant script is call as many  
times as pom files I have in whole project ... I added the exec  
plugin definition in top pom file but it is executed for each sub  
module  How could I stop it from doing it ?


Any help will make my Halloween evening cool  :-)

Thanks,

Petr

--- On Sat, 11/1/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: Re: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Saturday, November 1, 2008, 3:51 AM

I am able to call my nant buid via exec-maven-plugin but my nnat  
script is keep

callin agian and again and build process never ends.

I put the following in my top pom file of project. I guess phase  
mean when we

need to call the nant script iof folliwng snippet but what does
goalexec/goal mean ?

plugin

groupIdorg.codehaus.mojo/groupId

artifactIdexec-maven-plugin/artifactId
version1.1/version
executions
  execution
idnantbuild/id
configuration

executablenant/executable

workingDirectoryF:\shared/workingDirectory
/configuration

phasecompile/phase
goals

goalexec/goal
/goals
  /execution
/executions
/plugin

Thanks,

Petr

--- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
From: Petr V. [EMAIL PROTECTED]
Subject: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Date: Friday, October 31, 2008, 10:58 PM

Okay as advised by Stephen  Connolly, from my maven pom file , I am  
trying to

call some other script(let's
assume it is an ant script for sake of discussion) which fails but my
maven build process goes on. I want my maven build to fail if it calls
some external script which fails. I looked at documentation of plugin
but I don't see any option that would help me setting up what to do  
when

my called program or script via exec-maven-plugin fails



  plugin

groupIdorg.codehaus.mojo/groupId

artifactIdexec-maven-plugin/artifactId

version1.1/version

executions

  execution

iddowithant/id

configuration

  executableant/executable

/configuration

  phasecompile/phase

goals

  goalexec/goal

/goals

  /execution

/executions

 /plugin



It calls my ant script which fails but it goes on with my maven  
build :-(.




Is there any way I can catch the failure of external script ?



Thanks,



Petr


--- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED] 


wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component in  
main

project build ?
To: Maven Users List users@maven.apache.org,
[EMAIL PROTECTED]
Date: Friday, October 31, 2008, 2:13 AM

have a look at the exec-maven-plugin

2008/10/30 Petr V. [EMAIL PROTECTED]

Yeah we have looked into nMaven but these are the existing projects  
and we

do not want to put effort to convert them to nMaven _now_.

Is there any way possible to call nant script from maven ?

Thanks,

Petr





--- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
From: Wayne Fay [EMAIL PROTECTED]
Subject: Re: Nant Plugin for Maven to integrate dot net component  
in main

project build ?
To: Maven Users List users@maven.apache.org
Date: Thursday, October 30, 2008, 11:47 PM

On Thu, Oct 30, 2008 at 10:37 AM, Petr V. [EMAIL PROTECTED]

wrote:

I have a project that has many components. Some are written in dot

net

and
some are in java.We are moving our build environment to maven.

I'd encourage you to look at NMaven:
http://incubator.apache.org/nmaven/

I don't use it myself, but I know others are using it successfully
with their dot-net projects.

Wayne

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



Re: exec-maven-plugin exit Code Issue

2008-10-31 Thread Petr V.
Worked like a charm. BIG THANK YOU Stephen. 

--- On Sat, 11/1/08, Stephen Connolly [EMAIL PROTECTED] wrote:
From: Stephen Connolly [EMAIL PROTECTED]
Subject: Re: exec-maven-plugin exit Code Issue
To: Maven Users List users@maven.apache.org
Cc: Maven Users List users@maven.apache.org
Date: Saturday, November 1, 2008, 4:11 AM

add inherited false to the plugin section

Sent from my iPod

On 31 Oct 2008, at 23:10, Petr V. [EMAIL PROTECTED]
wrote:

 It's going to be a fun week end :-(

 Okay so here is some more update . The nant script is call as many  
 times as pom files I have in whole project ... I added the exec  
 plugin definition in top pom file but it is executed for each sub  
 module  How could I stop it from doing it ?

 Any help will make my Halloween evening cool  :-)

 Thanks,

 Petr

 --- On Sat, 11/1/08, Petr V. [EMAIL PROTECTED] wrote:
 From: Petr V. [EMAIL PROTECTED]
 Subject: Re: exec-maven-plugin exit Code Issue
 To: Maven Users List users@maven.apache.org
 Date: Saturday, November 1, 2008, 3:51 AM

 I am able to call my nant buid via exec-maven-plugin but my nnat  
 script is keep
 callin agian and again and build process never ends.

 I put the following in my top pom file of project. I guess phase  
 mean when we
 need to call the nant script iof folliwng snippet but what does
 goalexec/goal mean ?

 plugin

 groupIdorg.codehaus.mojo/groupId

 artifactIdexec-maven-plugin/artifactId
 version1.1/version
 executions
   execution
 idnantbuild/id
 configuration

 executablenant/executable

 workingDirectoryF:\shared/workingDirectory
 /configuration

 phasecompile/phase
 goals

 goalexec/goal
 /goals
   /execution
 /executions
 /plugin

 Thanks,

 Petr

 --- On Fri, 10/31/08, Petr V. [EMAIL PROTECTED] wrote:
 From: Petr V. [EMAIL PROTECTED]
 Subject: exec-maven-plugin exit Code Issue
 To: Maven Users List users@maven.apache.org
 Date: Friday, October 31, 2008, 10:58 PM

 Okay as advised by Stephen  Connolly, from my maven pom file , I am  
 trying to
 call some other script(let's
 assume it is an ant script for sake of discussion) which fails but my
 maven build process goes on. I want my maven build to fail if it calls
 some external script which fails. I looked at documentation of plugin
 but I don't see any option that would help me setting up what to do  
 when
 my called program or script via exec-maven-plugin fails



   plugin

 groupIdorg.codehaus.mojo/groupId

 artifactIdexec-maven-plugin/artifactId

 version1.1/version

 executions

   execution

 iddowithant/id

 configuration

   executableant/executable

 /configuration

   phasecompile/phase

 goals

   goalexec/goal

 /goals

   /execution

 /executions

  /plugin



 It calls my ant script which fails but it goes on with my maven  
 build :-(.



 Is there any way I can catch the failure of external script ?



 Thanks,



 Petr


 --- On Fri, 10/31/08, Stephen Connolly [EMAIL PROTECTED]

 
 wrote:
 From: Stephen Connolly [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component in  
 main
 project build ?
 To: Maven Users List users@maven.apache.org,
 [EMAIL PROTECTED]
 Date: Friday, October 31, 2008, 2:13 AM

 have a look at the exec-maven-plugin

 2008/10/30 Petr V. [EMAIL PROTECTED]

 Yeah we have looked into nMaven but these are the existing projects  
 and we
 do not want to put effort to convert them to nMaven _now_.

 Is there any way possible to call nant script from maven ?

 Thanks,

 Petr





 --- On Thu, 10/30/08, Wayne Fay [EMAIL PROTECTED] wrote:
 From: Wayne Fay [EMAIL PROTECTED]
 Subject: Re: Nant Plugin for Maven to integrate dot net component  
 in main
 project build ?
 To: Maven Users List users@maven.apache.org
 Date: Thursday, October 30, 2008, 11:47 PM

 On Thu, Oct 30, 2008 at 10:37 AM, Petr V.
[EMAIL PROTECTED]
 wrote:
 I have a project that has many components. Some are written in dot
 net
 and
 some are in java.We are moving our build environment to maven.

 I'd encourage you to look at NMaven:
 http://incubator.apache.org/nmaven/

 I don't use it myself, but I know others are using it successfully
 with their dot-net projects.

 Wayne

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




  

multiple execution in exec-maven-plugin

2008-05-15 Thread syllepsa

Hi,

I have to run two system applications using exec-maven-plugin thus I tried
an example from the FAQ of that plugin. Unfortunatelly the example doesn't
work on my machine. I'm using:

Maven version: 2.1-SNAPSHOT
Java version: 1.6.0_05
OS name: windows xp version: 5.1 arch: x86

Here is my pom.xml:

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
modelVersion4.0.0/modelVersion
groupIdpl.sollers.app/groupId
artifactIdkibo/artifactId
packagingjar/packaging
version0.0.1-SNAPSHOT/version
namekibo/name
urlhttp://maven.apache.org/url
build
  plugins
  plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 version1.1/version
 executions
 execution
 idexec-one/id
 phaseverify/phase
 configuration
 executableecho/executable
 arguments
 argumentexec one/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 execution
 idexec-two/id
 phaseverify/phase
 configuration
 executableecho/executable
 arguments
 argumentexec two/argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
/executions
/plugin
  /plugins
   /build
dependencies
dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version3.8.2/version
scopetest/scope
/dependency
/dependencies
/project

After typing exec:exec -e I get following output:

+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] 

One or more required mojo parameters have not been configured.

Mojo:
Group-Id: org.codehaus.mojo
Artifact-Id: exec-maven-plugin
Version: 1.1
Mojo: exec
brought in via: Direct invocation

While building project:
Group-Id: pl.sollers.app
Artifact-Id: kibo
Version: 0.0.1-SNAPSHOT
From file: C:\mml\workspace\kibo\pom.xml


Missing parameters include:
executable




Error stacktrace:
org.apache.maven.lifecycle.LifecycleExecutionException: Invalid or missing
parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for mojo:
org.codehaus.mojo:exec-maven-plugin:1.1:exec
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:537)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentsForProject(DefaultLifecycleExecutor.java:265)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at 
org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:225)
at
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:895)
at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
Caused by: org.apache.maven.plugin.PluginParameterException: Invalid or
missing parameters: [Mojo parameter [name: 'executable'; alias: 'null']] for
mojo: org.codehaus.mojo:exec-maven-plugin:1.1:exec
at
org.apache.maven.plugin.DefaultPluginManager.init$_aroundBody8(DefaultPluginManager.java:1061)
at
org.apache.maven.plugin.DefaultPluginManager.init$_aroundBody9$advice(DefaultPluginManager.java:497)
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:1061)
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:847

exec-maven-plugin exec:java question

2008-02-18 Thread robert . egan
What is the difference between arguments and commandLineArgs? I would 
guess, based on the descriptions, that the former affect the class while 
the latter affect the JVM, the command line being java. Yet elsewhere in 
the documentation it says that this runs within the same JVM and you must 
use exec:exec to change VM parameters, so that would seem to not be the 
case.

Hence, my confusion.


Thanks,
Robert Egan


This email message and any attachments may contain confidential, 
proprietary or non-public information.  The information is intended solely 
for the designated recipient(s).  If an addressing or transmission error 
has misdirected this email, please notify the sender immediately and 
destroy this email.  Any review, dissemination, use or reliance upon this 
information by unintended recipients is prohibited.  Any opinions 
expressed in this email are those of the author personally.

Re: Now what's up with exec-maven-plugin?

2008-01-17 Thread Stephen Coy
The site works for me and I can see the plugin at http://repo1.maven.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.1-beta-1/ 



Maybe you're having issues with your internal proxy?

Steve

On 18/01/2008, at 12:52 AM, Jeff Mutonho wrote:


Why am I getting :
[INFO] The plugin 'org.codehaus.mojo:exec-maven-plugin' does not  
exist or no

val
id version could be found

Is this no longer available? Has it moved ?
I've also noticed the plugin website
http://mojo.codehaus.org/exec-maven-plugin/ has mostly broken  
links( eg

Introduction ,Usage)




--

Don't take the name of root in vain.

Jeff  Mutonho
Cape Town
South Africa

GoogleTalk : ejbengine
Skype: ejbengine
Registered Linux user number 366042



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



Now what's up with exec-maven-plugin?

2008-01-17 Thread Jeff Mutonho
Why am I getting :
[INFO] The plugin 'org.codehaus.mojo:exec-maven-plugin' does not exist or no
val
id version could be found

Is this no longer available? Has it moved ?
I've also noticed the plugin website
http://mojo.codehaus.org/exec-maven-plugin/ has mostly broken links( eg
Introduction ,Usage)




-- 

Don't take the name of root in vain.

Jeff  Mutonho
Cape Town
South Africa

GoogleTalk : ejbengine
Skype: ejbengine
Registered Linux user number 366042


Re: Exec-maven-plugin usage

2007-11-16 Thread Dirk Olmes
Vishal Pahwa wrote:
 
 Hi
 
 I need to run a java program from maven. For that m gonna use
 exec-maven-plugin.  But don't know how to use this. Is it possible that
 I will create one new project with folder structure
 src/main/java/com/sky/Main.java. N then use plugin like this 
 
   build 
[...]

Looks good. What was the actual question?

Bear in mind that if you want to run classes that are compiled in the
same project, the goal you bind to must be after compile in the
lifecylcle, after all the class must have been compiled before you can
use it :-)

-dirk

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



Exec-maven-plugin usage

2007-11-14 Thread Vishal Pahwa


Hi

I need to run a java program from maven. For that m gonna use
exec-maven-plugin.  But don't know how to use this. Is it possible that
I will create one new project with folder structure
src/main/java/com/sky/Main.java. N then use plugin like this 

  build 
plugins 
plugin 
groupIdorg.codehaus.mojo/groupId 
artifactIdexec-maven-plugin/artifactId 
executions execution
 ... goals 
goaljava/goal 
/goals 
/execution
 /executions 
configuration
 mainClasscom.sky.Main/mainClass
 arguments 
argumentargument1/argument 
... /arguments 
systemProperties
 systemProperty
 keymyproperty/key
 valuemyvalue/value 
/systemProperty 
... /configuration 
/plugin
 /plugins
 /build 

Now if il use mvn:java then this should run the java program. Am I
thinking right or wrong.

Regards
Vishal 



Re: exec-maven-plugin

2007-10-05 Thread Tim Kettler

Hi,

have a look here [1] for the execution code of the plugin. If the
executable returns with an error return code or fails for another reason
the plugin fails the build and logs this on the console. As neither of
this log statements is in your log output, the shell script you invoke
most probably just doesn't return a proper error return code.

-Tim

[1] 
https://svn.codehaus.org/mojo/tags/exec-maven-plugin-1.1-beta-1/src/main/java/org/codehaus/mojo/exec/ExecMojo.java



[EMAIL PROTECTED] schrieb:
I am using the exec-maven-plugin to manipulate some classes and the exec 
fails.


  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
phaseprocess-classes/phase
goals
  goalexec/goal
/goals
configuration
  executable${ejbdeploy.output}/executable
/configuration
  /execution
/executions
  /plugin

${ejbdeploy.output} [if this wraps it's all one line]
D:/profiles/AppSrv01/bin/ejbdeploy.bat 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/generic/framework_Account.jar 
D:/wcmsuite73_maven/framework/components/framework-ejb/build/ 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/was6/framework_Account.jar 
-cp 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/framework.jar 
-debug -trace -nowarn -noinform -quiet


Unfortunately, according to the output, the build succeeds. How can I make 
the build fail in this scenario?


[INFO] [exec:exec {execution: default}]
[INFO]
[INFO] 
D:\wcmsuite73_maven\framework\components\framework-ejbD:/profiles/AppSr
v01/bin/ejbdeploy.bat 
D:/wcmsuite73_maven/framework/components/framework-ejb/.
./../dist/generic/framework_Account.jar 
D:/wcmsuite73_maven/framework/componen
ts/framework-ejb/build/ 
D:/wcmsuite73_maven/framework/components/framework-ejb
/../../dist/was6/framework_Account.jar -cp 
D:/wcmsuite73_maven/framework/compo
nents/framework-ejb/../../dist/framework.jar -debug -trace -nowarn 
-noinform -q

uiet
[INFO] [*Error] ejbModule/META-INF/ejb-jar.xml(Enterprise bean: Account): 
CHKJ28
02E: ejb-class class com.ph.framework.entitlements.ejb.impl.AccountBean, 
or on

e of its supertypes, cannot be reflected. Check the classpath.
[INFO]
[INFO] Execution Halted: Validation Errors Reported
[INFO] 1 Errors
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing 
D:\wcmsuite73_maven\framework\components\framework-ejb\pom.xml
 to C:\Documents and 
Settings\eganr\.m2\repository\com\ph\framework\framework-ej

b\7.4.0.0\framework-ejb-7.4.0.0.pom
[INFO] 


[INFO] BUILD SUCCESSFUL
[INFO] 


[INFO] Total time: 43 seconds
[INFO] Finished at: Thu Oct 04 21:03:09 EDT 2007
[INFO] Final Memory: 9M/26M
[INFO] 





This email message and any attachments may contain confidential, 
proprietary or non-public information.  The information is intended solely 
for the designated recipient(s).  If an addressing or transmission error 
has misdirected this email, please notify the sender immediately and 
destroy this email.  Any review, dissemination, use or reliance upon this 
information by unintended recipients is prohibited.  Any opinions 
expressed in this email are those of the author personally.



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



Re: exec-maven-plugin

2007-10-05 Thread robert . egan
Tim Kettler [EMAIL PROTECTED] wrote on 10/05/2007 02:02:51 AM:

 Hi,
 
 have a look here [1] for the execution code of the plugin. If the
 executable returns with an error return code or fails for another reason
 the plugin fails the build and logs this on the console. As neither of
 this log statements is in your log output, the shell script you invoke
 most probably just doesn't return a proper error return code.
 
 -Tim
 
 [1] 
 https://svn.codehaus.org/mojo/tags/exec-maven-plugin-1.1-
 beta-1/src/main/java/org/codehaus/mojo/exec/ExecMojo.java
 

I sort of expected this. I had to generate the .bat file myself because 
there was no way that I could see to call the exec plugin in a loop. So I 
wrote a plugin to perform the iteration and generate a single .bat with 
multiple calls to the real .bat. It looks like I'll have to enhance my 
plugin to include some kind of EXIT command in the single bat.

Thanks again
Robert Egan

This email message and any attachments may contain confidential, 
proprietary or non-public information.  The information is intended solely 
for the designated recipient(s).  If an addressing or transmission error 
has misdirected this email, please notify the sender immediately and 
destroy this email.  Any review, dissemination, use or reliance upon this 
information by unintended recipients is prohibited.  Any opinions 
expressed in this email are those of the author personally.


exec-maven-plugin

2007-10-04 Thread robert . egan
I am using the exec-maven-plugin to manipulate some classes and the exec 
fails.

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
phaseprocess-classes/phase
goals
  goalexec/goal
/goals
configuration
  executable${ejbdeploy.output}/executable
/configuration
  /execution
/executions
  /plugin

${ejbdeploy.output} [if this wraps it's all one line]
D:/profiles/AppSrv01/bin/ejbdeploy.bat 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/generic/framework_Account.jar
 
D:/wcmsuite73_maven/framework/components/framework-ejb/build/ 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/was6/framework_Account.jar
 
-cp 
D:/wcmsuite73_maven/framework/components/framework-ejb/../../dist/framework.jar
 
-debug -trace -nowarn -noinform -quiet

Unfortunately, according to the output, the build succeeds. How can I make 
the build fail in this scenario?

[INFO] [exec:exec {execution: default}]
[INFO]
[INFO] 
D:\wcmsuite73_maven\framework\components\framework-ejbD:/profiles/AppSr
v01/bin/ejbdeploy.bat 
D:/wcmsuite73_maven/framework/components/framework-ejb/.
./../dist/generic/framework_Account.jar 
D:/wcmsuite73_maven/framework/componen
ts/framework-ejb/build/ 
D:/wcmsuite73_maven/framework/components/framework-ejb
/../../dist/was6/framework_Account.jar -cp 
D:/wcmsuite73_maven/framework/compo
nents/framework-ejb/../../dist/framework.jar -debug -trace -nowarn 
-noinform -q
uiet
[INFO] [*Error] ejbModule/META-INF/ejb-jar.xml(Enterprise bean: Account): 
CHKJ28
02E: ejb-class class com.ph.framework.entitlements.ejb.impl.AccountBean, 
or on
e of its supertypes, cannot be reflected. Check the classpath.
[INFO]
[INFO] Execution Halted: Validation Errors Reported
[INFO] 1 Errors
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing 
D:\wcmsuite73_maven\framework\components\framework-ejb\pom.xml
 to C:\Documents and 
Settings\eganr\.m2\repository\com\ph\framework\framework-ej
b\7.4.0.0\framework-ejb-7.4.0.0.pom
[INFO] 

[INFO] BUILD SUCCESSFUL
[INFO] 

[INFO] Total time: 43 seconds
[INFO] Finished at: Thu Oct 04 21:03:09 EDT 2007
[INFO] Final Memory: 9M/26M
[INFO] 




This email message and any attachments may contain confidential, 
proprietary or non-public information.  The information is intended solely 
for the designated recipient(s).  If an addressing or transmission error 
has misdirected this email, please notify the sender immediately and 
destroy this email.  Any review, dissemination, use or reliance upon this 
information by unintended recipients is prohibited.  Any opinions 
expressed in this email are those of the author personally.

exec-maven-plugin - how to skip execution in a sub-project

2007-09-04 Thread szefo

Hi,
My project has a structure similar to this:

root
+child1
+child2

I use the exec goal in the root project. 
During the compilation process of both children the exec goal from root
project is executed and causes errors - thus I would like to skip it. I
would like it to be executed only during the compilation of the root
project. 
How can I achieve it?
Thanks in advance.
Tom
-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin--%3E-how-to-skip-execution-in-a-sub-project-tf4379678s177.html#a12484500
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: exec-maven-plugin - how to skip execution in a sub-project

2007-09-04 Thread Wayne Fay
This should work. In root/pom.xml, in the exec plugin config, set
inherited=false.
plugin
  artifactIdmaven-exec-plugin/artifactId
  inheritedfalse/inherited

Alternatively, you could put the exec plugin in a profile, and only
use that profile when building from the root ie -Pdoexec.

Wayne

On 9/4/07, szefo [EMAIL PROTECTED] wrote:

 Hi,
 My project has a structure similar to this:

 root
+child1
+child2

 I use the exec goal in the root project.
 During the compilation process of both children the exec goal from root
 project is executed and causes errors - thus I would like to skip it. I
 would like it to be executed only during the compilation of the root
 project.
 How can I achieve it?
 Thanks in advance.
 Tom
 --
 View this message in context: 
 http://www.nabble.com/exec-maven-plugin--%3E-how-to-skip-execution-in-a-sub-project-tf4379678s177.html#a12484500
 Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: exec-maven-plugin - how to skip execution in a sub-project

2007-09-04 Thread szefo

Inherited=false works!
Thanks


Wayne Fay wrote:
 
 This should work. In root/pom.xml, in the exec plugin config, set
 inherited=false.
 plugin
   artifactIdmaven-exec-plugin/artifactId
   inheritedfalse/inherited
 
 Alternatively, you could put the exec plugin in a profile, and only
 use that profile when building from the root ie -Pdoexec.
 
 Wayne
 
 On 9/4/07, szefo [EMAIL PROTECTED] wrote:

 Hi,
 My project has a structure similar to this:

 root
+child1
+child2

 I use the exec goal in the root project.
 During the compilation process of both children the exec goal from root
 project is executed and causes errors - thus I would like to skip it. I
 would like it to be executed only during the compilation of the root
 project.
 How can I achieve it?
 Thanks in advance.
 Tom
 --
 View this message in context:
 http://www.nabble.com/exec-maven-plugin--%3E-how-to-skip-execution-in-a-sub-project-tf4379678s177.html#a12484500
 Sent from the Maven - Users mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin--%3E-how-to-skip-execution-in-a-sub-project-tf4379678s177.html#a12485061
Sent from the Maven - Users mailing list archive at Nabble.com.


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



[m2] anyone have exec-maven-plugin JDeveloper genInterface working for webservices?

2007-06-06 Thread Mick Knutson

I could really use some examples to help getting this to run through
maven...

--
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---


multiple execution in exec-maven-plugin

2007-05-18 Thread Erez Nahir

Hi,

I need to call some executables from a single pom file and using 
exec-maven-plugin for that.


Is there a way to configure it to run a set of executions and not just one?

Thanks,
Erez.

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



Re: [m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Steven Rowe
Hi Adrian,

How are you invoking Maven?  mvn package?  (or some lifecycle phase
after process-test-resources)?

Steve

Adrian Herscu wrote:
 Hi all,
 
 I am using the exec-maven-plugin to run some Java program.
 The java goal is bound to the process-test-resource build phase.
 
 The exec-maven-plugin:java runs at the designated phase but no other
 thing runs afterwards -- the build finishes with this message:
 BUILD SUCCESSFUL
 Total time: 1 second
 
 Please help,
 Adrian.


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



[m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Adrian Herscu

Hi all,

I am using the exec-maven-plugin to run some Java program.
The java goal is bound to the process-test-resource build phase.

The exec-maven-plugin:java runs at the designated phase but no other 
thing runs afterwards -- the build finishes with this message:

BUILD SUCCESSFUL
Total time: 1 second

Please help,
Adrian.


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



Re: [m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Adrian Herscu

Hi Steven,

I am invoking Maven as usual:
mvn clean install

If I am removing the exec-maven-plugin then the build lifecycle 
completes as expected.


Adrian.

Steven Rowe wrote:

Hi Adrian,

How are you invoking Maven?  mvn package?  (or some lifecycle phase
after process-test-resources)?

Steve

Adrian Herscu wrote:

Hi all,

I am using the exec-maven-plugin to run some Java program.
The java goal is bound to the process-test-resource build phase.

The exec-maven-plugin:java runs at the designated phase but no other
thing runs afterwards -- the build finishes with this message:
BUILD SUCCESSFUL
Total time: 1 second

Please help,
Adrian.



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



Re: [m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Jerome Lacoste

On 4/22/07, Adrian Herscu [EMAIL PROTECTED] wrote:

Hi Steven,

I am invoking Maven as usual:
mvn clean install

If I am removing the exec-maven-plugin then the build lifecycle
completes as expected.

Adrian.


1- report problems releated to the exec mojo project on the mojo user
list ( [EMAIL PROTECTED])

2- which version of the exec mojo are you using ?

3- what if you only do mvn install ? Is there still a problem of
shortened build lifecycle ?

4- can you send the relevant extract of your pom.xml as well as from
the ouput of mvn -X clean install ?

5- can you send a test project that reproduces the problem ?

Cheers,

Jerome

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



Re: [m2] exec-maven-plugin java goal stops the build lifecycle

2007-04-22 Thread Adrian Herscu

OK -- I am posting the issue on the [EMAIL PROTECTED] list.
Adrian.

Jerome Lacoste wrote:

On 4/22/07, Adrian Herscu [EMAIL PROTECTED] wrote:

Hi Steven,

I am invoking Maven as usual:
mvn clean install

If I am removing the exec-maven-plugin then the build lifecycle
completes as expected.

Adrian.


1- report problems releated to the exec mojo project on the mojo user
list ( [EMAIL PROTECTED])

2- which version of the exec mojo are you using ?

3- what if you only do mvn install ? Is there still a problem of
shortened build lifecycle ?

4- can you send the relevant extract of your pom.xml as well as from
the ouput of mvn -X clean install ?

5- can you send a test project that reproduces the problem ?

Cheers,

Jerome



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



[m2] exec-maven-plugin in a multiproject

2007-04-17 Thread Adrian Herscu

Hi all,

I am using Maven 2.0.6 with the exec-maven-plugin 1.1-beta-1.
My project has a structure similar to this:

root
+child1
+child2

In child2 I am using the java goal and in child1 I am using the exec goal.

When I am building child2 alone everything works fine.
When I am building the root I am getting the error below.
If I remove the exec-maven-plugin from child1 then every works fine 
again. Something from the first instance (child1) interferes with the 
second instance (child2).


Please help,
Adrian.

Here is the error:

[INFO] Preparing exec:java
[WARNING] Removing: java from forked lifecycle, to prevent recursive 
invocation.


[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default}]
[INFO] 


[ERROR] BUILD ERROR
[INFO] 


---
constituent[0]: 
file:/C:/PROGRA~1/Java/MAVEN-~1.6/bin/../lib/maven-core-2.0.6-ub

er.jar
constituent[1]: 
file:/C:/DOCUME~1/pm/M2639C~1/REPOSI~1/org/myproject/build/extensio

ns/myproject-build-extensions/1.0-alpha-1/myproject-build-extensions-1.0-alpha-1.jar

[AH] NOTE: this artifact is produced by some other child under the root.
[AH] NOTE: I have other children which use it, but without using the 
exec-maven-plugin, and it doesn't interfere.


---
java.lang.NullPointerException
at 
org.apache.maven.usability.MojoExecutionExceptionDiagnoser.diagnose(M

ojoExecutionExceptionDiagnoser.java:64)
at 
org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro

rDiagnostics.java:84)
at 
org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:711)

at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:656)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:131)
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(DelegatingMethodAcces

sorImpl.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)


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



Re: [m2] exec-maven-plugin fails because path containing spaces

2007-04-17 Thread franz see

Good day,

How about using the antrun plugin instead? ( see [1] )

Cheers,
Franz

[1] http://maven.apache.org/plugins/maven-antrun-plugin/


Adrian Herscu-2 wrote:
 
 Added
   localRepositoryC:\DOCUME~1\pm\M2639C~1\REPOSI~1/localRepository
 
 to the M2 install settings.xml.
 
 But, this may require changes in other machines as well :-(
 
 Phill Moran wrote:
 Surround them in quotes or use the dos short for. For instance program
 files
 == progra~1 
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Herscu
 Sent: April 16, 2007 3:07 PM
 To: users@maven.apache.org
 Subject: [m2] exec-maven-plugin fails because path containing spaces
 
 Hi all,
 
 I am trying to run Ant 1.7 from within Maven 2 using the
 exec-maven-plugin.
 
plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  executions
execution
  phaseprocess-test-resources/phase
  goals
goaljava/goal
  /goals
/execution
  /executions
  configuration
mainClassorg.apache.tools.ant.Main/mainClass
workingDirectory${basedir}/workingDirectory
arguments
  argument-buildfile/argument
  argument${basedir}/mybuild.xml/argument
/arguments
  /configuration
/plugin
 
 It seems that there is a problem with Windows paths containing spaces.
 Anyone knows about a decent workaround?
 
 Thanks,
 Adrian.
 
 P.S. The error log:[[
 
 
 BUILD FAILED
 java.lang.IllegalArgumentException
  at java.net.URI.create(URI.java:842)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
 a:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
  at
 org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
  at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
  at org.apache.tools.ant.Project.setAntLib(Project.java:313)
  at org.apache.tools.ant.Project.initProperties(Project.java:309)
  at org.apache.tools.ant.Project.init(Project.java:295)
  at org.apache.tools.ant.Main.runBuild(Main.java:663)
  at org.apache.tools.ant.Main.startAnt(Main.java:199)
  at org.apache.tools.ant.Main.start(Main.java:161)
  at org.apache.tools.ant.Main.main(Main.java:250)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
 a:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
  at java.lang.Thread.run(Thread.java:595)
 Caused by: java.net.URISyntaxException: Illegal character in path at
 index 18:
 file:/C:/Documents and
 Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
  at java.net.URI$Parser.fail(URI.java:2816)
  at java.net.URI$Parser.checkChars(URI.java:2989)
  at java.net.URI$Parser.parseHierarchical(URI.java:3073)
  at java.net.URI$Parser.parse(URI.java:3021)
  at java.net.URI.init(URI.java:578)
  at java.net.URI.create(URI.java:840)
  ... 20 more
 
 Total time: 0 seconds
 java.lang.IllegalArgumentException
  at java.net.URI.create(URI.java:842)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
 a:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
  at
 org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
  at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
  at org.apache.tools.ant.Project.setAntLib(Project.java:313)
  at org.apache.tools.ant.Project.initProperties(Project.java:309)
  at org.apache.tools.ant.Project.init(Project.java:295)
  at org.apache.tools.ant.Main.runBuild(Main.java:663)
  at org.apache.tools.ant.Main.startAnt(Main.java:199)
  at org.apache.tools.ant.Main.start(Main.java:161)
  at org.apache.tools.ant.Main.main(Main.java:250)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
 a:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.codehaus.mojo.exec.ExecJavaMojo$1.run

Re: [m2] exec-maven-plugin fails because path containing spaces

2007-04-17 Thread Adrian Herscu
Good idea! Only problem is that antrun doesn't know about Ant 1.7... 
(and I need a specific feature of a specific task which is available 
only in Ant 1.7)


franz see wrote:

Good day,

How about using the antrun plugin instead? ( see [1] )

Cheers,
Franz

[1] http://maven.apache.org/plugins/maven-antrun-plugin/


Adrian Herscu-2 wrote:

Added
localRepositoryC:\DOCUME~1\pm\M2639C~1\REPOSI~1/localRepository

to the M2 install settings.xml.

But, this may require changes in other machines as well :-(

Phill Moran wrote:

Surround them in quotes or use the dos short for. For instance program
files
== progra~1 


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Herscu
Sent: April 16, 2007 3:07 PM
To: users@maven.apache.org
Subject: [m2] exec-maven-plugin fails because path containing spaces

Hi all,

I am trying to run Ant 1.7 from within Maven 2 using the
exec-maven-plugin.

   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
   execution
 phaseprocess-test-resources/phase
 goals
   goaljava/goal
 /goals
   /execution
 /executions
 configuration
   mainClassorg.apache.tools.ant.Main/mainClass
   workingDirectory${basedir}/workingDirectory
   arguments
 argument-buildfile/argument
 argument${basedir}/mybuild.xml/argument
   /arguments
 /configuration
   /plugin

It seems that there is a problem with Windows paths containing spaces.
Anyone knows about a decent workaround?

Thanks,
Adrian.

P.S. The error log:[[


BUILD FAILED
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at
index 18:
file:/C:/Documents and
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.init(URI.java:578)
at java.net.URI.create(URI.java:840)
... 20 more

Total time: 0 seconds
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39

Re: [m2] exec-maven-plugin fails because path containing spaces

2007-04-17 Thread Jerome Lacoste

On 4/17/07, Adrian Herscu [EMAIL PROTECTED] wrote:

Good idea! Only problem is that antrun doesn't know about Ant 1.7...
(and I need a specific feature of a specific task which is available
only in Ant 1.7)


http://jira.codehaus.org/browse/MANTRUN-68

You can fix it yourself. You probably just need to update the pom, as
long as ant 1.7. is on ibiblio.

Jerome

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



[m2] exec-maven-plugin fails because path containing spaces

2007-04-16 Thread Adrian Herscu

Hi all,

I am trying to run Ant 1.7 from within Maven 2 using the exec-maven-plugin.

  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
  execution
phaseprocess-test-resources/phase
goals
  goaljava/goal
/goals
  /execution
/executions
configuration
  mainClassorg.apache.tools.ant.Main/mainClass
  workingDirectory${basedir}/workingDirectory
  arguments
argument-buildfile/argument
argument${basedir}/mybuild.xml/argument
  /arguments
/configuration
  /plugin

It seems that there is a problem with Windows paths containing spaces.
Anyone knows about a decent workaround?

Thanks,
Adrian.

P.S. The error log:[[


BUILD FAILED
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
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.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at 
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at 
index 18: file:/C:/Documents and 
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar

at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.init(URI.java:578)
at java.net.URI.create(URI.java:840)
... 20 more

Total time: 0 seconds
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
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.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at 
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at 
index 18: file:/C:/Documents and 
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar

at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.init(URI.java:578)
at java.net.URI.create(URI.java:840)
... 20 more


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

RE: [m2] exec-maven-plugin fails because path containing spaces

2007-04-16 Thread Phill Moran
Surround them in quotes or use the dos short for. For instance program files
== progra~1 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Herscu
Sent: April 16, 2007 3:07 PM
To: users@maven.apache.org
Subject: [m2] exec-maven-plugin fails because path containing spaces

Hi all,

I am trying to run Ant 1.7 from within Maven 2 using the exec-maven-plugin.

   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
   execution
 phaseprocess-test-resources/phase
 goals
   goaljava/goal
 /goals
   /execution
 /executions
 configuration
   mainClassorg.apache.tools.ant.Main/mainClass
   workingDirectory${basedir}/workingDirectory
   arguments
 argument-buildfile/argument
 argument${basedir}/mybuild.xml/argument
   /arguments
 /configuration
   /plugin

It seems that there is a problem with Windows paths containing spaces.
Anyone knows about a decent workaround?

Thanks,
Adrian.

P.S. The error log:[[


BUILD FAILED
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at index 18:
file:/C:/Documents and
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.init(URI.java:578)
at java.net.URI.create(URI.java:840)
... 20 more

Total time: 0 seconds
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at index 18:
file:/C:/Documents and
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars

Re: [m2] exec-maven-plugin fails because path containing spaces

2007-04-16 Thread Adrian Herscu

Added
localRepositoryC:\DOCUME~1\pm\M2639C~1\REPOSI~1/localRepository

to the M2 install settings.xml.

But, this may require changes in other machines as well :-(

Phill Moran wrote:

Surround them in quotes or use the dos short for. For instance program files
== progra~1 


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Herscu
Sent: April 16, 2007 3:07 PM
To: users@maven.apache.org
Subject: [m2] exec-maven-plugin fails because path containing spaces

Hi all,

I am trying to run Ant 1.7 from within Maven 2 using the exec-maven-plugin.

   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
   execution
 phaseprocess-test-resources/phase
 goals
   goaljava/goal
 /goals
   /execution
 /executions
 configuration
   mainClassorg.apache.tools.ant.Main/mainClass
   workingDirectory${basedir}/workingDirectory
   arguments
 argument-buildfile/argument
 argument${basedir}/mybuild.xml/argument
   /arguments
 /configuration
   /plugin

It seems that there is a problem with Windows paths containing spaces.
Anyone knows about a decent workaround?

Thanks,
Adrian.

P.S. The error log:[[


BUILD FAILED
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path at index 18:
file:/C:/Documents and
Settings/pm/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
at java.net.URI$Parser.fail(URI.java:2816)
at java.net.URI$Parser.checkChars(URI.java:2989)
at java.net.URI$Parser.parseHierarchical(URI.java:3073)
at java.net.URI$Parser.parse(URI.java:3021)
at java.net.URI.init(URI.java:578)
at java.net.URI.create(URI.java:840)
... 20 more

Total time: 0 seconds
java.lang.IllegalArgumentException
at java.net.URI.create(URI.java:842)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at
org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at org.apache.tools.ant.Main.runBuild(Main.java:663)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.Main.start(Main.java:161)
at org.apache.tools.ant.Main.main(Main.java:250)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.URISyntaxException: Illegal character in path

Re: exec-maven-plugin: Swing app disappears immediately?

2007-03-30 Thread Jerome Lacoste

On 3/23/07, jason r tibbetts [EMAIL PROTECTED] wrote:

 I haven't tried this, but from reading
 http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html 
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html
 I believe that
 cleanupDaemonThreads 
https://webmail.valtech.com/exchange/Barrett.Nuzum/Drafts/RE:%20exec-maven-plugin:%20Swing%20app%20disappears%20immediately_x003F_.EML/1_text.htm#cleanupDaemonThreads
  = false
 is what you want.

Thanks, Barrett. I didn't try that, but I did set keepAlive to true,
and that did the trick--despite the fact that the documentation says
that keepAlive is deprecated!


Please do NOT depend on a deprecated element. It will be removed in
the next version.

Second maven should stop. The even thread is not a daemon thread so
maven should not go on until the thread is terminated.

Maybe the event thread doesn't have the time to be fully started
before maven takes control again ?

If so, adding a Sleep(1 sec) at the end of your main() should solve it
until we find a better way to solve this.

Please open an issue in the Jira issue tracker.

Cheers,

Jerome

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



exec-maven-plugin: Swing app disappears immediately?

2007-03-23 Thread jason r tibbetts
I've configured the exec plugin to launch a simple Swing app using the 
'java' goal, not 'exec'. The app appears, but then immediately 
disappears. I understand that the app is running within Maven's VM, but 
I don't understand whether or how the various options can be used to 
keep the app alive so that I can use it.


This is a multi-module project.
(parent)/
 - common/
 - client/
   - src/main/java/FooTool

I've configured the exec-maven-plugin in the client's pom.xml:

build
  plugins
pluginorg.codehaus.mojo/plugin
  artifactIdexec-maven-plugin/artifactId
  executions
execution
  goaljava/goal
/execution
  /executions
  configuration
mainClassFooTool/mainClass
  /configuration
/plugin
  /plugins
/build


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



RE: exec-maven-plugin: Swing app disappears immediately?

2007-03-23 Thread Barrett Nuzum
Jason:
 
I haven't tried this, but from reading
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html 
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html 
I believe that
cleanupDaemonThreads 
https://webmail.valtech.com/exchange/Barrett.Nuzum/Drafts/RE:%20exec-maven-plugin:%20Swing%20app%20disappears%20immediately_x003F_.EML/1_text.htm#cleanupDaemonThreads
  = false 
is what you want.
 
Give it a shot. 
 
Barrett
 
::   
Barrett Nuzum
Consultant, Skill Development
Direct: 918.640.4414
Fax: 972.789.1340 

Valtech Technologies, Inc.
5080 Spectrum Drive
Suite 700 West
Addison, Texas 75001
www.valtech.com http://www.valtech.com/   
making IT business friendly




From: jason r tibbetts [mailto:[EMAIL PROTECTED]
Sent: Fri 3/23/2007 9:52 AM
To: users@maven.apache.org
Subject: exec-maven-plugin: Swing app disappears immediately?



I've configured the exec plugin to launch a simple Swing app using the
'java' goal, not 'exec'. The app appears, but then immediately
disappears. I understand that the app is running within Maven's VM, but
I don't understand whether or how the various options can be used to
keep the app alive so that I can use it.

This is a multi-module project.
(parent)/
  - common/
  - client/
- src/main/java/FooTool

I've configured the exec-maven-plugin in the client's pom.xml:

build
   plugins
 pluginorg.codehaus.mojo/plugin
   artifactIdexec-maven-plugin/artifactId
   executions
 execution
   goaljava/goal
 /execution
   /executions
   configuration
 mainClassFooTool/mainClass
   /configuration
 /plugin
   /plugins
/build


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



Re: exec-maven-plugin: Swing app disappears immediately?

2007-03-23 Thread jason r tibbetts

I haven't tried this, but from reading
http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html http://mojo.codehaus.org/exec-maven-plugin/java-mojo.html 
I believe that
cleanupDaemonThreads https://webmail.valtech.com/exchange/Barrett.Nuzum/Drafts/RE:%20exec-maven-plugin:%20Swing%20app%20disappears%20immediately_x003F_.EML/1_text.htm#cleanupDaemonThreads  = false 
is what you want.


Thanks, Barrett. I didn't try that, but I did set keepAlive to true, 
and that did the trick--despite the fact that the documentation says 
that keepAlive is deprecated!



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



Re: [m2] exec-maven-plugin = path with spaces is truncated

2007-02-25 Thread Jerome Lacoste

On 2/21/07, bkbonner [EMAIL PROTECTED] wrote:


It seems that 1.1-SNAPSHOT on codehaus repository fixes this problem.

Is there any chance of a 1.1 release for this exec-maven-plugin?


Some of the threading management semantics introduced in 1.1-SNAPSHOT
have to be revised before the plugin is ready for release. I will see
when I get the time to fix that.

Jerome

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



exec-maven-plugin = path with spaces is truncated

2007-02-21 Thread bkbonner

I tried running the following POM using:

mvn generate-sources

POM:


plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
execution
idstart derby network 
server/id
phasegenerate-sources/phase
goals
goalexec/goal
/goals
configuration

executablejava/executable
arguments

argument-classpath/argument
classpath /
argument

org.apache.derby.drda.NetworkServerControl
/argument

argumentstart/argument
/arguments
/configuration
/execution
execution
idshutdown derby network 
server/id
phaseinstall/phase
goals
goalexec/goal
/goals
configuration

executablejava/executable
arguments

argument-classpath/argument
classpath /
argument

org.apache.derby.drda.NetworkServerControl
/argument

argumentshutdown/argument
/arguments
/configuration
/execution
/executions
/plugin


and the following snippet comes from the console:

[INFO] [exec:exec {execution: start derby network server}]
[INFO] 'C:\Documents' is not recognized as an internal or external command,
[INFO] operable program or batch file.

My project is located under C:\Documents and
Settings\fus4076\workspace\pim-biz

It looks like it's truncating spaces.  Is anyone else seeing this, or should
I log a JIRA for it?

Brian


-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin--%3D--path-with-spaces-is-truncated-tf3268904s177.html#a9087792
Sent from the Maven - Users mailing list archive at Nabble.com.


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



exec-maven-plugin = using exec to run a java program

2007-02-21 Thread bkbonner
\1.1\ehcach
e-1.1.jar;C:\Documents and
Settings\FUS4076\.m2\repository\org\springframework\s
pring-mock\2.0.2\spring-mock-2.0.2.jar;C:\pim-biz\target\classes
org.apache.der
by.drda.NetworkServerControl start execution is: '1'.
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Feb 21 14:49:03 EST 2007
[INFO] Final Memory: 3M/7M
[INFO]


[INFO] [exec:exec {execution: start derby network server}]
[INFO] 'C:\pim-biz\java' is not recognized as an internal or external
command,
[INFO] operable program or batch file.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Result of C:\pim-biz\java -classpath C:\Documents and
Settings\FUS4076\.m2\repository\org\hibernate\hibernate\3.0.5\hibernate-3.0.5.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\cglib\cglib\2.0.2\cglib-2.0.2.jar;C:\Documentsand
Settings\FUS4076\.m2\repository\org\springframework\spring\2.0.2\spring-2.0.2.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\com\ibatis\ibatis2-sqlmap\2.3.0\ibatis2-sqlmap-2.3.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\commons-collections\commons-collections\2.1.1\commons-collections-2.1.1.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\hibernate\antlr\2.7.5H3\antlr-2.7.5H3.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derby\10.2.2.0\derby-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\junit\junit\4.1\junit-4.1.jar;C:\Documents
and Settings\FUS4076\.m2\repository\asm\asm\1.4.3\asm-1.4.3.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derbyclient\10.2.2.0\derbyclient-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\mysql\mysql-connector-java\5.0.4\mysql-connector-java-5.0.4.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\servicemix\servicemix\2.0.2\servicemix-2.0.2.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\dom4j\dom4j\1.6\dom4j-1.6.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derbynet\10.2.2.0\derbynet-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\ehcache\ehcache\1.1\ehcache-1.1.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\springframework\spring-mock\2.0.2\spring-mock-2.0.2.jar;C:\pim-biz\target\classes
org.apache.derby.drda.NetworkServerControl start
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Feb 21 14:49:03 EST 2007
[INFO] Final Memory: 3M/7M
[INFO]



It seems to be prepending my project directory to the executable when it's
called.  Is there a way to have it just call the executable as java
instead of c:\pim-biz\java

Thanks.

Brian

p.s.  It seems 1.1-SNAPSHOT fixes this bug and the other bug I problem I
had.

-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin-%3D-using-exec-to-run-a-java-program-tf3269006s177.html#a9088216
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: [m2] exec-maven-plugin = path with spaces is truncated

2007-02-21 Thread bkbonner

It seems that 1.1-SNAPSHOT on codehaus repository fixes this problem.

Is there any chance of a 1.1 release for this exec-maven-plugin?

Brian


-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin--%3D--path-with-spaces-is-truncated-tf3268904s177.html#a9088232
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: JAXB 2.0-SNAPSHOT with exec Maven plugin

2007-01-31 Thread Jerome Lacoste

On 1/24/07, Michael Roepke [EMAIL PROTECTED] wrote:

Hi there,

I am facing a strange error when using JAXB 2.0-SNAPSHOT with exec Maven
plugin, please see

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving field DATETIME the class loader (instance of
org/codehaus/mojo/exec/ExecJavaMoj
o$IsolatedClassLoader) of the referring class,
javax/xml/datatype/DatatypeConstants, and the class loader (instance of
bootloader) for the field's resolved ty
pe, javax/xml/namespace/QName, have different Class objects for that type
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.clinit(RuntimeBu
iltinLeafInfoImpl.java:186)

Why is does the class is loaded by two different classloaders?


Probably the same as http://jira.codehaus.org/browse/MEXEC-9


And is there a solution for that?


You should try using the exec plugin version 1.1-SNAPSHOT as it
doesn't use the IsolatedClassLoader anymore.

Cheers,

Jerome



Thanks for any help
Michael from Brasil

Here you see my dependency site

Project Dependencies
compile

The following is a list of compile dependencies for this project. These
dependencies are required to compile and run the application:
GroupId ArtifactId  Version Classifier  TypeOptional
commons-email   commons-email   20030310.165926 -   jar
javax.xml   saaj-api1.3 -   jar
javax.xml.bind  jaxb-api2.0 -   jar
jaxbjaxb-api2.0-SNAPSHOT-   jar
jaxbjaxb-impl   2.0-SNAPSHOT-   jar
junit   junit   4.0 -   jar
vtours  VtoursAxisWebserviceClientSabre 3.3.14FK-   jar
wsdl4j  wsdl4j  1.5.3   -   jar
Project Transitive Dependencies

The following is a list of transitive dependencies for this project.
Transitive dependencies are the dependencies of the project dependencies.
compile

The following is a list of compile dependencies for this project. These
dependencies are required to compile and run the application:
GroupId ArtifactId  Version Classifier  TypeOptional
ant ant 1.6.5   -   jar
ant ant-optional1.5.1   -   jar
antlr   antlr   2.7.5H3 -   jar
aopalliance aopalliance 1.0 -   jar
asm asm 1.5.3   -   jar
asm asm-attrs   1.5.3   -   jar
c3p0c3p00.9.1   -   jar
cglib   cglib   2.1_3   -   jar
commons-beanutils   commons-beanutils   1.7.0   -   jar
commons-beanutils   commons-beanutils-core  1.7.0   -   jar
commons-codec   commons-codec   1.3 -   jar
commons-collections commons-collections 2.1.1   -   jar
commons-configuration   commons-configuration   1.3 -   jar
commons-digestercommons-digester1.6 -   jar
commons-discovery   commons-discovery   20040218.194635 -   jar

commons-io  commons-io  1.2 -   jar
commons-jxpath  commons-jxpath  1.2 -   jar
commons-langcommons-lang2.0 -   jar
commons-logging commons-logging 1.0.3   -   jar
commons-logging commons-logging-api 1.0.4   -   jar
commons-validator   commons-validator   1.3.0   -   jar
directory-namingnaming-core 0.8 -   jar
dom4j   dom4j   1.6.1   -   jar
freemarker  freemarker  2.3.6   -   jar
httpunithttpunit1.6.1   -   jar
javax.activationactivation  1.1 -   jar
javax.mail  mail1.4 -   jar
javax.persistence   persistence-api 1.0 -   jar
javax.servlet   servlet-api 2.3 -   jar
javax.transaction   jta 1.0.1B  -   jar
javax.xml.bind  jsr173_api  1.0 -   jar
jaxbactivation  1.0.2   -   jar
jaxbjsr173_api  1.0 -   jar
jboss   javassist   3.0 -   jar
jboss   jboss-archive-browsing  5.0.0alpha-200607201-119-   jar

jboss   jboss-client4.0.2   -   jar
jboss   jboss-common4.0.2   -   jar
jboss   jboss-ejb3  3   -   jar
jboss   jboss-ejb3x 3x  -   jar
jdomjdomb9  -   jar
jta jta 0.0.1   -   jar
jtidy   jtidy   r8-21122004 -   jar
log4j   log4j   1.2.13  -   jar
nekohtmlnekohtml0.9.1   -   jar
net.sf.ehcache  ehcache 1.2 -   jar
ojdbc   ojdbc   14  -   jar
org.apache.axis axis1.3 -   jar
org.apache.axis axis-jaxrpc 1.2 -   jar
org.apache.axis axis-saaj   1.4 -   jar
org.hibernate   ejb3-persistence1.0 -   jar
org.hibernate   hibernate   3.2.0.ga-   jar
org.hibernate   hibernate-annotations   3.2.0.ga-   jar
org.hibernate   hibernate-entitymanager 3.2.0.ga-   jar
org.springframework spring-aop  2.0.1   -   jar
org.springframework spring-beans2.0.1   -   jar
org.springframework spring-context  2.0.1   -   jar
org.springframework spring-core 2.0.1

Re: JAXB 2.0-SNAPSHOT with exec Maven plugin

2007-01-31 Thread Aleksei Valikov

Hi.


I am facing a strange error when using JAXB 2.0-SNAPSHOT with exec Maven
plugin, please see


Why don't you simply use maven-jaxb2-plugin?

https://maven-jaxb2-plugin.dev.java.net/

Bye.
/lexi

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



JAXB 2.0-SNAPSHOT with exec Maven plugin

2007-01-23 Thread Michael Roepke
Hi there,

I am facing a strange error when using JAXB 2.0-SNAPSHOT with exec Maven
plugin, please see

Caused by: java.lang.LinkageError: loader constraint violation: when
resolving field DATETIME the class loader (instance of
org/codehaus/mojo/exec/ExecJavaMoj
o$IsolatedClassLoader) of the referring class,
javax/xml/datatype/DatatypeConstants, and the class loader (instance of
bootloader) for the field's resolved ty
pe, javax/xml/namespace/QName, have different Class objects for that type
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.clinit(RuntimeBu
iltinLeafInfoImpl.java:186)

Why is does the class is loaded by two different classloaders? And is there
a solution for that?

Thanks for any help
Michael from Brasil

Here you see my dependency site

Project Dependencies
compile

The following is a list of compile dependencies for this project. These
dependencies are required to compile and run the application:
GroupId ArtifactId  Version Classifier  TypeOptional
commons-email   commons-email   20030310.165926 -   jar 
javax.xml   saaj-api1.3 -   jar 
javax.xml.bind  jaxb-api2.0 -   jar 
jaxbjaxb-api2.0-SNAPSHOT-   jar 
jaxbjaxb-impl   2.0-SNAPSHOT-   jar 
junit   junit   4.0 -   jar 
vtours  VtoursAxisWebserviceClientSabre 3.3.14FK-   jar 
wsdl4j  wsdl4j  1.5.3   -   jar 
Project Transitive Dependencies

The following is a list of transitive dependencies for this project.
Transitive dependencies are the dependencies of the project dependencies.
compile

The following is a list of compile dependencies for this project. These
dependencies are required to compile and run the application:
GroupId ArtifactId  Version Classifier  TypeOptional
ant ant 1.6.5   -   jar 
ant ant-optional1.5.1   -   jar 
antlr   antlr   2.7.5H3 -   jar 
aopalliance aopalliance 1.0 -   jar 
asm asm 1.5.3   -   jar 
asm asm-attrs   1.5.3   -   jar 
c3p0c3p00.9.1   -   jar 
cglib   cglib   2.1_3   -   jar 
commons-beanutils   commons-beanutils   1.7.0   -   jar 
commons-beanutils   commons-beanutils-core  1.7.0   -   jar 
commons-codec   commons-codec   1.3 -   jar 
commons-collections commons-collections 2.1.1   -   jar 
commons-configuration   commons-configuration   1.3 -   jar 
commons-digestercommons-digester1.6 -   jar 
commons-discovery   commons-discovery   20040218.194635 -   jar

commons-io  commons-io  1.2 -   jar 
commons-jxpath  commons-jxpath  1.2 -   jar 
commons-langcommons-lang2.0 -   jar 
commons-logging commons-logging 1.0.3   -   jar 
commons-logging commons-logging-api 1.0.4   -   jar 
commons-validator   commons-validator   1.3.0   -   jar 
directory-namingnaming-core 0.8 -   jar 
dom4j   dom4j   1.6.1   -   jar 
freemarker  freemarker  2.3.6   -   jar 
httpunithttpunit1.6.1   -   jar 
javax.activationactivation  1.1 -   jar 
javax.mail  mail1.4 -   jar 
javax.persistence   persistence-api 1.0 -   jar 
javax.servlet   servlet-api 2.3 -   jar 
javax.transaction   jta 1.0.1B  -   jar 
javax.xml.bind  jsr173_api  1.0 -   jar 
jaxbactivation  1.0.2   -   jar 
jaxbjsr173_api  1.0 -   jar 
jboss   javassist   3.0 -   jar 
jboss   jboss-archive-browsing  5.0.0alpha-200607201-119-   jar

jboss   jboss-client4.0.2   -   jar 
jboss   jboss-common4.0.2   -   jar 
jboss   jboss-ejb3  3   -   jar 
jboss   jboss-ejb3x 3x  -   jar 
jdomjdomb9  -   jar 
jta jta 0.0.1   -   jar 
jtidy   jtidy   r8-21122004 -   jar 
log4j   log4j   1.2.13  -   jar 
nekohtmlnekohtml0.9.1   -   jar 
net.sf.ehcache  ehcache 1.2 -   jar 
ojdbc   ojdbc   14  -   jar 
org.apache.axis axis1.3 -   jar 
org.apache.axis axis-jaxrpc 1.2 -   jar 
org.apache.axis axis-saaj   1.4 -   jar 
org.hibernate   ejb3-persistence1.0 -   jar 
org.hibernate   hibernate   3.2.0.ga-   jar 
org.hibernate   hibernate-annotations   3.2.0.ga-   jar 
org.hibernate   hibernate-entitymanager 3.2.0.ga-   jar 
org.springframework spring-aop  2.0.1   -   jar 
org.springframework spring-beans2.0.1   -   jar 
org.springframework spring-context  2.0.1

[m2] how to config exec-maven-plugin to run different java programs?

2006-09-29 Thread Man-Chi Leung

hi,

i would like to a use mvn to exec different java programs between the 
same project directory just similarly like  Ant tasks

$ant prog1 (execute my first java program)
$ant prog2 (execute my secound java program)

this is my current setting in pom.xml:
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
executions
execution
goals   
goaljava/goal
/goals
/execution
/executions
configuration
arguments
argument-classpath/argument
classpath /
/arguments
/configuration
/plugin

however, i only able to do the followings, which is a bit too long, any 
better way to shorten this ? yes, I am lazy :-P . sorry!

$mvn exec:java -Dexec.mainClass=com.example.Program1
$mvn exec:java -Dexec.mainClass=com.example.Program2

-
My question: is it possible to do these
-
$ant exec:prog1  (execute my first java program)
$mvn exec:prog2 (execute my secound java program)

pls help
~manchi



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



Re: exec-maven-plugin and classpath

2006-07-26 Thread Kaare Nilsen

Hi..

What you actually do here is to mix the configuration style og the
exec and the java goal. In the configuration of the java goal there is
no classpath element because it will automaticly be build based on
the project dependencies. Also I would remove the systemProperties
section (well that is if you do not actually need a system variable
with the key myproperty, and then i would reccomend renaming it :))
Please note that there was a bug in the java goal in the 1.0 version
of the plugin so please make shure you are using the 1.0.1 version.
Well. so the plugin config should then look something like this :

plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   version1.0.1/version
  executions
  execution
 phase[your wanted phase here. for valid ones see
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html]/phase
  goals
  goaljava/goal
  /goals
   /execution
   /executions
   configuration
   mainClasscom.caribbeancricket.walcott.tools.ArticleImporter/mainClass
  /configuration
/plugin


This is at least the setup that works for me. I see that a little more
documentation is needed on the mojo site.
But for any further question, please use the mojo user group .

Best regards
Kaare Nilsen

On 25/07/06, Sean Mitchell [EMAIL PROTECTED] wrote:

Hi All...

I'm trying to make the exec-maven-plugin run a java Main using the project's
classpath, but I'm running into trouble.

As per TFM I have specified the arguments thusly:

  arguments
  argument-classpath/argument
  !-- automatically creates the classpath using all project
dependencies,
  also adding the project build directory --
  classpath/
  /arguments

This gives me the nasty stacktrace at the bottom, using maven 2.0.2 and 2.0.4.

If I remove the classpath goop, it will attempt to run the specified class but
fails on the first dependency.

Anyone have any idea what is wrong?

Sean




-- excerpt from pom.xml -
  plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  executions
  execution
  goals
  goaljava/goal
  /goals
  /execution
  /executions
  configuration
mainClasscom.caribbeancricket.walcott.tools.ArticleImporter/mainClass
  arguments
  argument-classpath/argument
  !-- automatically creates the classpath using all project
dependencies,
  also adding the project build directory --
  classpath/
  /arguments
  systemProperties
  systemProperty
  keymyproperty/key
  valuemyvalue/value
  /systemProperty
  /systemProperties
  /configuration
  /plugin




--NASTY STACKTRACE---
[INFO] Trace
java.lang.ArrayStoreException
  at java.lang.System.arraycopy(Native Method)
  at java.util.ArrayList.toArray(ArrayList.java:304)
  at
org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.fromConfiguration(ArrayConverter.java:141)
  at
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
  at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
  at
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
  at
org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1033)
  at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:579)
  at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:393)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
  at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
  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

Re: exec-maven-plugin and classpath

2006-07-26 Thread Sean Mitchell
On Wednesday 26 July 2006 7:14 am, Kaare Nilsen wrote:

 This is at least the setup that works for me. I see that a little more
 documentation is needed on the mojo site.
 But for any further question, please use the mojo user group .

Thanks for your help... in fact, my problem was that the class I was trying to 
run had a runtime dependency (mysql driver) that was not listed in my pom.xml 
and I jumped to conclusions about the classpath. Your configuration worked 
fine once I sorted this out, as did a simple

mvn 
exec:java -Dexec.mainClass=com.caribbeancricket.walcott.tools.ArticleImporter

Cheers,

Sean


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



Re: exec-maven-plugin and classpath

2006-07-26 Thread Kaare Nilsen

Glad to help, and to make the commandline a little shorter you could
keep the following configuration in the pom (this is my preferred way
of use)

plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  version1.0.1/version
  configuration
  mainClasscom.caribbeancricket.walcott.tools.ArticleImporter/mainClass
 /configuration
/plugin

then in the commandline simply : mvn exec:java



On 26/07/06, Sean Mitchell [EMAIL PROTECTED] wrote:

On Wednesday 26 July 2006 7:14 am, Kaare Nilsen wrote:

 This is at least the setup that works for me. I see that a little more
 documentation is needed on the mojo site.
 But for any further question, please use the mojo user group .

Thanks for your help... in fact, my problem was that the class I was trying to
run had a runtime dependency (mysql driver) that was not listed in my pom.xml
and I jumped to conclusions about the classpath. Your configuration worked
fine once I sorted this out, as did a simple

mvn
exec:java -Dexec.mainClass=com.caribbeancricket.walcott.tools.ArticleImporter

Cheers,

Sean


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



exec-maven-plugin and classpath

2006-07-25 Thread Sean Mitchell
Hi All...

I'm trying to make the exec-maven-plugin run a java Main using the project's  
classpath, but I'm running into trouble.

As per TFM I have specified the arguments thusly:

          arguments
            argument-classpath/argument
            !-- automatically creates the classpath using all project 
dependencies,
            also adding the project build directory --
            classpath/
          /arguments

This gives me the nasty stacktrace at the bottom, using maven 2.0.2 and 2.0.4.

If I remove the classpath goop, it will attempt to run the specified class but 
fails on the first dependency.

Anyone have any idea what is wrong?

Sean




-- excerpt from pom.xml -
      plugin
        groupIdorg.codehaus.mojo/groupId
        artifactIdexec-maven-plugin/artifactId
        executions
          execution
            goals
              goaljava/goal
            /goals
          /execution
        /executions
        configuration          
mainClasscom.caribbeancricket.walcott.tools.ArticleImporter/mainClass
          arguments
            argument-classpath/argument
            !-- automatically creates the classpath using all project 
dependencies,
            also adding the project build directory --
            classpath/
          /arguments
          systemProperties
            systemProperty
              keymyproperty/key
              valuemyvalue/value
            /systemProperty
          /systemProperties
        /configuration
      /plugin




--NASTY STACKTRACE---
[INFO] Trace
java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.toArray(ArrayList.java:304)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter.fromConfiguration(ArrayConverter.java:141)
        at 
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
        at 
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
        at 
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
        at 
org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1033)
        at 
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:579)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:393)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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)

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