[mevenide-dev] [jira] Resolved: (MEVENIDE-630) cannot run main() in a Maven jar project - NetBeans 6.1
"Milos Kleint (JIRA)" <jira-yCVjj/[email protected]> Tue, 8 Jul 2008 01:07:26 -0500 (CDT)
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.devel |
|---|---|
| Message-ID | <4183419.1215497246897.JavaMail.haus-jira@codehaus01.managed.contegix.com> |
[ http://jira.codehaus.org/browse/MEVENIDE-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milos Kleint resolved MEVENIDE-630.
-----------------------------------
Resolution: Fixed
http://fisheye.codehaus.org/changelog/mevenide/?cs=5464
shall be fixed now
> cannot run main() in a Maven jar project - NetBeans 6.1
> -------------------------------------------------------
>
> Key: MEVENIDE-630
> URL: http://jira.codehaus.org/browse/MEVENIDE-630
> Project: mevenide
> Issue Type: Bug
> Components: mevenide2-netbeans
> Affects Versions: NB_3.1
> Environment: Window XP SP2
> JDK1.6
> Reporter: Qingtian Wang
> Assignee: Milos Kleint
> Fix For: NB_3.2
>
>
> Please see email below:
> =======
> I verified that the same main() method runs fine in a standard "Java Application" project. So it seems to be a problem specific to the Maven project type.
> -Qingtian
> On Fri, May 9, 2008 at 11:05 AM, Qingtian Wang <[email protected]> wrote:
> Hi,
> I have a Maven jar project opened in NetBeans 6.1. And I am having trouble running the following main() method:
> public static void main(String[] args) throws IOException {
> BufferedReader stdin = new BufferedReader(new InputStreamReader(
> System.in));
> while (true) {
> System.err.print(
> "Enter native command (use '@' for 'Pillow'; 'q' to quit)" +
> "\n>>> ");
> String cmd = stdin.readLine().trim();
> if ("q".equalsIgnoreCase(cmd)) {
> break;
> }
> }
> }
> The way I invoke the main method is right-click inside the main class and say "run Main.java".
> The problem is after the sys error prompt line is printed in the output window, the program just hangs and doesn't take in any further std input.
> Could someone point out what I am doing wrong here?
> Thanks a lot!
> Here's the entire output until the program hangs:
> WARNING: You are running Maven builds externally, some UI functionality will not be available.
> Executing:C:\Program Files\maven-2.0.7\bin\mvn.bat -Dexec.mainClass=com.ual.hcp.has.apollo.servicesImpl.testharness.NewMain package org.codehaus.mojo:exec-maven-plugin:RELEASE:java
> Scanning for projects...
> ----------------------------------------------------------------------------
> Building apolloServicesImpl
> task-segment: [package, org.codehaus.mojo:exec-maven-plugin:RELEASE:java]
> ----------------------------------------------------------------------------
> Using default encoding to copy filtered resources.
> Compiling 1 source file to C:\vcs\ua-svn-custrev-hcp\trunk\has\apolloServicesImpl\target\classes
> Executing tasks
> [echo] Building Translets for 'sell' domain
> running from root pom
> [echo] Building Translets for 'pnr' domain
> running from root pom
> Executed tasks
> Using default encoding to copy filtered resources.
> Nothing to compile - all classes are up to date
> Surefire report directory: C:\vcs\ua-svn-custrev-hcp\trunk\has\apolloServicesImpl\..\target\surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running com.ual.hcp.has.apollo.servicesImpl.ApolloTerminalTransformerTest
> Results :
> Building jar: C:\vcs\ua-svn-custrev-hcp\trunk\has\apolloServicesImpl\target\apolloServicesImpl-1.0-SNAPSHOT.jar
> Preparing exec:java
> No goals needed for project - skipping
> Enter native command (use '@' for 'Pillow'; 'q' to quit)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email