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 ?


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.






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.




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



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



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]




  

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]



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.


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]



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]



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: 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)
  at 

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]