This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 234874 - No logging in output window during execution when using maven 3 but maven 2 works
Summary: No logging in output window during execution when using maven 3 but maven 2 w...
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3.1
Hardware: PC Windows 8 x64
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-23 12:17 UTC by toddjspin
Modified: 2013-08-27 14:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide log file (776.13 KB, application/octet-stream)
2013-08-23 12:24 UTC, toddjspin
Details
ide log file (48.42 KB, application/octet-stream)
2013-08-23 12:37 UTC, toddjspin
Details
log file with netbeans installed at C:\tools\NetBeans7.3.1 (53.59 KB, application/octet-stream)
2013-08-26 12:00 UTC, toddjspin
Details
netbeans thread dump (20.48 KB, text/plain)
2013-08-27 12:08 UTC, toddjspin
Details
maven thread dump (12.70 KB, text/plain)
2013-08-27 12:08 UTC, toddjspin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description toddjspin 2013-08-23 12:17:07 UTC
After fresh install of netbeans 7.3.1 and 7.3 both would not log to output window. I then tried maven 3.0.5 that I downloaded..then maven 3.1.0...and finally when I used maven version 2.2.1 the logging showed in output window.
Comment 1 Milos Kleint 2013-08-23 12:19:12 UTC
please define "log" to the output window.. no output is shown whatsoever? please attach the IDE log file.
Comment 2 toddjspin 2013-08-23 12:24:13 UTC
Created attachment 139124 [details]
ide log file
Comment 3 toddjspin 2013-08-23 12:25:43 UTC
The only thing logged to output window is

cd C:\development\Test; JAVA_HOME=C:\\tools\\Java\\jdk1.7.0_25 "\"C:\\tools\\NetBeans 7.3.1\\java\\maven\\bin\\mvn.bat\"" clean install
Comment 4 Milos Kleint 2013-08-23 12:32:33 UTC
please check http://wiki.netbeans.org/FaqLogMessagesFile for log file of the IDE, what you attached is an installer log, sorry for not pointing you to the page in the first place.

this could be related to issue 228901. On windows since 1.7_21, executing external commands with space in path and space in parameters is intentionally broken on windows (security issues). We have a fix for 7.4 in which we use the path suggested by jdk team, convert the cmd line to cmd /c execution.

can you try either installing netbeans in a path without spaces (same goes for external maven installations and possibly also project sources) or downgrade to earlier jdk.

