Re: Problem Executing Application With Maven
Eh, did you read my response to your same question the other day? http://maven.40175.n5.nabble.com/Problem-Executing-Application-With-Maven-td3349323.html /Anders On Fri, Jan 21, 2011 at 10:41, Chintan Sanghavi wrote: > I am new to Spring & Maven. > > > > I have properly installed maven in my machine. > > Also able to compile the project code. > > > > But when I execute the java class using following command.. > > mvn -e exec:java -Dexec.mainClass=com.test.beg.Calculate -Dexec.args="3000 > 3"It gives error like... > > + Error stacktraces are turned on. > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'exec'. > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] Invalid task 'ûDexec.args=ö3000': you must specify a valid lifecycle > phas > e, or a goal in the format plugin:goal or > pluginGroupId:pluginArtifactId:pluginV > ersion:goal > [INFO] > > [INFO] Trace > org.apache.maven.BuildFailureException: Invalid task 'ûDexec.args=ö3000': > you mu > st specify a valid lifecycle phase, or a goal in the format plugin:goal or > plugi > nGroupId:pluginArtifactId:pluginVersion:goal >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor > (DefaultLifecycleExecutor.java:1830) >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy > AggregationNeeds(DefaultLifecycleExecutor.java:462) >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi > fecycleExecutor.java:175) >at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) >at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) >at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) >at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 > 0) >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) > [INFO] > > [INFO] Total time: 1 second > [INFO] Finished at: Mon Jan 10 15:48:43 IST 2011 > [INFO] Final Memory: 2M/3M > [INFO] > > Please help.
Problem Executing Application With Maven
I am new to Spring & Maven. I have properly installed maven in my machine. Also able to compile the project code. But when I execute the java class using following command.. mvn -e exec:java -Dexec.mainClass=com.test.beg.Calculate -Dexec.args="3000 3"It gives error like... + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'exec'. [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Invalid task 'ûDexec.args=ö3000': you must specify a valid lifecycle phas e, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginV ersion:goal [INFO] [INFO] Trace org.apache.maven.BuildFailureException: Invalid task 'ûDexec.args=ö3000': you mu st specify a valid lifecycle phase, or a goal in the format plugin:goal or plugi nGroupId:pluginArtifactId:pluginVersion:goal at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor (DefaultLifecycleExecutor.java:1830) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy AggregationNeeds(DefaultLifecycleExecutor.java:462) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:175) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) 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) [INFO] [INFO] Total time: 1 second [INFO] Finished at: Mon Jan 10 15:48:43 IST 2011 [INFO] Final Memory: 2M/3M [INFO] Please help.
Re: Problem Executing Application With Maven
Not sure why you're using Maven to execute this Maven class, but anyways... The error message possibly hints that there is some garbage chars on the command line. Did you copy the command line from somewhere? /Anders On Thu, Jan 20, 2011 at 10:23, Chintan Sanghavi wrote: > I am new to Spring & Maven. > > > > I have properly installed maven in my machine. > > Also able to compile the project code. > > > > But when I execute the java class using following command.. > > mvn -e exec:java -Dexec.mainClass=com.test.beg.Calculate -Dexec.args="3000 > 3"It gives error like... > > + Error stacktraces are turned on. > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'exec'. > [INFO] > > [ERROR] BUILD FAILURE > [INFO] > > [INFO] Invalid task 'ûDexec.args=ö3000': you must specify a valid lifecycle > phas > e, or a goal in the format plugin:goal or > pluginGroupId:pluginArtifactId:pluginV > ersion:goal > [INFO] > > [INFO] Trace > org.apache.maven.BuildFailureException: Invalid task 'ûDexec.args=ö3000': > you mu > st specify a valid lifecycle phase, or a goal in the format plugin:goal or > plugi > nGroupId:pluginArtifactId:pluginVersion:goal >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor > (DefaultLifecycleExecutor.java:1830) >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy > AggregationNeeds(DefaultLifecycleExecutor.java:462) >at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi > fecycleExecutor.java:175) >at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) >at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) >at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) >at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 > 0) >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) > [INFO] > > [INFO] Total time: 1 second > [INFO] Finished at: Mon Jan 10 15:48:43 IST 2011 > [INFO] Final Memory: 2M/3M > [INFO] > > Please help. >
Problem Executing Application With Maven
I am new to Spring & Maven. I have properly installed maven in my machine. Also able to compile the project code. But when I execute the java class using following command.. mvn -e exec:java -Dexec.mainClass=com.test.beg.Calculate -Dexec.args="3000 3"It gives error like... + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'exec'. [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Invalid task 'ûDexec.args=ö3000': you must specify a valid lifecycle phas e, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginV ersion:goal [INFO] [INFO] Trace org.apache.maven.BuildFailureException: Invalid task 'ûDexec.args=ö3000': you mu st specify a valid lifecycle phase, or a goal in the format plugin:goal or plugi nGroupId:pluginArtifactId:pluginVersion:goal at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor (DefaultLifecycleExecutor.java:1830) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy AggregationNeeds(DefaultLifecycleExecutor.java:462) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:175) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 0) 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) [INFO] [INFO] Total time: 1 second [INFO] Finished at: Mon Jan 10 15:48:43 IST 2011 [INFO] Final Memory: 2M/3M [INFO] Please help.