<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 3 ways to run Java main from Maven</title>
	<atom:link href="http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=3-ways-to-run-java-main-from-maven</link>
	<description>Java, Web 2.0 and other Tech topics</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:01:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: vineet</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-84037</link>
		<dc:creator>vineet</dc:creator>
		<pubDate>Thu, 02 Feb 2012 20:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-84037</guid>
		<description>Looks right to me.

I would try the following:
1) Try mvn -X to generate more debug info.
2) Also try the other approach as described in section 2) above: &quot;Running in a phase in pom.xml&quot;, see if that works.</description>
		<content:encoded><![CDATA[<p>Looks right to me.</p>
<p>I would try the following:<br />
1) Try mvn -X to generate more debug info.<br />
2) Also try the other approach as described in section 2) above: &#8220;Running in a phase in pom.xml&#8221;, see if that works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tensy</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-84028</link>
		<dc:creator>Tensy</dc:creator>
		<pubDate>Thu, 02 Feb 2012 19:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-84028</guid>
		<description>Hi Vineet, This post is really useful.
However, when I try to run the command, I see the following.
Command: mvn org.codehaus.mojo:exec-maven-plugin:1.2:java -e -Dexec.mainClass=com.myclass.Wsdl2XsdConverter

An exception occured while executing the Java class. com.myclass.Wsdl2XsdConverter
INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured while executing the Java class. com.myclass.Wsdl2XsdConverter
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
	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:592)
	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)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. com.qpass.googlecarrierbilling.Wsdl2XsdConverter
	at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
	... 16 more
Caused by: java.lang.ClassNotFoundException: com.myclass.Wsdl2XsdConverter
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:284)
	at java.lang.Thread.run(Thread.java:595)

I run the mvn compile command also prior to running the above mentioned mvn command.
Any help is greatly appreciated.</description>
		<content:encoded><![CDATA[<p>Hi Vineet, This post is really useful.<br />
However, when I try to run the command, I see the following.<br />
Command: mvn org.codehaus.mojo:exec-maven-plugin:1.2:java -e -Dexec.mainClass=com.myclass.Wsdl2XsdConverter</p>
<p>An exception occured while executing the Java class. com.myclass.Wsdl2XsdConverter<br />
INFO] Trace<br />
org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured while executing the Java class. com.myclass.Wsdl2XsdConverter<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)<br />
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)<br />
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)<br />
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:592)<br />
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)<br />
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)<br />
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)<br />
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)<br />
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. com.qpass.googlecarrierbilling.Wsdl2XsdConverter<br />
	at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)<br />
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)<br />
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)<br />
	&#8230; 16 more<br />
Caused by: java.lang.ClassNotFoundException: com.myclass.Wsdl2XsdConverter<br />
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)<br />
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)<br />
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:284)<br />
	at java.lang.Thread.run(Thread.java:595)</p>
<p>I run the mvn compile command also prior to running the above mentioned mvn command.<br />
Any help is greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil Kesariya</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-83906</link>
		<dc:creator>Anil Kesariya</dc:creator>
		<pubDate>Thu, 02 Feb 2012 05:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-83906</guid>
		<description>hello  i m anil

i m first time working with maven.. so i dont that how should we work with it , i got lession that how we can generate jar file from our java file using maven 
so please tell me that how should i work with it..i have only one day dead line..</description>
		<content:encoded><![CDATA[<p>hello  i m anil</p>
<p>i m first time working with maven.. so i dont that how should we work with it , i got lession that how we can generate jar file from our java file using maven<br />
so please tell me that how should i work with it..i have only one day dead line..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Akilan</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-71652</link>
		<dc:creator>Akilan</dc:creator>
		<pubDate>Wed, 30 Nov 2011 14:37:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-71652</guid>
		<description>Thanks Vineet. Wonderful blog and exactly what I searched for.</description>
		<content:encoded><![CDATA[<p>Thanks Vineet. Wonderful blog and exactly what I searched for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terence</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-66364</link>
		<dc:creator>Terence</dc:creator>
		<pubDate>Fri, 04 Nov 2011 03:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-66364</guid>
		<description>Thanks. Combined with your post and the maven doco, it took me about 10 minutes to have it working and documented.</description>
		<content:encoded><![CDATA[<p>Thanks. Combined with your post and the maven doco, it took me about 10 minutes to have it working and documented.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finn</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-34228</link>
		<dc:creator>Finn</dc:creator>
		<pubDate>Wed, 27 Apr 2011 10:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-34228</guid>
		<description>Highest quality blog post ever, exactly what I needed. Thank you.</description>
		<content:encoded><![CDATA[<p>Highest quality blog post ever, exactly what I needed. Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Mohave</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-29644</link>
		<dc:creator>Max Mohave</dc:creator>
		<pubDate>Fri, 18 Mar 2011 22:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-29644</guid>
		<description>Thank you. I appreciate your skill and time. 
Sincerely, Max</description>
		<content:encoded><![CDATA[<p>Thank you. I appreciate your skill and time.<br />
Sincerely, Max</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vineet</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-29633</link>
		<dc:creator>vineet</dc:creator>
		<pubDate>Fri, 18 Mar 2011 20:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-29633</guid>
		<description>I use Eclipse. I first run &quot;mvn eclipse:eclipse&quot; to export the project into eclipse format. Then import the project by using File -&gt; Import -&gt; Import existing project.

However, I use mvn from command line and not from inside the IDE.

There are eclipse plugins for maven (like m2eclipse) that you can use from inside Eclipse but I don&#039;t use them.</description>
		<content:encoded><![CDATA[<p>I use Eclipse. I first run &#8220;mvn eclipse:eclipse&#8221; to export the project into eclipse format. Then import the project by using File -&gt; Import -&gt; Import existing project.</p>
<p>However, I use mvn from command line and not from inside the IDE.</p>
<p>There are eclipse plugins for maven (like m2eclipse) that you can use from inside Eclipse but I don&#8217;t use them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Mohave</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-29542</link>
		<dc:creator>Max Mohave</dc:creator>
		<pubDate>Fri, 18 Mar 2011 02:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-29542</guid>
		<description>Dear Vineet:

thank, I used your info to run my new application by MVN command line. Do you use an IDE with MAVEN to run and if so which one. And lastly, can you tell me how you would use the equivalent of mvn org.codehaus.mojo:exec-maven-plugin:1.1.1:java -Dexec.mainClass=com.vineetmanohar.module.Main

to run in that IDE?

Thanks so much.</description>
		<content:encoded><![CDATA[<p>Dear Vineet:</p>
<p>thank, I used your info to run my new application by MVN command line. Do you use an IDE with MAVEN to run and if so which one. And lastly, can you tell me how you would use the equivalent of mvn org.codehaus.mojo:exec-maven-plugin:1.1.1:java -Dexec.mainClass=com.vineetmanohar.module.Main</p>
<p>to run in that IDE?</p>
<p>Thanks so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: norman rm</title>
		<link>http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/comment-page-1/#comment-29314</link>
		<dc:creator>norman rm</dc:creator>
		<pubDate>Tue, 15 Mar 2011 22:57:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.vineetmanohar.com/?p=584#comment-29314</guid>
		<description>thanks</description>
		<content:encoded><![CDATA[<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