Alternatively please try downloading the 7.4 beta.
Comment 5 toddjspin 2013-08-23 12:37:03 UTC
Created attachment 139132 [details]
ide log file
Comment 6 toddjspin 2013-08-23 13:22:33 UTC
I tried netbeans 7.4 and logging to output window works with maven 3.
Comment 7 markiewb 2013-08-23 21:06:28 UTC
(In reply to toddjspin from comment #6)
> I tried netbeans 7.4 and logging to output window works with maven 3.

@Milos: So this issue can be resolved as won't fix (or something similar). Does this problem deserve a note in the system requirements doc of 7.4?
Comment 8 Milos Kleint 2013-08-24 07:01:18 UTC
(In reply to markiewb from comment #7)
> (In reply to toddjspin from comment #6)
> > I tried netbeans 7.4 and logging to output window works with maven 3.
> 
> @Milos: So this issue can be resolved as won't fix (or something similar).
> Does this problem deserve a note in the system requirements doc of 7.4?

I'm not sure, it differs from the other reports that got a stacktrace in messages log. Also I'm a bit confused by the 2.x maven working claim.
Comment 9 Milos Kleint 2013-08-26 06:49:27 UTC
toddjspin: is the IDE log file coming from the same IDE instance that ran the maven build and is it coming from same IDE session (after the maven build was executed)? if this were duplicate of issue 228901, I would expect the exception to show up in the log. 

is both maven3 and maven2 in your case installled in a place without space in path?

please reopen with the additional information. thanks.
Comment 10 toddjspin 2013-08-26 12:00:23 UTC
Created attachment 139248 [details]
log file with netbeans installed at C:\tools\NetBeans7.3.1
Comment 11 toddjspin 2013-08-26 12:04:54 UTC
I attached log file from this morning opening Netbeans 7.3.1....then executing clean and build on project. First maven 2.2.1 was selected...then I switched to the bundled maven and tried clean and build...then switched to maven 3.1. Only the maven 2.2.1 showed in output window.

Maven is installed in following locations.
M2
C:\tools\apache-maven-2.2.1
M3
C:\tools\apache-maven-3.1.0
Comment 12 Milos Kleint 2013-08-26 12:14:35 UTC
(In reply to toddjspin from comment #11)
> I attached log file from this morning opening Netbeans 7.3.1....then
> executing clean and build on project. First maven 2.2.1 was selected...then
> I switched to the bundled maven and tried clean and build...then switched to
> maven 3.1. Only the maven 2.2.1 showed in output window.

was the log file attached before or after running the builds? from your description I read it was done before, but that's not helping much as any possible exceptions would only be printed during the maven build execution.
Comment 13 toddjspin 2013-08-26 12:16:27 UTC
It was attached after.
Comment 14 Milos Kleint 2013-08-26 12:46:41 UTC
(In reply to toddjspin from comment #13)
> It was attached after.

(In reply to toddjspin from comment #10)
> Created attachment 139248 [details]
> log file with netbeans installed at C:\tools\NetBeans7.3.1

Thanks. Nothing in the log that would link it with issue 228901. I suppose it's different. Nb in path with spaces is apparently not the cause here. Similar the space in path for maven.

by any chance fo you have anything defined in your MAVEN_OPTS environment variable or the Tools/Options/Maven global settings?
I'm basically after this cmd line switch that could somehow be executed by maven from the IDE:
-l,--log-file <arg>                    Log file to where all build output
                                        will go.
Comment 15 toddjspin 2013-08-26 12:51:53 UTC
No I have nothing defined for those.
Comment 16 Milos Kleint 2013-08-26 12:58:03 UTC
(In reply to toddjspin from comment #15)
> No I have nothing defined for those.

hmm.. I was betting on that as that's how I was able to reproduce.
Comment 17 Milos Kleint 2013-08-26 13:03:45 UTC
(In reply to Milos Kleint from comment #16)
> (In reply to toddjspin from comment #15)
> > No I have nothing defined for those.
> 
> hmm.. I was betting on that as that's how I was able to reproduce.

what about the -q option somehow slipping in? (however the effect of this switch is more or less equal for 2.x and 3.x) only surefire plugin output was then printed for me then.
Comment 18 Milos Kleint 2013-08-27 07:51:50 UTC
I'm wondering if the build is actually running for you or just somehow the IDE code hangs before executing. Do the Rerun and Stop related actions change enablement state? could you try starting up VisualVM to see if the Maven build shows up in the list of java files. Do a thread dump from maven jvm and also the IDE jvm.. I admit I'm clueless here..
Comment 19 toddjspin 2013-08-27 12:06:39 UTC
I'm not sure if I did things correctly but I ran visualvm and clicked on thread dump for netbeans during the build and then for the maven process that showed up.
Comment 20 toddjspin 2013-08-27 12:08:28 UTC
Created attachment 139304 [details]
netbeans thread dump
Comment 21 toddjspin 2013-08-27 12:08:46 UTC
Created attachment 139305 [details]
maven thread dump
Comment 22 toddjspin 2013-08-27 12:10:33 UTC
(In reply to toddjspin from comment #19)
> I'm not sure if I did things correctly but I ran visualvm and clicked on
> thread dump for netbeans during the build and then for the maven process
> that showed up.

To clarify...ran clean and build from ide...then in visualvm did thread dump for maven process...then ran clean and build again and did thread dump on netbeans process.
Comment 23 Milos Kleint 2013-08-27 14:14:40 UTC
nothing relevant in the thread dumps unfortunately. The maven jvm seems to be happily progressing the build, while the nb JVM is waiting for output to show up. It's not possible to tell if the waiting is indefinite or just temporary.

closing as worksforme, in 7.4 working for both me and the reporter.
if you find steps to reproduce on any computer, please reopen.